etomica.action
Class BoxImposePbc

java.lang.Object
  extended by etomica.action.BoxActionAdapter
      extended by etomica.action.BoxImposePbc
All Implemented Interfaces:
BoxAction, IAction, Serializable

public class BoxImposePbc
extends BoxActionAdapter

Action that imposes the central-image effect of a box having periodic boundaries. Causes all atoms with coordinates outside the box boundaries to be moved to the central-image location (inside the boundaries).

See Also:
Serialized Form

Field Summary
 
Fields inherited from class etomica.action.BoxActionAdapter
box
 
Constructor Summary
BoxImposePbc(IBox box, ISpace space)
          Creates the action ready to perform on the given box.
BoxImposePbc(ISpace space)
          Creates the action without specifying a box.
 
Method Summary
 void actionPerformed()
          Completes the action defined by the class implementing this interface.
 IAtomPositionDefinition getPositionDefinition()
           
 int getPriority()
           
 boolean isApplyToMolecules()
          Returns the value of applyToMolecules.
 void setApplyToMolecules(boolean applyToMolecules)
          Sets a flag indicating whether periodic boundaries are applied to the molecules (true), or to the atoms (false).
 void setPositionDefinition(IAtomPositionDefinition positionDefinition)
           
 
Methods inherited from class etomica.action.BoxActionAdapter
getBox, setBox
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BoxImposePbc

public BoxImposePbc(ISpace space)
Creates the action without specifying a box. Requires call to setBox before action can have any effect. Default is to apply central-imaging at the atom rather than molecule level.


BoxImposePbc

public BoxImposePbc(IBox box,
                    ISpace space)
Creates the action ready to perform on the given box.

Parameters:
box -
Method Detail

getPriority

public int getPriority()

actionPerformed

public void actionPerformed()
Description copied from interface: IAction
Completes the action defined by the class implementing this interface.


isApplyToMolecules

public boolean isApplyToMolecules()
Returns the value of applyToMolecules.

Returns:
boolean

setApplyToMolecules

public void setApplyToMolecules(boolean applyToMolecules)
Sets a flag indicating whether periodic boundaries are applied to the molecules (true), or to the atoms (false). If applied to the atoms (the default case), then central imaging is done to each atom individually, which could cause a molecule to be split, with some of its atoms on one edge of the simulation box, and others on the other edge. If applied to molecules, the entire molecule will be shifted as a whole when enforcing central imaging.

Parameters:
applyToMolecules - The new value of the flag.

setPositionDefinition

public void setPositionDefinition(IAtomPositionDefinition positionDefinition)

getPositionDefinition

public IAtomPositionDefinition getPositionDefinition()