[MMTK] Creating arbitrary molecules

Rick Muller rmuller at sandia.gov
Wed Jul 30 15:33:47 EDT 2003


After a number of years of subscribing to the MMTK list, I've finally  
started to use MMTK for my day to day research. I'm tripping over a  
couple of minor bugs, and I was hoping that someone on the list could  
point out what I'm doing wrong.

I can run several of the simple examples, particularly the ones that  
use molecules already in the database. However, when I try and create  
my own molecule from coordinates I run into trouble.

Here's a trivial example:
universe = InfiniteUniverse(Amber94ForceField())

universe.addObject(Atom('O',position=Vector(0*Units.Ang,0*Units.Ang,0*Un 
its.Ang)))
universe.addObject(Atom('H',position=Vector(1*Units.Ang,0*Units.Ang,0*Un 
its.Ang)))
universe.addObject(Atom('H',position=Vector(0*Units.Ang,1*Units.Ang,0*Un 
its.Ang)))

temperature = 298*Units.K

universe.initializeVelocitiesToTemperature(temperature)

integrator = VelocityVerletIntegrator(universe)

integrator(steps=2000)


If I replace the addObject calls with universe.molecule('water'), the  
example runs without problem. So I'm doing something wrong when I add  
the objects. Can anyone point out what I'm doing wrong?

R.

Rick Muller
rmuller at sandia.gov





More information about the mmtk mailing list