[MMTK] MMTK Windows Problems

Konstantinos Makrodimitris kmakr7 at msn.com
Fri Jun 20 15:00:40 EDT 2003


Hi,

Thank you for your help.
I fully understand that MMTK was not developed primarily for Windows
and there are not MMTK-Windows developers.

> > the Dynamics.py module crash. It looks like MMTK can't run MD in Windows
> > but at least you can build a biomolecule!
>
>Is it dynamics or also energy evaluation? Can you do something like
>
>    print universe.energy()
>
>without a crash?


I'd like to give you the output of running the example protein.py.
print Universe.energy works however erros in Trajectory.py, Dynamics.py :

>>>from MMTK import *
>>>from MMTK.Proteins import Protein
>>>from MMTK.ForceFields import Amber94ForceField
>>>from MMTK.Dynamics import VelocityVerletIntegrator, Heater, \
...                           TranslationRemover, RotationRemover
>>>from MMTK.Visualization import view
>>>from MMTK.Trajectory import Trajectory, TrajectoryOutput, \
...                             RestartTrajectoryOutput, StandardLogOutput, 
\
...                             trajectoryInfo
>>>
>>># Define system
... universe = InfiniteUniverse(Amber94ForceField())
>>>universe.protein = Protein('bala1')
>>>
>>># Initialize velocities
... universe.initializeVelocitiesToTemperature(50.*Units.K)
>>>print 'Temperature: ', universe.temperature()
Temperature:  54.2066847637
>>>print 'Momentum: ', universe.momentum()
Momentum:  [-0.96671630605968883, 7.3114006253079165, -5.319160412233904]
>>>print 'Angular momentum: ', universe.angularMomentum()
Angular momentum:  [-1.6358556712649883, 1.692950514307761, 
1.5823852748279084]
>>>
>>># Create integrator
... integrator = VelocityVerletIntegrator(universe, delta_t=1.*Units.fs)
>>>
>>># Heating and equilibration
... integrator(steps=1000,
...                     # Heat from 50 K to 300 K applying a temperature
...                     # change of 0.5 K/fs; scale velocities at every 
step.
...        actions=[Heater(50.*Units.K, 300.*Units.K, 0.5*Units.K/Units.fs,
...                            0, None, 1),
...                     # Remove global translation every 50 steps.
...                 TranslationRemover(0, None, 50),
...                     # Remove global rotation every 50 steps.
...                 RotationRemover(0, None, 50),
...                     # Log output to screen every 100 steps.
...                     StandardLogOutput(100)])
Step 0
Time: 0.000000
Potential energy: -80.205828, Kinetic energy: 14.873097

Step 100
Time: 0.100000
Potential energy: -88.262293, Kinetic energy: 28.301396

Step 200
Time: 0.200000
Potential energy: -71.107300, Kinetic energy: 41.357779

Step 300
Time: 0.300000
Potential energy: -75.051691, Kinetic energy: 52.372890

Step 400
Time: 0.400000
Potential energy: -35.693655, Kinetic energy: 68.158190

Step 500
Time: 0.500000
Potential energy: -11.241119, Kinetic energy: 80.192504

Step 600
Time: 0.600000
Potential energy: -27.842783, Kinetic energy: 79.123863

Step 700
Time: 0.700000
Potential energy: -10.401598, Kinetic energy: 79.456309

Step 800
Time: 0.800000
Potential energy: -39.424348, Kinetic energy: 85.024052

Step 900
Time: 0.900000
Potential energy: -27.868242, Kinetic energy: 83.683368

Step 1000
Time: 1.000000
Potential energy: -39.469451, Kinetic energy: 80.580309
>>>print universe.energy()
-39.4694507112


>>>trajectory = Trajectory(universe, "bala1.nc", "w", "A simple test case")
>>>integrator(steps=100,
...                       # Remove global translation every 50 steps.
...            actions = [TranslationRemover(0, None, 50),
...                       # Remove global rotation every 50 steps.
...                       RotationRemover(0, None, 50),
...                       # Write every second step to the trajectory file.
...                       TrajectoryOutput(trajectory, ("time", "energy",
...                                                     "thermodynamic",
...                                                     "configuration"),
...                                        0, None, 2),
...                       # Write restart data every fifth step.
...                       RestartTrajectoryOutput("restart.nc", 5),
...                       # Log output to screen every 10 steps.
...                       StandardLogOutput(10)])
Traceback (most recent call last):
  File "<stdin>", line 10, in ?
  File "C:\Python22\Lib\site-packages\MMTK\Dynamics.py", line 174, in 
__call__
    args = (self.universe,
  File "C:\Python22\Lib\site-packages\MMTK\Trajectory.py", line 919, in 
getActions
    self.actions)
  File "C:\Python22\Lib\site-packages\MMTK\Trajectory.py", line 918, in 
<lambda>
    return map(lambda a, t=self, s=steps: a.getSpecificationList(t, s),
  File "C:\Python22\Lib\site-packages\MMTK\Trajectory.py", line 1024, in 
getSpecificationList
    trajectory_generator.universe)
  File "C:\Python22\Lib\site-packages\MMTK\Trajectory.py", line 1088, in 
_setupDestination
    'Restart trajectory', 1, self.length)
  File "C:\Python22\Lib\site-packages\MMTK\Trajectory.py", line 162, in 
__init__
    block_size)
ValueError: Invalid type for array
>>>integrator(steps=100,
...                       # Remove global translation every 50 steps.
...            actions = [TranslationRemover(0, None, 50),
...                       # Remove global rotation every 50 steps.
...                       RotationRemover(0, None, 50),
...                       # Write every second step to the trajectory file.
...                       TrajectoryOutput(trajectory, ("time", "energy",
...                                                     "thermodynamic",
...                                                     "configuration"),
...                                        0, None, 2),
...                       # Write restart data every fifth step.
...                       RestartTrajectoryOutput("restart.nc", 5),
...                       # Log output to screen every 10 steps.
...   StandardLogOutput(10)])
Traceback (most recent call last):
  File "<stdin>", line 10, in ?
  File "C:\Python22\Lib\site-packages\MMTK\Dynamics.py", line 189, in 
__call__
    apply(MMTK_dynamics.integrateVV, args)
MemoryError
>>>


Best,
Kon

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the mmtk mailing list