etomica.nbr
Class CriterionInterMolecular

java.lang.Object
  extended by etomica.nbr.CriterionAdapter
      extended by etomica.nbr.CriterionInterMolecular
All Implemented Interfaces:
NeighborCriterion, Serializable

public class CriterionInterMolecular
extends CriterionAdapter

Pair criterion that judges whether two atoms are or are not in the same molecule. Intermolecular pairs are always accepted. An optional intramolecular may be used to filter out intramolecular pairs.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class etomica.nbr.CriterionAdapter
subCriterion
 
Constructor Summary
CriterionInterMolecular(NeighborCriterion criterion)
          Constructs criterion in default state such that intramolecular pairs are rejected, and intermolecular pairs are accepted.
 
Method Summary
 boolean accept(IAtomList pair)
          Implementation of this method should introduce new criterion and return true if pair meets this criterion and that of the wrapped NeighborCriterion.
 NeighborCriterion getIntraMolecularCriterion()
          Returns the intramolecular criterion, or null if none is in use.
 void setIntraMolecularCriterion(NeighborCriterion criterion)
          Configures to use the given criterion for intramolecular pairs.
 
Methods inherited from class etomica.nbr.CriterionAdapter
getWrappedCriterion, needUpdate, reset, setBox, unsafe
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CriterionInterMolecular

public CriterionInterMolecular(NeighborCriterion criterion)
Constructs criterion in default state such that intramolecular pairs are rejected, and intermolecular pairs are accepted.

Method Detail

setIntraMolecularCriterion

public void setIntraMolecularCriterion(NeighborCriterion criterion)
Configures to use the given criterion for intramolecular pairs.


getIntraMolecularCriterion

public NeighborCriterion getIntraMolecularCriterion()
Returns the intramolecular criterion, or null if none is in use.


accept

public boolean accept(IAtomList pair)
Description copied from class: CriterionAdapter
Implementation of this method should introduce new criterion and return true if pair meets this criterion and that of the wrapped NeighborCriterion.

Specified by:
accept in interface NeighborCriterion
Specified by:
accept in class CriterionAdapter