meshi.energy.pairwiseNonBondedTerms.CoulombElectrostatics
Class CoulombElectrostaticEnergyElement

java.lang.Object
  extended by meshi.energy.EnergyElement
      extended by meshi.energy.pairwiseNonBondedTerms.NonBondedEnergyElement
          extended by meshi.energy.pairwiseNonBondedTerms.CoulombElectrostatics.CoulombElectrostaticEnergyElement

public class CoulombElectrostaticEnergyElement
extends NonBondedEnergyElement

This object represents Electrostatic Energy between two Atoms. It updates the energy according to the change in their distance and position.


Field Summary
static double ALPHA
           
protected  Atom atom1
           
protected  int atom1Number
           
protected  Atom atom2
           
protected  int atom2Number
           
protected  double[] charges
           
protected  double contact
           
protected  double dCdD
           
protected  double dCdX
           
protected  double dCdY
           
protected  double dCdZ
           
protected  double dEdD
           
protected  double dEdX
           
protected  double dEdY
           
protected  double dEdZ
           
protected  double dielectricConstant
           
protected  DistanceMatrix distanceMatrix
           
protected  double energy
           
private  int FIRST
           
protected  boolean frozen
           
static double MAX_ENERGY
           
protected  double q1
           
protected  double q2
           
protected  double rMax
           
private  int SECOND
           
protected  double weight
           
 
Fields inherited from class meshi.energy.EnergyElement
atoms, dFormatSrt, dFormatStd, DX, relativeDiffTolerance, VERY_SMALL, XYZ
 
Constructor Summary
CoulombElectrostaticEnergyElement()
          default constructor
CoulombElectrostaticEnergyElement(DistanceMatrix distanceMatrix, double weight, double dielectricConstant, double[] charges)
          constructor
 
Method Summary
 double contact()
           
 double contact(double weight)
           
 double contactAtoms(double weight)
           
 double dEdXAtom(int index)
           
 double dEdYAtom(int index)
           
 double dEdZAtom(int index)
           
 double evaluate()
          evaluate - 1) Invokes updateEnergy() - updates the energy, 2) Invokes updateAtoms() - updates the atoms' position.
 void set(java.lang.Object obj)
          Sets the relevant charge values for each atom in an atom pair.
protected  void setAtoms()
          setAtoms
 java.lang.String toString()
          toString
 void updateAtoms()
          Updates the atoms position
 double updateEnergy()
          Updates the energy
 
Methods inherited from class meshi.energy.EnergyElement
atoms, evaluateAtoms, frozen, test, updateFrozen
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

MAX_ENERGY

public static final double MAX_ENERGY
See Also:
Constant Field Values

ALPHA

public static final double ALPHA
See Also:
Constant Field Values

distanceMatrix

protected DistanceMatrix distanceMatrix

atom1

protected Atom atom1

atom2

protected Atom atom2

atom1Number

protected int atom1Number

atom2Number

protected int atom2Number

dielectricConstant

protected double dielectricConstant

q1

protected double q1

q2

protected double q2

frozen

protected boolean frozen

dEdD

protected double dEdD

dEdX

protected double dEdX

dEdY

protected double dEdY

dEdZ

protected double dEdZ

energy

protected double energy

weight

protected double weight

rMax

protected double rMax

contact

protected double contact

dCdD

protected double dCdD

dCdX

protected double dCdX

dCdY

protected double dCdY

dCdZ

protected double dCdZ

FIRST

private final int FIRST
See Also:
Constant Field Values

SECOND

private final int SECOND
See Also:
Constant Field Values

charges

protected double[] charges
Constructor Detail

CoulombElectrostaticEnergyElement

public CoulombElectrostaticEnergyElement()
default constructor


CoulombElectrostaticEnergyElement

public CoulombElectrostaticEnergyElement(DistanceMatrix distanceMatrix,
                                         double weight,
                                         double dielectricConstant,
                                         double[] charges)
constructor

Parameters:
distanceMatrix -
weight -
dielectricConstant -
charges -
Method Detail

setAtoms

protected void setAtoms()
setAtoms

Specified by:
setAtoms in class EnergyElement

set

public void set(java.lang.Object obj)
Sets the relevant charge values for each atom in an atom pair. The data is taken from the parameter list.

Specified by:
set in class NonBondedEnergyElement
Parameters:
obj - an AtomPair

evaluate

public double evaluate()
evaluate - 1) Invokes updateEnergy() - updates the energy, 2) Invokes updateAtoms() - updates the atoms' position.

Specified by:
evaluate in class EnergyElement
Returns:
double - energy*weight

updateEnergy

public double updateEnergy()
Updates the energy

Returns:
double - energy*weight

updateAtoms

public void updateAtoms()
Updates the atoms position


contactAtoms

public double contactAtoms(double weight)
Parameters:
weight -
Returns:
double

dEdXAtom

public double dEdXAtom(int index)
Parameters:
index -
Returns:
double

dEdYAtom

public double dEdYAtom(int index)
Parameters:
index -
Returns:
double

dEdZAtom

public double dEdZAtom(int index)
Parameters:
index -
Returns:
double

contact

public double contact(double weight)
Parameters:
weight -
Returns:
double

contact

public double contact()
Returns:
double

toString

public java.lang.String toString()
toString

Overrides:
toString in class java.lang.Object
Returns:
String