Re: Alternative conformation skipped
Jose Duarte <[email protected]> Wed, 7 May 2025 11:29:03 -0700
| Newsgroups | gmane.comp.java.bio.general |
|---|---|
| Message-ID | <CAHhO=JE9a=J_yBNpV+3Y5Rmo5AEQt=rtyL2dFcu_A1ni+rUY=A@mail.gmail.com> |
--===============4781471584920576452==
Content-Type: multipart/alternative; boundary="000000000000fb933f06348fe8c0"
--000000000000fb933f06348fe8c0
Content-Type: text/plain; charset="UTF-8"
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 <[email protected]> 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 - [email protected]
> https://mailman.open-bio.org/mailman/listinfo/biojava-l
>
--000000000000fb933f06348fe8c0
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
<div dir=3D"ltr">There's a call to get alt locs, e.g. something like th=
is:<div><div style=3D"background-color:rgb(30,31,34);color:rgb(188,190,196)=
"><pre style=3D"font-family:"JetBrains Mono",monospace;font-size:=
9.8pt"><span style=3D"color:rgb(207,142,109)">if </span>(g.hasAltLoc()) {<b=
r> System.<span style=3D"color:rgb(199,125,187);font-style:italic">out</=
span>.println(<span style=3D"color:rgb(106,171,115)">"## alt locs"=
;</span>);<br> System.<span style=3D"color:rgb(199,125,187);font-style:i=
talic">out</span>.println(g.getAltLocs().size());<br> <span style=3D"col=
or:rgb(207,142,109)">for </span>(Group altLoc: g.getAltLocs()) {<br> =
<span style=3D"color:rgb(207,142,109)">for </span>(Atom a : altLoc.getAtoms=
()) {<br> System.<span style=3D"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=3D"https://github.com/biojava/biojava=
/blob/5a699eb6465509b853463ae34ec04c4d90bc2a54/biojava-structure/src/main/j=
ava/org/biojava/nbio/structure/Group.java#L344-L364">https://github.com/bio=
java/biojava/blob/5a699eb6465509b853463ae34ec04c4d90bc2a54/biojava-structur=
e/src/main/java/org/biojava/nbio/structure/Group.java#L344-L364</a></div><d=
iv><br></div><div><br></div></div><br><div class=3D"gmail_quote gmail_quote=
_container"><div dir=3D"ltr" class=3D"gmail_attr">On Wed, 7 May 2025 at 03:=
40, Enrico Morelli <<a href=3D"mailto:[email protected]">morelli@cer=
m.unifi.it</a>> wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"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=3D"https://fi=
les.rcsb.org/view/4KL8.cif" rel=3D"noreferrer" target=3D"_blank">https://fi=
les.rcsb.org/view/4KL8.cif</a> with this code:<br>
<br>
for (Chain c : structure.getChains()) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (Group g : c.getAtomGroups(Gr=
oupType.HETATM)) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (Atom a : g.get=
Atoms()) {<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Syste=
m.out.println(a);<br>
<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 }<br>
<br>
But we realized that your methods doesn't read all the alternative conf=
ormation 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=C2=A0 A FCO W=C2=A0 7=C2=A0 .=C2=A0 =C2=A0? 27.605=C2=A0=
-32.546 26.346=C2=A0 0.33 9.74=C2=A0 ?=C2=A0 501=C2=A0 FCO M FE=C2=A0 1 <b=
r>
HETATM 12361 FE FE=C2=A0 B FCO W=C2=A0 7=C2=A0 .=C2=A0 =C2=A0? 27.573=C2=A0=
-32.629 26.079=C2=A0 0.67 10.53 ?=C2=A0 501=C2=A0 FCO M FE=C2=A0 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>
=C2=A0 Enrico Morelli<br>
=C2=A0 System Administrator | Programmer | Web Developer<br>
<br>
=C2=A0 CERM - Polo Scientifico<br>
=C2=A0 via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY<br>
------------------------------------------------------------<br>
_______________________________________________<br>
Biojava-l mailing list=C2=A0 -=C2=A0 <a href=3D"mailto:[email protected]=
g" target=3D"_blank">[email protected]</a><br>
<a href=3D"https://mailman.open-bio.org/mailman/listinfo/biojava-l" rel=3D"=
noreferrer" target=3D"_blank">https://mailman.open-bio.org/mailman/listinfo=
/biojava-l</a><br>
</blockquote></div>
--000000000000fb933f06348fe8c0--
--===============4781471584920576452==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
Biojava-l mailing list - [email protected]
https://mailman.open-bio.org/mailman/listinfo/biojava-l
--===============4781471584920576452==--