etomica.atom
Class AtomPositionGeometricCenterPBC

java.lang.Object
  extended by etomica.atom.AtomPositionGeometricCenterPBC
All Implemented Interfaces:
IAtomPositionDefinition, Serializable

public class AtomPositionGeometricCenterPBC
extends Object
implements IAtomPositionDefinition, Serializable

Calculates the geometric center over a set of atoms. The position of the atom or child atoms are accumulated and used to compute their center (unweighted by mass). Calculated center is obtained via the getPosition method. This implementation handles molecules that span the periodic boundaries. The returned position will always be within the boundary.

See Also:
Serialized Form

Field Summary
protected  IBoundary boundary
           
protected  IVectorMutable center
           
protected  IVectorMutable dr
           
 
Constructor Summary
AtomPositionGeometricCenterPBC(ISpace space, IBoundary boundary)
           
 
Method Summary
 IVector position(IMolecule atom)
          Returns the defined position for the given atom, which may be an atom group.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

center

protected final IVectorMutable center

dr

protected final IVectorMutable dr

boundary

protected final IBoundary boundary
Constructor Detail

AtomPositionGeometricCenterPBC

public AtomPositionGeometricCenterPBC(ISpace space,
                                      IBoundary boundary)
Method Detail

position

public IVector position(IMolecule atom)
Description copied from interface: IAtomPositionDefinition
Returns the defined position for the given atom, which may be an atom group.

Specified by:
position in interface IAtomPositionDefinition