espressomd-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ESPResSo-devel] rescale_forces


From: Markus Deserno
Subject: Re: [ESPResSo-devel] rescale_forces
Date: Thu, 04 Oct 2007 09:08:12 -0400
User-agent: Thunderbird 2.0.0.6 (X11/20070801)

Hello Ulf,

> I'm working on a 2nd-order integrator for velocity dependent forces
> (e.g. Langevin, LB). I'm wondering why in the VV integrator the forces
> are scaled with 0.5*dt^2. Is it because otherwise the multiplication
> would have to be performed twice? Has anybody ever measured whether we
> actually gain performance by this? In the new integrator forces are only
> applied once, hence one could save the writing to memory of the scaled
> forces. On the other hand, a different convention could be a potential
> source of confusion which I would like to avoid.

I think this is a remnant of the woebegone days where every single
multiplication
was precious.  If you look at the "simple" scheme of VV, you see that the
accelerations are multiplied with 0.5*dt^2, while the velocities are
multiplied
with dt.  Hence, in earlier days people have come into the habit of
including
these factors into forces and velocities, so that they don't have to be
multiplied
in each time-step when the velocity and position updating happens.

Alas, I think that was probably a bad idea even back then, because in any
decent MD program you spend your time in the force calculations or other
important steps, certainly not in the updating of the coordinates and
velocities
(unless you're simulating an ideal gas, that is).  And yes, it is a
superb source
of confusion.  But Allen/Tildesley talk about it in their book, so it's
sacrosanct.

Now that the integrators we're using have matured into significantly more
complex bits of code, I'd almost guess that readability will outplay this
petty multiplication saving, and I think it'd not be heretic to have a
discussion
whether in the name of clarity this can be cleaned up.  But of course, I
might
be wrong, since I'm not an expert bit-cruncher.

Best,

Markus

-- 
Dr. Markus Deserno
Associate Professor of Physics    ++1-412-268-4401 (office)
Carnegie Mellon University        ++1-412-681-0648 (fax)
5000 Forbes Avenue                ++1-412-268-2740 (Donna Thomas)
Pittsburgh, PA 15213              address@hidden




reply via email to

[Prev in Thread] Current Thread [Next in Thread]