[MMTK] Partial energy computation

Konrad Hinsen hinsen at cnrs-orleans.fr
Wed Nov 19 21:33:14 CET 2003

On Wednesday 19 November 2003 19:25, Dmitriy Morozov wrote:

> Why does the following happen? When I run the code (attached) the
> time that it takes to compute the energy for each half of the
> atoms of the protein is almost the same as for the whole
> protein, and the time that it takes to compute the energy for

In your script, you calculate each energy only once. In the first call for 
each subsystem, the internal data structures (list of bond and angle terms, 
Lennard-Jones parameters, etc.) are set up, which is a rather expensive 
procedure. What you are measuring is probably just that.

To get a more realistic measure for repeated energy evaluations, calculate 
each energy twice in sequence and measure the time for the second evaluation.

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