<div dir="ltr">Hi everyone, <div><br></div><div>I&#39;m trying to do some distance extraction of hetero atoms in pdbs. I&#39;ve got </div><div><br></div><div><div><font face="monospace, monospace">    for model in pdb_obj.hierarchy.models():</font></div><div><font face="monospace, monospace">      for chain in model.chains():</font></div><div><font face="monospace, monospace">        for rg in chain.residue_groups():</font></div><div><font face="monospace, monospace">          for ag in rg.atom_groups():</font></div><div><font face="monospace, monospace">            for atom in ag.atoms():</font></div><div><font face="monospace, monospace">              if atom.hetero == True:</font></div><div><font face="monospace, monospace">                print  atom.distance(atom)</font></div><div><br></div></div><div>Which prints out 0.0 as expected. But I can&#39;t figure out how to, say, measure the distance to an atom in the previous residue (if there is a previous residue). </div><div><br></div><div><br></div><div>I also noticed something weird in this tutorial: </div><div><a href="http://cctbx.sourceforge.net/sbgrid2008/tutorial.html">http://cctbx.sourceforge.net/sbgrid2008/tutorial.html</a><br></div><div>They truncate a non-standard amino acid to the beta-carbon but this only works because there&#39;s an alternate conformation with a standard amino acid (Cys). So it wouldn&#39;t work with a seleno-met for instance (I know there&#39;s a convert-to-ala function in mmtbx - I said it was weird, not terrible). </div><div><br></div><div>Anyway, I hope someone can explain the distances thing for me. I&#39;m sure there are multiple ways of doing it (should I just do a selection of &quot;hetatm&quot; and iterate over them and try to get some distanes?). </div><div><br></div><div>Cheers,</div><div>Morten </div><div><br></div><div><br></div></div>