[MMTK] Potential Energy Calculation

Marc Gasser marc.gasser at pharma.ethz.ch
Fri May 7 17:00:34 CEST 2004


Hi Shirley,

Try this.

####################################

from MMTK import *
from MMTK.PDB import PDBConfiguration
from MMTK.Proteins import Protein
from MMTK.ForceFields import Amber94ForceField

universe = InfiniteUniverse(Amber94ForceField())
conf = PDBConfiguration('your_file.pdb')
chains = conf.createPeptideChains()
protein = Protein(chains)
universe.protein = protein
universe.energy()

####################################

There are probably other ways, but this one seems to work, at least for
peptide chains.

Cheers 
Marc


On Fri, 7 May 2004 09:47:48 -0400
"Shirley Hui" <shirleyhui at alumni.uwaterloo.ca> wrote:

> I would like to calculate the potential energy value of a conformation of a molecule according to a pdb file that I read in.
> I have tried out the example in the paper on page 3.
> 
>    K. Hinsen
>    The molecular modeling toolkit: A new approach to molecular simulations
>    J. Comp. Chem. 21(2), 79-85 (2000) 
> In which, a pdb file is read from the database and stored in the Protein object.  The Protein object is then stored in the universe and then the energy function is caled like the below:
> 
> from MMTK import
> 
> from MMTK.Proteins import Protein
> 
> test = Protein('110d.pdb')
> 
> from MMTK.ForceFields import Amber94ForceField
> 
> universe = InfiniteUniverse(Amber94ForceField())
> 
> universe.addObject(test)
> 
> print universe.energy()
> 
> When I run this code in python, the last line outputs 0.00.
> My expectation was that the energy of the molecule represented in 110d.pdb would be printed out.
> 
> I looked in the user manual, but it appears that all energy related functions are part of the universe object.
> 
> The questions I have are:
> 
> 1) Is it possible to read in a molecular conformation from a pdb file and then calculate it's potential energy value?
> 
> 2) If so, am I doing it correctly above?  If not, how can I do 1)??
> 
> Thank you,
> 
> shirley
> 
> 



More information about the mmtk mailing list