SV: Re: [MMTK] Temporary implementation of integrator in python
praerieove at yahoo.com
Wed Sep 28 12:22:20 CEST 2005
--- khinsen at cea.fr skrev:
> 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
> 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
> > atom positions ?
> No. If you want a copy, make one:
> > Does Universe.energy() evaluate the energy before
> > returning ?
> > (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
> > 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
> > a trajectory file using snapshot ... is there a
> That's just fine.
> > way ? TrajectoryOutput takes "step numbers" as
> > arguments but I dont know where to define the
> The snapshot generator generates th.em
> automatically, every snapshot
> counts as one step.
Thank you for the fast reply. The python verlet
implementation helped a lot.
I have just one more question. I would like to use the
TrajectoryAction objects: TranslationRemover and
RotationRemover. How can I call these two methods from
within my integrator ?. My Integrator is derived from
More information about the mmtk