meshi.energy.simpleEnergyTerms.bond
Class BondEnergy

java.lang.Object
  extended by meshi.energy.AbstractEnergy
      extended by meshi.energy.simpleEnergyTerms.SimpleEnergyTerm
          extended by meshi.energy.simpleEnergyTerms.bond.BondEnergy
All Implemented Interfaces:
Attributable, Updateable

public class BondEnergy
extends SimpleEnergyTerm

Bond energy term. Has the general form Eb = SIGMAi(Ki(Di-D0i)^2) where Di is the distance between the two bonded atoms, D0i is their expected average distance (depends on their types) and Ki is a force constant that again, depends on the atom types.
This class is used for both calculating the bond-energy term of an energy function and for updating the forces on each atom accordingly. It is assumed that the list of bonds is constant during the simulation. That is no bonds are made or broken.


Nested Class Summary
 
Nested classes/interfaces inherited from class meshi.energy.AbstractEnergy
AbstractEnergy.UpdateableList
 
Field Summary
protected  DistanceMatrix distanceMatrix
          The constructor associates any bond with its parameters.
 
Fields inherited from class meshi.energy.simpleEnergyTerms.SimpleEnergyTerm
elementsList, parametersList
 
Fields inherited from class meshi.energy.AbstractEnergy
comment, filter, INFINITY, NaN, on, updateableResources, weight
 
Constructor Summary
BondEnergy()
           
BondEnergy(AtomPairList bondList, DistanceMatrix distanceMatrix, BondParametersList parametersList, double weight)
           
 
Method Summary
 EnergyElement createElement(java.lang.Object baseElement, Parameters parameters)
           
 void removeBadBonds(double farAway)
           
 
Methods inherited from class meshi.energy.simpleEnergyTerms.SimpleEnergyTerm
createElementsList, elementsList, evaluate, evaluateAtoms, test
 
Methods inherited from class meshi.energy.AbstractEnergy
addAttribute, comment, getAttribute, handleMissingParameters, isOn, off, on, toArray, toArray, toArray, toArray, toString, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

distanceMatrix

protected DistanceMatrix distanceMatrix
The constructor associates any bond with its parameters.

Constructor Detail

BondEnergy

public BondEnergy()

BondEnergy

public BondEnergy(AtomPairList bondList,
                  DistanceMatrix distanceMatrix,
                  BondParametersList parametersList,
                  double weight)
Method Detail

createElement

public EnergyElement createElement(java.lang.Object baseElement,
                                   Parameters parameters)
Specified by:
createElement in class SimpleEnergyTerm

removeBadBonds

public void removeBadBonds(double farAway)