<div dir="ltr">All you need is to get the group (residue) and then the chain:<div>







<p class="gmail-p1"><span class="gmail-s1">atom</span>.getGroup().getChain().<span class="gmail-s2">getChainID</span><span class="gmail-s3">(); // gives you the author chain id (biojava 4+)</span></p><p class="gmail-p1"><span class="gmail-s3">In biojava 5 (currently in development, but some alpha versions have been released) it would be slightly different:</span></p><p class="gmail-p1">







</p><p class="gmail-p1"><span class="gmail-s1">atom</span>.getGroup().getChain().<span class="gmail-s2">getName(); // for the author chain id</span></p><p class="gmail-p1"><span class="gmail-s2">







</span></p><p class="gmail-p1"><span class="gmail-s1">atom</span>.getGroup().getChain().<span class="gmail-s2">getId</span><span class="gmail-s3">(); // for the asym_id (internal chain identifier in mmcif files)</span></p><p class="gmail-p1"><br></p><p class="gmail-p1">For the residue number you can do:</p><p class="gmail-p1"><span class="gmail-s1">atom</span>.getGroup().getResidueNumber();</p><p class="gmail-p1">Hope that helps<br></p><p class="gmail-p1"><span class="gmail-s3">Jose</span></p><p class="gmail-p1"><span class="gmail-s3"><br></span></p></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 12, 2017 at 3:07 AM, Enrico Morelli <span dir="ltr"><<a href="mailto:morelli@cerm.unifi.it" target="_blank">morelli@cerm.unifi.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Dear,<br>
<br>
I'm using BioJava for a project. After some filtering operations I've<br>
an Atom list, but I've to know the chain and the residue number for<br>
each atom.<br>
<br>
My PDB has the following format:<br>
<br>
HETATM 1661 MG    MG A 580      69.222  44.815  33.339  1.00<br>
61.74          MG<br>
<br>
Through an Atom object seems that should not possible to access to the<br>
chain (A) and residue number (580). There is a way to do that?<br>
<br>
Thanks<br>
<br>
--<br>
------------------------------<wbr>------------------------------<wbr>-<br>
  Enrico Morelli<br>
  System Administrator | Programmer | Web Developer<br>
<br>
  CERM - Polo Scientifico<br>
  Via Sacconi, 6 - 50019 Sesto Fiorentino (FI) - ITALY<br>
  phone: +39 055 457 4269<br>
  fax:   +39 055 457 4927<br>
------------------------------<wbr>------------------------------<wbr>-<br>
______________________________<wbr>_________________<br>
Biojava-l mailing list  -  <a href="mailto:Biojava-l@mailman.open-bio.org">Biojava-l@mailman.open-bio.org</a><br>
<a href="http://mailman.open-bio.org/mailman/listinfo/biojava-l" rel="noreferrer" target="_blank">http://mailman.open-bio.org/<wbr>mailman/listinfo/biojava-l</a><br>
</blockquote></div><br></div>