[Biopython-dev] Atomic / Residue contacts for Bio.PDB

Marcin Cieślik marcin.cieslik at gmail.com
Thu Jan 31 07:05:26 UTC 2008


Hello,
I've written several classes to work with the ccp4 ncont program. They
use the AbstractPropertyMap, AbstractAtomPropertyMap classes to map
contacts between atoms and residues. I'd like to contribute this code.

it consists of
* one 'private' function which runs ncat and parses output into
{full_atom_id_in_biopython_tuple : (other_full_id, distance)
				 : (yet another atom, distance)
....
}

and classes:
class _AbstractAtomContacts(AbstractAtomPropertyMap):
	class WaterAtomContacts(_AbstractAtomContacts):
	class CrystalAtomContacts(_AbstractAtomContacts):

class _AbstractContacts(AbstractPropertyMap):
	class CrystalContacts(_AbstractContacts):
	class WaterContacts(_AbstractContacts):

the ncat calling function is called only by _AbstractAtomContacts, the
results are stored in the .xtra dict. Specific contact classes are just
'definitions' of settings for ncat e.g CrystalContacts searches contacts
between symmetry mates only, in 27 unit cells, ommiting all waters etc.

One negative side of this code is that ncat and the mmdb library (and as
a consequence ccp4 6.0.2) do not support PDB v3 files. Luckily RCSB
provides a python PDB translator script 3.1 <--> 2.3.

Marcin



More information about the Biopython-dev mailing list