core.pbc
Class NearestImage

java.lang.Object
  extended bycore.pbc.NearestImage

public class NearestImage
extends java.lang.Object

Author:
vincent

Field Summary
static int rectangularType
           
static int truncatedOctahedralType
           
static int vacuumType
           
 
Constructor Summary
NearestImage()
           
 
Method Summary
static void boxCheck(double[] box)
           
 double[] nearestImage(double[] v1, double[] v2, double[] box, int boundaryType)
          Return the nearest image of v2 with respect to v1.
 double[] nearestImageRectangular(double[] v1, double[] v2, double[] box)
          The nearest image of v2 with respect to v1 under rectangular boundary conditions.
 double[] nearestImageTruncatedOctahedron(double[] v1, double[] v2, double[] box)
          The nearest image of v2 with respect to v1 under truncated octahedral boundary conditions.
 double[] nearestImageVacuum(double[] v1, double[] v2, double[] box)
          The nearest image of v2 with respect to v1.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vacuumType

public static final int vacuumType
See Also:
Constant Field Values

rectangularType

public static final int rectangularType
See Also:
Constant Field Values

truncatedOctahedralType

public static final int truncatedOctahedralType
See Also:
Constant Field Values
Constructor Detail

NearestImage

public NearestImage()
Method Detail

boxCheck

public static void boxCheck(double[] box)

nearestImage

public double[] nearestImage(double[] v1,
                             double[] v2,
                             double[] box,
                             int boundaryType)
Return the nearest image of v2 with respect to v1.

Parameters:
v1 -
v2 -
box -
Returns:
the position of the nearest image of v2

nearestImageVacuum

public double[] nearestImageVacuum(double[] v1,
                                   double[] v2,
                                   double[] box)
The nearest image of v2 with respect to v1. Under non-periodic boundary conditions, that's just v2.

Parameters:
v1 -
v2 -
box -
Returns:
v2

nearestImageRectangular

public double[] nearestImageRectangular(double[] v1,
                                        double[] v2,
                                        double[] box)
The nearest image of v2 with respect to v1 under rectangular boundary conditions.

Parameters:
v1 -
v2 -
box -
Returns:

nearestImageTruncatedOctahedron

public double[] nearestImageTruncatedOctahedron(double[] v1,
                                                double[] v2,
                                                double[] box)
The nearest image of v2 with respect to v1 under truncated octahedral boundary conditions.

Parameters:
v1 -
v2 -
box -
Returns: