[Biojava-l] Alternative conformation skipped

Jose Duarte jose.duarte at rcsb.org
Wed May 7 14:29:03 EDT 2025


There's a call to get alt locs, e.g. something like this:

if (g.hasAltLoc()) {
    System.out.println("## alt locs");
    System.out.println(g.getAltLocs().size());
    for (Group altLoc: g.getAltLocs()) {
       for (Atom a : altLoc.getAtoms()) {
          System.out.println(a);
       }
    }
}

Also do note the javadoc for getAltLocs to see what the exact behaviour is:

https://github.com/biojava/biojava/blob/5a699eb6465509b853463ae34ec04c4d90bc2a54/biojava-structure/src/main/java/org/biojava/nbio/structure/Group.java#L344-L364



On Wed, 7 May 2025 at 03:40, Enrico Morelli <morelli at cerm.unifi.it> wrote:

> Dear all,
>
> we are trying to read the HETATM of the following cif
> https://files.rcsb.org/view/4KL8.cif with this code:
>
> for (Chain c : structure.getChains()) {
>             for (Group g : c.getAtomGroups(GroupType.HETATM)) {
>                 for (Atom a : g.getAtoms()) {
>                     System.out.println(a);
>
>                 }
>             }
>         }
>
> But we realized that your methods doesn't read all the alternative
> conformation of some of the hetatm in the structure.
> For instance it reads FE 12360 but not FE 12361_
>
> HETATM 12360 FE FE  A FCO W  7  .   ? 27.605  -32.546 26.346  0.33 9.74
> ?  501  FCO M FE  1
> HETATM 12361 FE FE  B FCO W  7  .   ? 27.573  -32.629 26.079  0.67 10.53
> ?  501  FCO M FE  1
>
>
> Is it possible to read both or at least the one with the higher occupancy?
>
> Thank you very much in advance
>
> Regards
> --
> -----------------------------------------------------------
>   Enrico Morelli
>   System Administrator | Programmer | Web Developer
>
>   CERM - Polo Scientifico
>   via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY
> ------------------------------------------------------------
> _______________________________________________
> Biojava-l mailing list  -  Biojava-l at biojava.org
> https://mailman.open-bio.org/mailman/listinfo/biojava-l
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.open-bio.org/pipermail/biojava-l/attachments/20250507/e67f4d21/attachment.htm>


More information about the Biojava-l mailing list