<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi Morten,<br>
    <br>
    your example does not include symmetry. You can see the
    implementation of <br>
    <br>
    iotbx.show_distances 1yjp.pdb<br>
    <br>
    that computes all-vs-all distances in most efficient way and also is
    symmetry-smart.<br>
    <br>
    You can combine functionality of some pieces of iotbx.show_distances
    (those that give you indices of pairs) with the list of atoms from
    pdb_hierarchy (that gives you all labels: residue names, atom names,
    etc).<br>
    <br>
    Pavel<br>
    <br>
    <div class="moz-cite-prefix">On 2/18/15 11:30 AM, Morten Gr�ftehauge
      wrote:<br>
    </div>
    <blockquote
cite="mid:CAEAG6YQsmapOrhj4inqvESf=wtbJFrfXMaCGMiq35pd_FZZfzg@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi everyone,�
        <div><br>
        </div>
        <div>I'm trying to do some distance extraction of hetero atoms
          in pdbs. I'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'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 moz-do-not-send="true"
            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's an alternate conformation
          with a standard amino acid (Cys). So it wouldn't work with a
          seleno-met for instance (I know there'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'm sure there are multiple ways of doing it (should I
          just do a selection of "hetatm" 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>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
cctbxbb mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cctbxbb@phenix-online.org">cctbxbb@phenix-online.org</a>
<a class="moz-txt-link-freetext" href="http://phenix-online.org/mailman/listinfo/cctbxbb">http://phenix-online.org/mailman/listinfo/cctbxbb</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>