JavaGenes, NASA Ames. Written largely by Al Globus

gov.nasa.javaGenes.forceFields
Class Bodies

java.lang.Object
  extended bygov.nasa.javaGenes.forceFields.MultiBodiesForOneEnergy
      extended bygov.nasa.javaGenes.forceFields.Bodies
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class Bodies
extends MultiBodiesForOneEnergy

Holds a set of bodies for a multibody potential to find the energy of

See Also:
Potential, Serialized Form

Field Summary
 OneBody[] oneBody
          this is public for fast access.
 
Fields inherited from class gov.nasa.javaGenes.forceFields.MultiBodiesForOneEnergy
molecule, multiBodies
 
Constructor Summary
Bodies()
           
Bodies(Molecule molecule)
           
 
Method Summary
 void createArrays()
          Must be called before this is handed to a potential.
static Bodies[] createArrays(java.util.Vector allBodies)
          converts a vector of bodies into an array of bodies and has all of the bodies convert the internal vectors into arrays for fast access
 OneBody[] getOneBodyArray()
           
static Bodies[] makeMultipleMolecules(Molecule[] molecules)
          Converts Molecules into Bodies untested
 void setSpeciesIndices(Species2IndexMap map)
          set the species indices in all the bodies for fast access
 java.lang.String toString()
           
 
Methods inherited from class gov.nasa.javaGenes.forceFields.MultiBodiesForOneEnergy
add, clone, deepCopyMultiBodiesForOneEnergy, get, getBodiesNames, getMolecule, getNumberOfAtoms, makeMoleculeAndBodiesFiles, removeBodiesAboveCutoff, scaleLengthsBy, scaleLengthsByAndReturnThis, size, writeThreeBodiesToTsdFile, writeTwoBodiesToTsdFile
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

oneBody

public OneBody[] oneBody
this is public for fast access. Access is often in an inner loop. multiBodies is converted to this.

Constructor Detail

Bodies

public Bodies()

Bodies

public Bodies(Molecule molecule)
Method Detail

getOneBodyArray

public OneBody[] getOneBodyArray()

setSpeciesIndices

public void setSpeciesIndices(Species2IndexMap map)
set the species indices in all the bodies for fast access


makeMultipleMolecules

public static Bodies[] makeMultipleMolecules(Molecule[] molecules)
Converts Molecules into Bodies untested

Returns:
an array of Bodies corresponding to molecules in the argument

createArrays

public void createArrays()
Must be called before this is handed to a potential. Converts Vectors to arrays for fast access.

Overrides:
createArrays in class MultiBodiesForOneEnergy

createArrays

public static Bodies[] createArrays(java.util.Vector allBodies)
converts a vector of bodies into an array of bodies and has all of the bodies convert the internal vectors into arrays for fast access


toString

public java.lang.String toString()

JavaGenes, NASA Ames. Written largely by Al Globus