[MMTK] Extracting atom coordinates

khinsen at cea.fr khinsen at cea.fr
Fri Jun 3 15:46:46 CEST 2005


On 03.06.2005, at 12:20, David Evans wrote:

> configuration = PDBConfiguration('nuc_H.pdb')
>                                              universe =  
> InfiniteUniverse()
> universe.addObject(configuration.createAll(None, 1))
>
>
> How do I print out the coordinates of one
> particular atom, referred to by atom name and residue name or number?
> eg DT8:O2

First you need to identify the right chain, but there is no generic  
solution, it depends on the PDB file. Let's suppose the righ chain is  
universe[0]. Then

	universe[0][7]

is the 8th residue,

	universe[0][7].phosphate

is the phosphate group, and

	universe[0][7].phosphate.O_2

is the atom O_2.

Konrad.
--
------------------------------------------------------------------------ 
-------
Konrad Hinsen
Laboratoire Leon Brillouin, CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
------------------------------------------------------------------------ 
-------




More information about the mmtk mailing list