[MMTK] Problem defining a single methan molecule in the database

nils.marechal at laposte.net nils.marechal at laposte.net
Fri May 23 22:59:54 UTC 2014


hello,

I am a frequent python user but quite new on MMTK

I am trying to define a methan molecule in the MMTK database in order to minimize this 
molecule (from a PDB file) thanks to an Amber99ff.

bellow is my molecular definition:

name ='methane'

C_1 = Atom('C')
H1_1 = Atom('H')
H2_1 = Atom('H')
H3_1 = Atom('H')
H4_1 = Atom('H')

bonds = [Bond(C_1, H1_1), Bond(C_1, H2_1), Bond(C_1, H3_1), Bond(C_1, H4_1)]

pdbmap = [('MTH', {"C": C_1, "H1": H1_1, "H2": H2_1, "H3": H3_1, "H4": H4_1})]

amber_atom_type = {C_1: 'CT', H1_1: 'HC', H2_1: 'HC', H3_1: 'HC', H4_1: 'HC'}

amber_charge = {C_1:-0.1088, H1_1:0.0267, H2_1:0.0267, H3_1:0.0267, H4_1:0.0267}



I try to load the molecular model using these command lines:


import MMTK as mmtk
from MMTK.Solvation import addSolvent, shrinkUniverse, numberOfSolventMolecules
from MMTK.ForceFields import Amber99ForceField
from MMTK.NormalModes import NormalModes
from MMTK.Minimization import ConjugateGradientMinimizer
from MMTK.Trajectory import StandardLogOutput, TrajectoryOutput
from MMTK.PDB import PDBConfiguration
from MMTK.PDB import defineMolecule

defineMolecule('methane','MTH')

load = PDBConfiguration('methane.pdb')

molecule = load.createMolecules('MTH', 0)

box = molecule[0].boundingBox()

box = box[1]-box[0]+mmtk.Vector(1, 1, 1)

universe = mmtk.OrthorhombicPeriodicUniverse(box,Amber99ForceField(1,1))

universe.addObject(molecule)

addSolvent(universe, water, 1*mmtk.Units.g/mmtk.Units.cm**3,scale_factor = 4)

shrinkUniverse(universe, 310.*mmtk.Units.K, Output+'_solvation.nc',scale_factor=0.1)

universe.setForceField(Amber99ForceField(14 ,None))

minimizer = ConjugateGradientMinimizer(universe,actions = 
[StandardLogOutput(50),TrajectoryOutput(Output+'.nc',("configuration", "energy"),0, None, 
1)])

minimizer(convergence = 0.001,steps = 500,threads = 4)


but I obtain the following error message:

'no definition for molecule MTH'

The molecule definition file was pasted both in Molecule and Groups folders of the 
database.

Does anyone have a idea of my problem?

best,

Nils



More information about the mmtk mailing list