[MMTK] Errors when running example in manual

Michiel Jan Laurens de Hoon mdehoon at ims.u-tokyo.ac.jp
Mon Aug 11 22:11:35 EDT 2003


Dear MMTKers,

To get started with MMTK, I tried to run the example script on page 15 
in the User's guide. I ran into two errors, shown below. The first one 
doesn't seem to be serious, so I commented out the corresponding lines 
in the source code to be able to continue the run. The second error does 
seem serious though, I don't know how to fix that one. Does anybody know?

Thanks in advance,
  --Michiel, U Tokyo


[dhcp25:~] mdehoon% python
Python 2.3 (#1, Aug 11 2003, 17:24:37)
[GCC 3.1 20020420 (prerelease)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> from MMTK import*
 >>> from MMTK.ForceFields import Amber94ForceField
 >>> from MMTK.Trajectory import Trajectory, TrajectoryOutput, 
StandardLogOutput
 >>> from MMTK.Dynamics import VelocityVerletIntegrator
 >>> universe = InfiniteUniverse(Amber94ForceField)
 >>> universe.molecule = Molecule('water')
 >>> universe.initializeVelocitiesToTemperature(300*Units.K)
 >>> integrator = VelocityVerletIntegrator(universe)
 >>> trajectory = Trajectory(universe,"water.nc","w")
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.3/site-packages/MMTK/Trajectory.py", line 
156, in __init__
    description = universe.description(object, inverse_map)
  File "/usr/local/lib/python2.3/site-packages/MMTK/Universe.py", line 
804, in description
    s = 'c(%s,[%s])' % \
  File "/usr/local/lib/python2.3/site-packages/MMTK/Universe.py", line 
926, in _descriptionArguments
    return '(%s)' % self._forcefield.description()
AttributeError: _ForceFieldLoader instance has no attribute 'description'

.... after modifying this line in Universe.py and continuing ......


 >>> integrator(delta_t=1.*Units.fs, steps=50, 
actions=[StandardLogOutput(5), 
TrajectoryOutput(trajectory,("time","energy","thermodynamics","configuration"),0, 
None,1)])
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
  File "/usr/local/lib/python2.3/site-packages/MMTK/Dynamics.py", line 
141, in __call__
    mpi_communicator=comm)
  File "/usr/local/lib/python2.3/site-packages/MMTK/Universe.py", line 
603, in energyEvaluator
    threads, mpi_communicator)
  File 
"/usr/local/lib/python2.3/site-packages/MMTK/ForceFields/ForceField.py", 
line 177, in __init__
    terms = self.ff.evaluatorTerms(self.universe,
AttributeError: _ForceFieldLoader instance has no attribute 'evaluatorTerms'
 >>>

.... Here I'm stuck, this looks like a more serious error .....




More information about the mmtk mailing list