[MMTK] extract residues and copy to a new universe
Konrad Hinsen
research at khinsen.fastmail.net
Mon Oct 26 07:57:36 UTC 2009
On 23 Oct 2009, at 20:26, Peter Schmidtke wrote:
> I am just starting with MMTK but basically I want to do the following.
> Given a PDB structure coming from an Amber trajectory I would like
> to read
> it, extract two residues and put them in an empty universe to
> calculate the
> energy of this universe. I tried the following :
This doesn't look like a well-defined goal to me. Residues are not
complete molecules, they are building blocks for peptide or nucleotide
chains. So what is the energy of universe containing isolated residues
supposed to be? If the isolated residues could be made in real life,
their energies would be enormous because of weird electron orbitals in
the regions where normally the neighbouring residues would be.
For this reason, MMTK does not allow putting residues (or indeed any
Group objects) directly into a universe. Only atoms and molecules are
allowed.
Something you can do is calculate the contribution of the interactions
between two residues (which are inside well-formed molecules) to the
total energy of the universe. You can get it by specifying subsets for
energy evaluators:
from MMTK.PDB import PDBConfiguration
import MMTK as m
from MMTK.ForceFields import Amber99ForceField
configuration=m.PDB.PDBConfiguration("mysnapshot.pdb")
molecules = configuration.createAll()
u2 = m.InfiniteUniverse(Amber99ForceField())
u2.addObject(molecules)
print universe.energy(molecules[0][0][1], molecules[0][0][2])
Maybe that's what you want.
> File
> "/usr/local/lib64/python2.6/site-packages/MMTK/ForceFields/
> BondedInteractions.py",
> line 52, in evaluatorParameters
> for angle in bu.bonds.bondAngles():
> AttributeError: 'list' object has no attribute 'bondAngles'
I admit that error messages in MMTK are often far from ideal...
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: research at khinsen dot fastmail dot net
---------------------------------------------------------------------
More information about the mmtk
mailing list