etomica.util
Class Debug

java.lang.Object
  extended by etomica.util.Debug

public final class Debug
extends Object

Class holding static fields that determine whether debugging is on, how much, what types and what (if anything) should be looked at specifically.


Field Summary
static double ATOM_SIZE
          The minimum allowable distance between Atoms.
static int ATOM1_INDEX
          Atom index of first atom of interest.
static int ATOM2_INDEX
          Atom index of second atom of interest.
static int BOX_INDEX
          index of box of interest.
static boolean DEBUG_NOW
          true if debugging is currently enabled (when the integrator reaches step START)
protected static MoleculePair debugMoleculePair
           
protected static AtomPair debugPair
           
static long LEVEL
          debugging level.
static int MOLECULE1_INDEX
          Molecule index of a molecule of interest.
static int MOLECULE2_INDEX
          Global index of a molecule of interest.
static boolean ON
          true if any debugging should be done
static int SPECIES1_INDEX
           
static int SPECIES2_INDEX
           
static long START
          what step of the integrator debugging should start from.
static long stepCount
          Provides step count to other pieces of code that want to know the step count.
static long STOP
          what step of the integrator should the simulation bail set this to prevent Etomica from running for a long time while outputting debugging information (potentially filling up the disk)
 
Constructor Summary
Debug()
           
 
Method Summary
static boolean allAtoms(IAtomList atoms)
          determines if all of the atoms in the given array are set to be debugged (via ATOMx_NUM and setAtoms(box)).
static boolean allAtoms(IMoleculeList atoms)
          determines if all of the atoms in the given array are set to be debugged (via ATOMx_NUM and setAtoms(box)).
static boolean anyAtom(IAtomList atoms)
          determines whether any of the atoms in the given array are set to be debugged (via ATOMx_NUM)
static boolean anyMolecule(IMoleculeList atoms)
          determines whether any of the atoms in the given array are set to be debugged (via ATOMx_NUM)
static IAtom getAtomLeaf1(IBox box)
          Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box.
static AtomPair getAtoms(IBox box)
          Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box.
static MoleculePair getMolecules(IBox box)
          Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box.
static boolean thisBox(IBox box)
          Checks whether the given box is of debugging interest
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

debugPair

protected static AtomPair debugPair

debugMoleculePair

protected static MoleculePair debugMoleculePair

ON

public static final boolean ON
true if any debugging should be done

See Also:
Constant Field Values

START

public static long START
what step of the integrator debugging should start from. to get debugging to start before Integrator.run, explicitly set DEBUG_NOW to true.


STOP

public static long STOP
what step of the integrator should the simulation bail set this to prevent Etomica from running for a long time while outputting debugging information (potentially filling up the disk)


LEVEL

public static long LEVEL
debugging level. A higher level means more debugging performance should suffer as the level goes up, and finding useful information might get difficult.


stepCount

public static long stepCount
Provides step count to other pieces of code that want to know the step count. This is set by Activity/ActionIntegrate, or anything else that might be driving the simulation.


DEBUG_NOW

public static boolean DEBUG_NOW
true if debugging is currently enabled (when the integrator reaches step START)


ATOM1_INDEX

public static final int ATOM1_INDEX
Atom index of first atom of interest. More debugging information will be printed out about this particular atom. -1 indicates no particular atom.

See Also:
Constant Field Values

ATOM2_INDEX

public static final int ATOM2_INDEX
Atom index of second atom of interest. This is often used in conjunction with ATOM1_INDEX to collect information about a pair of atoms. -1 indicates no particular atom.

See Also:
Constant Field Values

MOLECULE1_INDEX

public static final int MOLECULE1_INDEX
Molecule index of a molecule of interest. More debugging information will be printed out about atoms within this molecule. -1 indicates no particular atom.

See Also:
Constant Field Values

MOLECULE2_INDEX

public static final int MOLECULE2_INDEX
Global index of a molecule of interest. This is often used in conjunction with MOLECULE2_INDEX to collect information about a pair of molecules. -1 indicates no particular atom.

See Also:
Constant Field Values

SPECIES1_INDEX

public static final int SPECIES1_INDEX
See Also:
Constant Field Values

SPECIES2_INDEX

public static final int SPECIES2_INDEX
See Also:
Constant Field Values

BOX_INDEX

public static final int BOX_INDEX
index of box of interest. -1 indicates no particular box.

See Also:
Constant Field Values

ATOM_SIZE

public static final double ATOM_SIZE
The minimum allowable distance between Atoms.

See Also:
Constant Field Values
Constructor Detail

Debug

public Debug()
Method Detail

anyAtom

public static boolean anyAtom(IAtomList atoms)
determines whether any of the atoms in the given array are set to be debugged (via ATOMx_NUM)

Parameters:
atoms - array of atoms to be checked for debugging status
Returns:
true if any of the atoms in the atoms array should be debugged

anyMolecule

public static boolean anyMolecule(IMoleculeList atoms)
determines whether any of the atoms in the given array are set to be debugged (via ATOMx_NUM)

Parameters:
atoms - array of atoms to be checked for debugging status
Returns:
true if any of the atoms in the atoms array should be debugged

allAtoms

public static boolean allAtoms(IAtomList atoms)
determines if all of the atoms in the given array are set to be debugged (via ATOMx_NUM and setAtoms(box)).

Parameters:
atoms - array of atoms to be checked for debugging status
Returns:
true if all of the atoms in the atoms array should be debugged

allAtoms

public static boolean allAtoms(IMoleculeList atoms)
determines if all of the atoms in the given array are set to be debugged (via ATOMx_NUM and setAtoms(box)).

Parameters:
atoms - array of atoms to be checked for debugging status
Returns:
true if all of the atoms in the atoms array should be debugged

thisBox

public static boolean thisBox(IBox box)
Checks whether the given box is of debugging interest

Parameters:
box - to be checked
Returns:
true if the box is of interest

getAtoms

public static AtomPair getAtoms(IBox box)
Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box. The atom in the AtomPair will be null if the box does not contain an Atom with the proper global index.


getMolecules

public static MoleculePair getMolecules(IBox box)
Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box. The atom in the AtomPair will be null if the box does not contain an Atom with the proper global index.


getAtomLeaf1

public static IAtom getAtomLeaf1(IBox box)
Returns an AtomPair containing the two atoms with global indices ATOM1_INDEX and ATOM2_INDEX within the given box. The atom in the AtomPair will be null if the box does not contain an Atom with the proper global index.