<div dir="ltr">There's a call to get alt locs, e.g. something like this:<div><div style="background-color:rgb(30,31,34);color:rgb(188,190,196)"><pre style="font-family:"JetBrains Mono",monospace;font-size:9.8pt"><span style="color:rgb(207,142,109)">if </span>(g.hasAltLoc()) {<br> System.<span style="color:rgb(199,125,187);font-style:italic">out</span>.println(<span style="color:rgb(106,171,115)">"## alt locs"</span>);<br> System.<span style="color:rgb(199,125,187);font-style:italic">out</span>.println(g.getAltLocs().size());<br> <span style="color:rgb(207,142,109)">for </span>(Group altLoc: g.getAltLocs()) {<br> <span style="color:rgb(207,142,109)">for </span>(Atom a : altLoc.getAtoms()) {<br> System.<span style="color:rgb(199,125,187);font-style:italic">out</span>.println(a);<br> }<br> }<br>}</pre></div></div><div>Also do note the javadoc for getAltLocs to see what the exact behaviour is:</div><div><br></div><div><a href="https://github.com/biojava/biojava/blob/5a699eb6465509b853463ae34ec04c4d90bc2a54/biojava-structure/src/main/java/org/biojava/nbio/structure/Group.java#L344-L364">https://github.com/biojava/biojava/blob/5a699eb6465509b853463ae34ec04c4d90bc2a54/biojava-structure/src/main/java/org/biojava/nbio/structure/Group.java#L344-L364</a></div><div><br></div><div><br></div></div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, 7 May 2025 at 03:40, Enrico Morelli <<a href="mailto:morelli@cerm.unifi.it">morelli@cerm.unifi.it</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Dear all,<br>
<br>
we are trying to read the HETATM of the following cif <a href="https://files.rcsb.org/view/4KL8.cif" rel="noreferrer" target="_blank">https://files.rcsb.org/view/4KL8.cif</a> with this code:<br>
<br>
for (Chain c : structure.getChains()) {<br>
for (Group g : c.getAtomGroups(GroupType.HETATM)) {<br>
for (Atom a : g.getAtoms()) {<br>
System.out.println(a);<br>
<br>
}<br>
}<br>
}<br>
<br>
But we realized that your methods doesn't read all the alternative conformation of some of the hetatm in the structure.<br>
For instance it reads FE 12360 but not FE 12361_<br>
<br>
HETATM 12360 FE FE A FCO W 7 . ? 27.605 -32.546 26.346 0.33 9.74 ? 501 FCO M FE 1 <br>
HETATM 12361 FE FE B FCO W 7 . ? 27.573 -32.629 26.079 0.67 10.53 ? 501 FCO M FE 1 <br>
<br>
<br>
Is it possible to read both or at least the one with the higher occupancy?<br>
<br>
Thank you very much in advance<br>
<br>
Regards<br>
-- <br>
-----------------------------------------------------------<br>
Enrico Morelli<br>
System Administrator | Programmer | Web Developer<br>
<br>
CERM - Polo Scientifico<br>
via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY<br>
------------------------------------------------------------<br>
_______________________________________________<br>
Biojava-l mailing list - <a href="mailto:Biojava-l@biojava.org" target="_blank">Biojava-l@biojava.org</a><br>
<a href="https://mailman.open-bio.org/mailman/listinfo/biojava-l" rel="noreferrer" target="_blank">https://mailman.open-bio.org/mailman/listinfo/biojava-l</a><br>
</blockquote></div>