Package src :: Package toplevel :: Module Energies :: Class Energies
[hide private]
[frames] | no frames]

Class Energies

source code

??-4 --+
       |
      Energies

Holds the system energies These include: potential (bond, angle, ...) and kinetic.

Inherits from precompiled class ScalarStructure This manages energies in a table. The inherited method getTable() will index this table.

This provides several inherited methods which are used:

Instance Methods [hide private]
 
initialize(self, phys) source code
Energies
computeMolecularVirial(self)
Tells the energies structure to include the molecular virial tensor when calculating terms.
source code
Energies
computeVirial(self)
Tells the energies structure to include the virial tensor when calculating terms.
source code
 
addBondEnergy(self, r)
Accumulate into the bond energy
source code
 
addAngleEnergy(self, r)
Accumulate into the angle energy
source code
 
addDihedralEnergy(self, r)
Accumulate into the dihedral energy
source code
 
addImproperEnergy(self, r)
Accumulate into the improper energy
source code
 
addShadowEnergy(self, r)
Accumulate into the shadow energy
source code
 
addCoulombEnergy(self, r)
Accumulate into the electrostatic energy
source code
 
addLJEnergy(self, r)
Accumulate into the van der Waals energy
source code
float
coulombEnergy(self)
Returns: Electrostatic energy
source code
float
ljEnergy(self)
Returns: van der Waals energy
source code
float
bondEnergy(self)
Returns: Energy due to two-atom bond deviations from equilibrium lengths.
source code
float
angleEnergy(self)
Returns: Energy due to three-atom angle deviations from equilibrium angles.
source code
float
dihedralEnergy(self)
Returns: Energy due to four-atom dihedral deviations from equilibrium angles.
source code
float
improperEnergy(self)
Returns: Energy due to four-atom improper deviations from equilibrium angles.
source code
float
shadowEnergy(self)
Returns: Shadow energy.
source code
float
kineticEnergy(self, phys)
Returns: Kinetic energy, as a sum of 0.5*m*v^2 for each atom.
source code
float
potentialEnergy(self, phys)
Returns: Potential energy
source code
float
totalEnergy(self, phys)
Returns: Total energy, as a sum of potential and kinetic.
source code
Instance Variables [hide private]
  phys
Physical object
Method Details [hide private]

computeMolecularVirial(self)

source code 

Tells the energies structure to include the molecular virial tensor when calculating terms.

Returns: Energies
The previous state without the virial.

computeVirial(self)

source code 

Tells the energies structure to include the virial tensor when calculating terms.

Returns: Energies
The previous state without the virial.

addBondEnergy(self, r)

source code 

Accumulate into the bond energy

Parameters:
  • r (float) - Quantity to accumulate.

addAngleEnergy(self, r)

source code 

Accumulate into the angle energy

Parameters:
  • r (float) - Quantity to accumulate.

addDihedralEnergy(self, r)

source code 

Accumulate into the dihedral energy

Parameters:
  • r (float) - Quantity to accumulate.

addImproperEnergy(self, r)

source code 

Accumulate into the improper energy

Parameters:
  • r (float) - Quantity to accumulate.

addShadowEnergy(self, r)

source code 

Accumulate into the shadow energy

Parameters:
  • r (float) - Quantity to accumulate.

addCoulombEnergy(self, r)

source code 

Accumulate into the electrostatic energy

Parameters:
  • r (float) - Quantity to accumulate.

addLJEnergy(self, r)

source code 

Accumulate into the van der Waals energy

Parameters:
  • r (float) - Quantity to accumulate.

coulombEnergy(self)

source code 
Returns: float
Electrostatic energy

ljEnergy(self)

source code 
Returns: float
van der Waals energy

bondEnergy(self)

source code 
Returns: float
Energy due to two-atom bond deviations from equilibrium lengths.

angleEnergy(self)

source code 
Returns: float
Energy due to three-atom angle deviations from equilibrium angles.

dihedralEnergy(self)

source code 
Returns: float
Energy due to four-atom dihedral deviations from equilibrium angles.

improperEnergy(self)

source code 
Returns: float
Energy due to four-atom improper deviations from equilibrium angles.

shadowEnergy(self)

source code 
Returns: float
Shadow energy.

kineticEnergy(self, phys)

source code 
Parameters:
  • phys (Physical) - Physical system.
Returns: float
Kinetic energy, as a sum of 0.5*m*v^2 for each atom.

potentialEnergy(self, phys)

source code 
Parameters:
  • phys (Physical) - Physical system.
Returns: float
Potential energy

totalEnergy(self, phys)

source code 
Parameters:
  • phys (Physical) - Physical system.
Returns: float
Total energy, as a sum of potential and kinetic.