[cctbxbb] Atom selections for distance (embarrassingly simple)

Morten Grøftehauge mortengroftehauge.work at gmail.com
Wed Feb 18 11:30:26 PST 2015


Hi everyone,

I'm trying to do some distance extraction of hetero atoms in pdbs. I've got

    for model in pdb_obj.hierarchy.models():
      for chain in model.chains():
        for rg in chain.residue_groups():
          for ag in rg.atom_groups():
            for atom in ag.atoms():
              if atom.hetero == True:
                print  atom.distance(atom)

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).


I also noticed something weird in this tutorial:
http://cctbx.sourceforge.net/sbgrid2008/tutorial.html
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).

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?).

Cheers,
Morten
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://phenix-online.org/pipermail/cctbxbb/attachments/20150218/377e9b22/attachment.htm>


More information about the cctbxbb mailing list