eOn client
Long-timescale dynamics: aKMC, NEB, parallel replica
☾
Toggle main menu visibility
Loading...
Searching...
No Matches
Potential.h
Go to the documentation of this file.
1
// Emacs: this is -*- C++ -*-
2
3
#ifndef ASAP_POTENTIAL_H
4
#define ASAP_POTENTIAL_H
5
6
#include "
Exception.h
"
7
#include <assert.h>
8
9
class
Atoms
;
10
class
Vec
;
11
class
SuperCell
;
12
13
typedef
double
symTensor
[6];
14
16
29
class
AsapPotential
{
30
public
:
31
virtual
~AsapPotential
() {}
32
34
38
virtual
void
SetAtoms
(
Atoms
*a) = 0;
39
41
virtual
double
GetPotentialEnergy
() = 0;
42
44
virtual
const
Vec
*
GetCartesianForces
() = 0;
45
47
virtual
const
symTensor
*
GetStresses
(
const
Vec
*momenta = 0) = 0;
48
50
58
virtual
void
GetStress
(
double
stress[6],
const
Vec
*momenta = 0) = 0;
59
61
virtual
const
double
*
GetPotentialEnergies
() = 0;
62
63
virtual
void
CheckNeighborLists
() = 0;
65
68
virtual
double
CalculateLatticeEnergy
(
const
Vec
a[3]) {
69
throw
Exception
(
"The QC method is not implemented for this potential"
);
70
return
0.0;
71
}
72
74
77
virtual
void
CalculateDerivatives
(
const
Vec
a[3],
double
dEdaDota[6]) {
78
throw
Exception
(
"The QC method is not implemented for this potential"
);
79
}
80
82
virtual
double
GetData
()
const
{
83
throw
Exception
(
"GetData() not implemented."
);
84
return
0.0;
85
}
86
88
virtual
double
GetCutoffRadius
()
const
= 0;
89
91
94
virtual
double
GetLatticeConstant
()
const
= 0;
95
97
virtual
void
UpdateSuperCell
(
const
SuperCell
*newSuperCell) = 0;
98
100
virtual
int
GetNumberOfAtoms
()
const
= 0;
101
};
102
103
#endif
// POTENTIAL_H
Exception.h
AsapPotential
Abstract base class of all potentials.
Definition
Potential.h:29
AsapPotential::CalculateLatticeEnergy
virtual double CalculateLatticeEnergy(const Vec a[3])
Calculate the energy of an atom in a regular fcc(?) lattice.
Definition
Potential.h:68
AsapPotential::~AsapPotential
virtual ~AsapPotential()
Definition
Potential.h:31
AsapPotential::GetNumberOfAtoms
virtual int GetNumberOfAtoms() const =0
Get the number of atoms.
AsapPotential::CheckNeighborLists
virtual void CheckNeighborLists()=0
AsapPotential::GetPotentialEnergies
virtual const double * GetPotentialEnergies()=0
Calculate the energy of all atoms.
AsapPotential::CalculateDerivatives
virtual void CalculateDerivatives(const Vec a[3], double dEdaDota[6])
Calculate derivative of the energy of an atom in a regular lattice.
Definition
Potential.h:77
AsapPotential::SetAtoms
virtual void SetAtoms(Atoms *a)=0
Set the atoms belonging to this potential.
AsapPotential::UpdateSuperCell
virtual void UpdateSuperCell(const SuperCell *newSuperCell)=0
Tell the Potential that a new SuperCell has been assigned to the atoms.
AsapPotential::GetCutoffRadius
virtual double GetCutoffRadius() const =0
Return the cutoff radius used in the potential.
AsapPotential::GetData
virtual double GetData() const
Get data used by the QuasiContinuum method.
Definition
Potential.h:82
AsapPotential::GetPotentialEnergy
virtual double GetPotentialEnergy()=0
Calculate the total energy of the system.
AsapPotential::GetLatticeConstant
virtual double GetLatticeConstant() const =0
Return the lattice constant of the material, if well-defined.
AsapPotential::GetStresses
virtual const symTensor * GetStresses(const Vec *momenta=0)=0
Calculate the stress on all atoms.
AsapPotential::GetStress
virtual void GetStress(double stress[6], const Vec *momenta=0)=0
Calculate the total stress of the system.
AsapPotential::GetCartesianForces
virtual const Vec * GetCartesianForces()=0
Calculate the forces on all atoms and return the result.
Atoms
The main list of atoms class.
Definition
Atoms.h:36
Exception
Definition
Exception.h:13
SuperCell
The SuperCell defines the size, shape and boundary condx of a simulation.
Definition
SuperCell.h:20
Vec
A 3-vector useful for postions etc.
Definition
Vec.h:18
symTensor
double symTensor[6]
Definition
Potential.h:13
include
eon
potentials
EMT
Asap
Potential.h
Generated by
1.17.0
Generated by
Doxygen 1.17.0
Analytics by
Antics
provided by
TurtleTech ehf