Loading...
Searching...
No Matches
AsapPotential Class Referenceabstract

Abstract base class of all potentials. More...

#include <Potential.h>

Inheritance diagram for AsapPotential:

Public Member Functions

virtual ~AsapPotential ()
virtual void SetAtoms (Atoms *a)=0
 Set the atoms belonging to this potential.
virtual double GetPotentialEnergy ()=0
 Calculate the total energy of the system.
virtual const VecGetCartesianForces ()=0
 Calculate the forces on all atoms and return the result.
virtual const symTensorGetStresses (const Vec *momenta=0)=0
 Calculate the stress on all atoms.
virtual void GetStress (double stress[6], const Vec *momenta=0)=0
 Calculate the total stress of the system.
virtual const double * GetPotentialEnergies ()=0
 Calculate the energy of all atoms.
virtual void CheckNeighborLists ()=0
virtual double CalculateLatticeEnergy (const Vec a[3])
 Calculate the energy of an atom in a regular fcc(?) lattice.
virtual void CalculateDerivatives (const Vec a[3], double dEdaDota[6])
 Calculate derivative of the energy of an atom in a regular lattice.
virtual double GetData () const
 Get data used by the QuasiContinuum method.
virtual double GetCutoffRadius () const =0
 Return the cutoff radius used in the potential.
virtual double GetLatticeConstant () const =0
 Return the lattice constant of the material, if well-defined.
virtual void UpdateSuperCell (const SuperCell *newSuperCell)=0
 Tell the Potential that a new SuperCell has been assigned to the atoms.
virtual int GetNumberOfAtoms () const =0
 Get the number of atoms.

Detailed Description

Abstract base class of all potentials.

A Potential calculates forces, energies and stresses for a list of atoms. A given instance of a Potential is associated with a specific Atoms object on a one-to-one bases, this is established when Atoms.SetCalculator() is called.

Two types of classes are derived from Potential.

  • Concrete implementations of potentials, such as EMT and MoPotential.
  • Potentials wrapping concrete implementations, but providing special functionalily, such as ParallelPotential (implementing parallel simulations) or QCPotential (implementing the QuasiContinuum method).

Definition at line 29 of file Potential.h.

Constructor & Destructor Documentation

◆ ~AsapPotential()

virtual AsapPotential::~AsapPotential ( )
inlinevirtual

Definition at line 31 of file Potential.h.

31{}

Member Function Documentation

◆ CalculateDerivatives()

virtual void AsapPotential::CalculateDerivatives ( const Vec a[3],
double dEdaDota[6] )
inlinevirtual

Calculate derivative of the energy of an atom in a regular lattice.

Used by the QuasiContinuum method.

Reimplemented in EMT.

Definition at line 77 of file Potential.h.

77 {
78 throw Exception("The QC method is not implemented for this potential");
79 }

◆ CalculateLatticeEnergy()

virtual double AsapPotential::CalculateLatticeEnergy ( const Vec a[3])
inlinevirtual

Calculate the energy of an atom in a regular fcc(?) lattice.

Given the lattice vectors, this function calculates the energy of a single atom in the lattice. Used for the QuasiContinuum method.

Reimplemented in EMT.

Definition at line 68 of file Potential.h.

68 {
69 throw Exception("The QC method is not implemented for this potential");
70 return 0.0;
71 }

◆ CheckNeighborLists()

virtual void AsapPotential::CheckNeighborLists ( )
pure virtual

Implemented in EMT.

◆ GetCartesianForces()

virtual const Vec * AsapPotential::GetCartesianForces ( )
pure virtual

Calculate the forces on all atoms and return the result.

Implemented in EMT.

◆ GetCutoffRadius()

virtual double AsapPotential::GetCutoffRadius ( ) const
pure virtual

Return the cutoff radius used in the potential.

Implemented in EMT, and GhostPotential.

◆ GetData()

virtual double AsapPotential::GetData ( ) const
inlinevirtual

Get data used by the QuasiContinuum method.

Reimplemented in EMT.

Definition at line 82 of file Potential.h.

82 {
83 throw Exception("GetData() not implemented.");
84 return 0.0;
85 }

◆ GetLatticeConstant()

virtual double AsapPotential::GetLatticeConstant ( ) const
pure virtual

Return the lattice constant of the material, if well-defined.

If a lattice constant of the material can be defined, return it in Angstrom, otherwise throw an exception.

Implemented in EMT, and GhostPotential.

◆ GetNumberOfAtoms()

virtual int AsapPotential::GetNumberOfAtoms ( ) const
pure virtual

Get the number of atoms.

Implemented in EMT.

◆ GetPotentialEnergies()

virtual const double * AsapPotential::GetPotentialEnergies ( )
pure virtual

Calculate the energy of all atoms.

Implemented in EMT.

◆ GetPotentialEnergy()

virtual double AsapPotential::GetPotentialEnergy ( )
pure virtual

Calculate the total energy of the system.

Implemented in EMT.

◆ GetStress()

virtual void AsapPotential::GetStress ( double stress[6],
const Vec * momenta = 0 )
pure virtual

Calculate the total stress of the system.

Note that the output variable stress is not zeroed first. In quasicontinuum simulations and other situations where there is a contribution to the stress which is not from the atoms, the stress parameter can initially be set to the appropriate derivatives of the energy of that part of the calculation (without the volume normalization, which will be performed by the potential).

Implemented in EMT.

◆ GetStresses()

virtual const symTensor * AsapPotential::GetStresses ( const Vec * momenta = 0)
pure virtual

Calculate the stress on all atoms.

Implemented in EMT.

◆ SetAtoms()

virtual void AsapPotential::SetAtoms ( Atoms * a)
pure virtual

Set the atoms belonging to this potential.

This is called automatically by Atoms.SetCalculator() and should not be called elsewhere.

Implemented in EMT.

◆ UpdateSuperCell()

virtual void AsapPotential::UpdateSuperCell ( const SuperCell * newSuperCell)
pure virtual

Tell the Potential that a new SuperCell has been assigned to the atoms.

Implemented in EMT.


The documentation for this class was generated from the following file:
  • /home/runner/work/eOn/eOn/include/eon/potentials/EMT/Asap/Potential.h