[MMTK] Temporary implementation of integrator in python

khinsen at cea.fr khinsen at cea.fr
Tue Sep 27 12:55:30 CEST 2005


On 27.09.2005, at 01:33, Rune Larsen wrote:

> and with the MMTK package. I've hoped to find a
> template integrator written intirely in python but
> I've only come across C implementations. Now I'am a

I have had a velocity-verlet implementation in Python lying around  
for a while, but I didn't think anyone would be interested... From  
the next release, it will be in the example collection. I'll send you  
a copy already, of course.

> Now for the questions :
>
> Does Universe.configration() return a real copi of the
> atom positions ?

No. If you want a copy, make one:  copy(universe.configuration())

> Does Universe.energy() evaluate the energy before
> returning ?

Yes.

> (risk of sounding stupid) Do I have to negate the
> energy gradient of
> Universe.energyAndGradient()
> to get the force or is it implied ? And are they both
> evaluated before they are returned ?

What you get is the gradient, so you do have to negate it if you want  
the forces. And yes, both are evaluated before they are returned.

> My integration is made within a for-loop, and I write
> a trajectory file using snapshot ... is there a better

That's just fine.

> way ? TrajectoryOutput takes "step numbers" as
> arguments but I dont know where to define the "step"

The snapshot generator generates th.em automatically, every snapshot  
counts as one step.

Konrad.
--
------------------------------------------------------------------------ 
-------
Konrad Hinsen
Laboratoire Leon Brillouin (CEA-CNRS), CEA Saclay,
91191 Gif-sur-Yvette Cedex, France
Tel.: +33-1 69 08 79 25
Fax: +33-1 69 08 82 61
E-Mail: khinsen at cea.fr
------------------------------------------------------------------------ 
-------





More information about the mmtk mailing list