[MMTK] creating new ForceField
wagner at chemie.uni-frankfurt.de
Thu May 18 09:33:12 CEST 2006
In the /Examples/Forcefield/HarmonicOscillator/Python folder of the MMTK
Package is an example how to implement a ForceField in Python.
Am Mittwoch, 17. Mai 2006 21:37 schrieb Andrey Khavryuchenko:
> I'm trying to create new force field using PyQuante package.
> As far as I've got from reading docs and source code, I have to define
> 'evaluatorTerms' in the class, derived from ForceField. However, there's
> no documentation on this method.
> Studying the source code and provided examples show that this method has to
> return a list of evaluators.
> But my code never ever reaches the evaluator....
> def py_evaluator():
> print 'here'
> class RhfForceField(ForceField.ForceField):
> def __init__(self):
> ForceField.ForceField('Restricted Hartree Fock')
> def evaluatorTerms(self, universe, subset1, subset2, global_data):
> return [py_evaluator]
> I will dig further in the C code, but may be I can get help here:
> 1. What's the expected interface for the energy term evaluator?
> 2. Should it be only implemented in C?
> 3. If not, what's the proper way of doing it in Python?
> Thanks in advance.
More information about the mmtk