[MMTK] Bug in MMTK.Universe.largestDistance()?
Konrad Hinsen
konrad.hinsen at laposte.net
Mon Jan 7 09:10:51 UTC 2008
On 04.01.2008, at 13:11, Andreas Kring wrote:
> I think there is a bug in MMTK.Universe.largestDistance(). An
> example of
> the error can be seen in the script below.
There is indeed a bug, but it is not where you think it is. The
calculation for orthogonal universes (including cubic ones) is
correct, but the one for non-orthogonal boxes isn't.
What largestDistance() should return is the largest interparticle
distance that can be represented in the universe independent of
orientation. In other words, the largest distance L is defined as the
largest L such that an atom A2 placed at a distance L from a given
atom A1 in an arbitrarily chosen direction will
make the minimum-image distance between A1 and A2 equal to L. For a
rectangular box, this makes L equal to half the shortest edge length.
This method is used in MMTK for checking cutoff radii for particle
interactions. For consistency, all real-space cutoffs should be less
than the number returned by universe.largestDistance(). For any
larger cutoff, the effective interaction volume of each atom is no
longer spherical.
Konrad.
--
---------------------------------------------------------------------
Konrad Hinsen
Centre de Biophysique Moléculaire, CNRS Orléans
Synchrotron Soleil - Division Expériences
Saint Aubin - BP 48
91192 Gif sur Yvette Cedex, France
Tel. +33-1 69 35 97 15
E-Mail: hinsen at cnrs-orleans.fr
---------------------------------------------------------------------
More information about the mmtk
mailing list