94 double *diffs2,
double *wght,
double *dsigma1,
104 int zo,
int n,
int calculatesigma2);
112 double dEdss[],
double dEdso[],
int zs,
int zo,
int n,
TinyMatrix< double > TinyDoubleMatrix
Abstract base class of all potentials.
The main list of atoms class.
int nSize
Number of atoms including ghost atoms.
int nelements
The number of different elements in the simulation.
int(* coef)[6]
For the quasicontinuum stuff.
struct EMT::@046145273270354152231013235041337011202147127021 counters
A structure of counters to check if recalculations are necessary.
virtual void CalculateForcesAfterEnergiesSingle(Vec *forces, double stress[][6]=0)
Calculate forces in a system with only one element.
virtual void SetContinuumElement(int z)
Specify the element in the continuum region of a QuasiContinuum simulation.
virtual ~EMT()
Delete the EMT potential.
int sigma2isvalid
For consistency checks.
vector< double > stress
The stresses. Always remember to use six per atoms!
virtual void UpdateSuperCell(const SuperCell *newSuperCell)
Tell the Potential that a new SuperCell has been assigned to the atoms.
virtual double CalculateLatticeEnergy(const Vec a[3])
Calculate the energy of an atom in a regular fcc(?) lattice.
vector< vector< double > > sigma2
virtual void CalculateDerivatives(const Vec a[3], double dEdaDota[6])
Calculate derivative of the energy of an atom in a regular lattice.
const emt_parameters * continuumelement
The element in the continuum region.
const TinyDoubleMatrix * chi
The Chi matrix of EMT.
double unnormalizedstress[6]
The total stress before division by volume.
virtual void CalculateStuff(const Vec a[3], double &sigma1, double &sigma2, double *diffs2, double *wght, double *dsigma1, double *dsigma2)
Internal function used for the QuasiContinuum stuff.
virtual void CalculateForcesAfterEnergies(Vec *forces, double stress[][6]=0)
Calculate forces in a multicomponent system.
virtual void GetStress(double stress[6], const Vec *momenta=0)
Calculate the total stress of the system.
virtual void AllocateStress()
(Re)allocate storage for stresses
EMTParameterProvider * provider
The source of the EMT parameters.
virtual double GetLatticeConstant() const
Return the lattice constant of the material, if well-defined.
bool ownProvider
May we delete the provider?
double cutoffslope
Cutoff slope.
NeighborList * nblist
The neighborlist object.
int nSizeRes
If there are ghostatoms, some extra space is reserved for the arrays.
vector< double > potentialenergy
virtual void CalculateEnergiesAfterSigmas(double *Epot=0)
Calculate energies once sigma1 is known.
double dataSigma1
For the quasicontinuum stuff.
virtual double GetCutoffRadius() const
Return the cutoff radius used in the potential.
bool subtractE0
Whether we subtract E0 from atomic energies (defines the zero of potential energy; if we don't subtra...
EMT(EMTParameterProvider *prov=0)
Create an EMT potential optionally using a parameter provider.
vector< int > id
The atomic numbers are translated into IDs, integers in [0, nelements-1].
double totalvolume
Total volume during stresscalculation.
int nAtoms
The number of (real) atoms.
GhostAtoms * ghostatoms
Non-NULL if atoms are GhostAtoms.
NeighborList * GetNeighborList() const
Return a pointer to the neighbor list.
int nHalfNeighbors
For the quasicontinuum stuff.
void sigma_batch(int *self, int *other, Vec rnb[], double *sq_dist, int zs, int zo, int n, int calculatesigma2)
sigma_batch does the hard work in CalculateSigmas().
virtual const symTensor * GetStresses(const Vec *momenta=0)
Calculate the stress on all atoms.
virtual void Allocate()
(Re)allocate storage for forces, energies and intermediate results.
virtual const double * GetPotentialEnergies()
Calculate the energy of all atoms.
Atoms * atoms
The atoms we are working on.
const double * GetSigma2(int n)
Return a pointer to the EMT "density" sigma2.
virtual void InitParameters()
Initialization of the EMT parameters.
std::vector< const emt_parameters * > parameters
The EMT parameters.
virtual void SetAtoms(Atoms *atoms)
Set the atoms belonging to this potential.
void force_batch(int *self, int *other, Vec rnb[], double *sq_dist, double dEdss[], double dEdso[], int zs, int zo, int n, Vec *force, double(*stress)[6])
force_batch does the hard work in CalculateForcesAfterEnergy().
void PrintParameters()
Print the EMT parameters.
vector< vector< double > > sigma1
Temporary data for the atoms.
virtual const Vec * GetCartesianForces()
Calculate the forces on all atoms and return the result.
const double * GetSigma1(int n)
Return a pointer to the EMT "density" sigma1.
virtual double GetPotentialEnergy()
Calculate the total energy of the system.
virtual double GetData() const
Get data used by the QuasiContinuum method.
double rFermi
Cutoff parameters (from EMTParameterProvider).
virtual int GetNumberOfAtoms() const
Get the number of atoms.
void SetSubtractE0(bool subtractE0)
virtual void CalculateSigmas(int calculatesigma2=1)
Calculate sigma1 and perhaps sigma2.
virtual void CheckNeighborLists()
Check that neighbor lists are up to date, update them if not.
virtual void CalculateIDs()
Calculate type numbers from the atomic numbers.
vector< double > Ec
Each atom has a single Ec, Eas, radius etc.
"Half" neighbor lists for atoms.
The SuperCell defines the size, shape and boundary condx of a simulation.
A 3-vector useful for postions etc.