[MMTK] force field modules

Eric Zollars zollars at caltech.edu
Thu Jun 10 23:56:31 CEST 2004


All-
I am trying to build a new force field using MMTK.  I have been using 
AmberForceField and LennardJonesFF as rough guides to implementation.  
There are some things I don't understand:

1.  An energy() call to an InfiniteUniverse with an AmberLJForceField 
instance will fail with AttributeError: ForceFieldData instance has no 
attribute 'atom_type'.  As far as I can tell this is because 
NonBondedInteractions.LJForceField.evaluatorTerms has never set this 
attribute of "global_data".  With the 
MMForceField.MMNonbondedForceField.evaluatorTerms method, this attribute 
is set by the collectAtomTypesAndIndices method.  But LJForceField never 
calls a similar method.  What has to be done to make this work?

2.  Why is the NonBondedForceField.ready() method in the 
NonBondedInteractions module set to return 'bonded'?  If this class is 
to be used without a bonded force field should this be set to return '1'?

I have a feeling these are both inheritance related, but I would 
appreciate some insight.
Thanks.
Eric





More information about the mmtk mailing list