[MMTK] Bug in MMTK.Universe.largestDistance()?
Andreas Kring
akring1729 at gmail.com
Mon Jan 7 09:23:26 UTC 2008
Konrad Hinsen skrev:
> 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.
>
Ok, I miss understood what the method does - thanks for clarifying this.
Kind regards
Andreas
More information about the mmtk
mailing list