[MMTK] Errors when running example in manual

Konrad Hinsen hinsen at cnrs-orleans.fr
Mon Aug 11 16:18:30 EDT 2003

On Monday 11 August 2003 13:11, Michiel Jan Laurens de Hoon wrote:

> 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?

There's a simple typo:

>  >>> from MMTK import*
>  >>> from MMTK.ForceFields import Amber94ForceField
>  >>> from MMTK.Trajectory import Trajectory, TrajectoryOutput,
> StandardLogOutput
>  >>> from MMTK.Dynamics import VelocityVerletIntegrator
>  >>> universe = InfiniteUniverse(Amber94ForceField)

You forgot the brackets after Amber94ForceField.

Normally this would mean passing a class object instead of a class instance, 
and you would get a rather clear error message. Force field classes are a bit 
different though, because they correspond to modules that are loaded 
dynamically. This explains the error message, which is presumably not clear 
at all. But that can be fixed.

Konrad Hinsen                            | E-Mail: hinsen at cnrs-orleans.fr
Centre de Biophysique Moleculaire (CNRS) | Tel.: +33-
Rue Charles Sadron                       | Fax:  +33-
45071 Orleans Cedex 2                    | Deutsch/Esperanto/English/
France                                   | Nederlands/Francais

More information about the mmtk mailing list