core.pbc
Class PBC

java.lang.Object
  extended bycore.pbc.PBC
Direct Known Subclasses:
PBC_RectBox, PBC_TruncOct

public class PBC
extends java.lang.Object

PBC (Periodic Boundary Condition).

Utilities for handling periodic boundary conditions, such as nearest images and gathering procedures.

Currently supported boundary conditions are:

Often-used gather methods are:

Since:
0.1
Version:
0.1, January 2005
Author:
Mika Kastenholz, Vincent Kraeutler
See Also:
PBC_RectBox, PBC_TruncOct

Nested Class Summary
(package private)  class PBC.ByMoleculeGatherer
           
(package private)  class PBC.CoGGatherer
           
(package private)  class PBC.G96Gatherer
           
(package private) static interface PBC.Gatherer
           
(package private)  class PBC.InBoxGatherer
          gathers all molecules first individually and moves them afterwards into the central box.
 
Field Summary
 PBC.Gatherer gatherMethod
          Comment for gatherMethod
 
Constructor Summary
PBC(java.lang.String gatherName)
          Vacuum is he vanilla periodic boundary condition.
 
Method Summary
static void boxCheck(double[] box)
           
 double[][] gather(double[][] pos, int[] boundaryatoms, double[] box)
           
static PBC getPbc(java.lang.String pbc, java.lang.String gatherMethod)
          simple pbc selector.
 double[] nearestImage(double[] v1, double[] v2, double[] box)
          Return 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

gatherMethod

public final PBC.Gatherer gatherMethod
Comment for gatherMethod

Constructor Detail

PBC

public PBC(java.lang.String gatherName)
    throws java.lang.IllegalArgumentException
Vacuum is he vanilla periodic boundary condition.

Parameters:
gatherName -
Throws:
java.lang.IllegalArgumentException
Method Detail

getPbc

public static PBC getPbc(java.lang.String pbc,
                         java.lang.String gatherMethod)

simple pbc selector.

returns the PBC subclass and Gatherer appropriate for its arguments. mostly because jython and mathematica seem to have a bit of an issue with nested classes.

Parameters:
pbc - pbc-specifier
gatherMethod - gather method specifier
Returns:
the appropriate periodic boundary condition

nearestImage

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

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

boxCheck

public static void boxCheck(double[] box)

gather

public double[][] gather(double[][] pos,
                         int[] boundaryatoms,
                         double[] box)