[MMTK] c-alpha configuration form Amber force field

Konrad Hinsen hinsen at cnrs-orleans.fr
Tue May 19 16:56:50 UTC 2009


On May 19, 2009, at 16:39, Ramon Crehuet wrote:

> Dear MMTK users,
> I would like to perform (iteratively) a c-alpha normal mode  
> calculation from an all-atom conformation and then apply the modes  
> to this all-atom conformation.
> I though of having two universes, one with the Amber force field  
> and another with the C-alpha.
> How can I copy the configuration in the amber universe to the c- 
> alpha? I have tried the following:

You have to create a C-alpha model in the C-alpha universe and then  
copy only the positions of the C-alpha atoms. If you want to do that  
repeatedly, a good solution is to set up (once) a dictionary mapping  
the atoms in one universe to the corresponding atoms in the other  
universe:

from MMTK import *
from MMTK.Proteins import Protein

# Create an all-atom universe and a c-alpha universe
universe_aa = InfiniteUniverse()
universe_ca = InfiniteUniverse()

# Add the protein to both universes
protein_aa = Protein('insulin.pdb')
universe_aa.addObject(protein_aa)
protein_ca = Protein('insulin.pdb', model='calpha')
universe_ca.addObject(protein_ca)

# Set up a dictionary mapping aa atoms to ca atoms
atom_map = {}
for ichain in range(len(protein_aa)):
     chain_aa = protein_aa[ichain]
     chain_ca = protein_ca[ichain]
     for iresidue in range(len(chain_aa)):
         ca_aa = chain_aa[iresidue].peptide.C_alpha
         ca_ca = chain_ca[iresidue].peptide.C_alpha
         atom_map[ca_aa] = ca_ca

# Copy the aa configuration to the ca configuration
for ca_aa, ca_ca in atom_map.items():
     ca_ca.setPosition(ca_aa.position())

Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen at cnrs-orleans.fr
Web: http://dirac.cnrs-orleans.fr/~hinsen/
---------------------------------------------------------------------






More information about the mmtk mailing list