The Effective Medium Theory (EMT) potential. More...
#include <EMT.h>
Public Member Functions | |
| EMT (EMTParameterProvider *prov=0) | |
| Create an EMT potential optionally using a parameter provider. | |
| virtual | ~EMT () |
| Delete the EMT potential. | |
| void | SetSubtractE0 (bool subtractE0) |
| virtual void | SetAtoms (Atoms *atoms) |
| Set the atoms belonging to this potential. | |
| virtual const Vec * | GetCartesianForces () |
| Calculate the forces on all atoms and return the result. | |
| virtual const double * | GetPotentialEnergies () |
| Calculate the energy of all atoms. | |
| virtual double | GetPotentialEnergy () |
| Calculate the total energy of the system. | |
| virtual const symTensor * | GetStresses (const Vec *momenta=0) |
| Calculate the stress on all atoms. | |
| virtual void | GetStress (double stress[6], const Vec *momenta=0) |
| Calculate the total stress of the system. | |
| virtual void | CheckNeighborLists () |
| Check that neighbor lists are up to date, update them if not. | |
| virtual double | GetCutoffRadius () const |
| Return the cutoff radius used in the potential. | |
| virtual double | GetLatticeConstant () const |
| Return the lattice constant of the material, if well-defined. | |
| virtual int | GetNumberOfAtoms () const |
| Get the number of atoms. | |
| virtual void | SetContinuumElement (int z) |
| Specify the element in the continuum region of a QuasiContinuum simulation. | |
| 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. | |
| 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. | |
| const double * | GetSigma1 (int n) |
| Return a pointer to the EMT "density" sigma1. | |
| const double * | GetSigma2 (int n) |
| Return a pointer to the EMT "density" sigma2. | |
| void | PrintParameters () |
| Print the EMT parameters. | |
| NeighborList * | GetNeighborList () const |
| Return a pointer to the neighbor list. | |
| Public Member Functions inherited from AsapPotential | |
| virtual | ~AsapPotential () |
Protected Member Functions | |
| virtual void | InitParameters () |
| Initialization of the EMT parameters. | |
| virtual void | Allocate () |
| (Re)allocate storage for forces, energies and intermediate results. | |
| virtual void | AllocateStress () |
| (Re)allocate storage for stresses | |
| virtual void | CalculateIDs () |
| Calculate type numbers from the atomic numbers. | |
| virtual void | CalculateSigmas (int calculatesigma2=1) |
| Calculate sigma1 and perhaps sigma2. | |
| virtual void | CalculateEnergiesAfterSigmas (double *Epot=0) |
| Calculate energies once sigma1 is known. | |
| virtual void | CalculateForcesAfterEnergies (Vec *forces, double stress[][6]=0) |
| Calculate forces in a multicomponent system. | |
| virtual void | CalculateForcesAfterEnergiesSingle (Vec *forces, double stress[][6]=0) |
| Calculate forces in a system with only one element. | |
| 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. | |
Protected Attributes | |
| Atoms * | atoms |
| The atoms we are working on. | |
| GhostAtoms * | ghostatoms |
| Non-NULL if atoms are GhostAtoms. | |
| int | nAtoms |
| The number of (real) atoms. | |
| int | nSize |
| Number of atoms including ghost atoms. | |
| NeighborList * | nblist |
| The neighborlist object. | |
| EMTParameterProvider * | provider |
| The source of the EMT parameters. | |
| bool | ownProvider |
| May we delete the provider? | |
| bool | subtractE0 |
| Whether we subtract E0 from atomic energies (defines the zero of potential energy; if we don't subtract, zero corresponds to infinite seperation. | |
| std::vector< const emt_parameters * > | parameters |
| The EMT parameters. | |
| const emt_parameters * | continuumelement |
| The element in the continuum region. | |
| const TinyDoubleMatrix * | chi |
| The Chi matrix of EMT. | |
| int | nelements |
| The number of different elements in the simulation. | |
| double | rFermi |
| Cutoff parameters (from EMTParameterProvider). | |
| double | rNbCut |
| double | cutoffslope |
| Cutoff slope. | |
| int | sigma2isvalid |
| For consistency checks. | |
| vector< vector< double > > | sigma1 |
| Temporary data for the atoms. | |
| vector< vector< double > > | sigma2 |
| vector< double > | Ec |
| Each atom has a single Ec, Eas, radius etc. | |
| vector< double > | Eas |
| vector< double > | potentialenergy |
| vector< double > | radius |
| vector< double > | dEds |
| vector< Vec > | force |
| vector< double > | stress |
| The stresses. Always remember to use six per atoms! | |
| int | nAtomsRes |
| int | nSizeRes |
| If there are ghostatoms, some extra space is reserved for the arrays. | |
| vector< int > | id |
| The atomic numbers are translated into IDs, integers in [0, nelements-1]. | |
| double | unnormalizedstress [6] |
| The total stress before division by volume. | |
| double | totalvolume |
| Total volume during stresscalculation. | |
| int | nHalfNeighbors |
| For the quasicontinuum stuff. | |
| int(* | coef )[6] |
| For the quasicontinuum stuff. | |
| double | dataSigma1 |
| For the quasicontinuum stuff. | |
| struct { | |
| int ids | |
| int nblist | |
| int sigma1 | |
| int sigma2 | |
| int beforeforces | |
| int energies | |
| int forces | |
| int stresses | |
| int fullstresses | |
| } | counters |
| A structure of counters to check if recalculations are necessary. | |
Private Member Functions | |
| 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(). | |
| 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(). | |
The Effective Medium Theory (EMT) potential.
The Effective Medium Theory (EMT) as originally implemented in Per Stoltze's ARTwork program, and documented in
| EMT::EMT | ( | EMTParameterProvider * | prov = 0 | ) |
Create an EMT potential optionally using a parameter provider.
|
virtual |
Delete the EMT potential.
|
protectedvirtual |
(Re)allocate storage for forces, energies and intermediate results.
|
protectedvirtual |
(Re)allocate storage for stresses
|
virtual |
Calculate derivative of the energy of an atom in a regular lattice.
Used by the QuasiContinuum method.
Reimplemented from AsapPotential.
|
protectedvirtual |
Calculate energies once sigma1 is known.
If Epot is NULL, energies are not calculated, only derivatives needed for the force.
|
protectedvirtual |
Calculate forces in a multicomponent system.
|
protectedvirtual |
Calculate forces in a system with only one element.
|
protectedvirtual |
Calculate type numbers from the atomic numbers.
|
virtual |
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 from AsapPotential.
|
protectedvirtual |
Calculate sigma1 and perhaps sigma2.
|
protectedvirtual |
Internal function used for the QuasiContinuum stuff.
|
virtual |
Check that neighbor lists are up to date, update them if not.
Implements AsapPotential.
|
private |
force_batch does the hard work in CalculateForcesAfterEnergy().
Not virtual, do not reimplement without reimplementing CalculateForcesAfterEnergy().
|
virtual |
Calculate the forces on all atoms and return the result.
Implements AsapPotential.
|
inlinevirtual |
Return the cutoff radius used in the potential.
Implements AsapPotential.
Definition at line 42 of file EMT.h.
|
inlinevirtual |
Get data used by the QuasiContinuum method.
Reimplemented from AsapPotential.
Definition at line 54 of file EMT.h.
|
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.
Implements AsapPotential.
|
inline |
|
inlinevirtual |
|
virtual |
Calculate the energy of all atoms.
Implements AsapPotential.
|
virtual |
Calculate the total energy of the system.
Implements AsapPotential.
|
inline |
|
inline |
|
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).
Implements AsapPotential.
Calculate the stress on all atoms.
Implements AsapPotential.
|
protectedvirtual |
Initialization of the EMT parameters.
| void EMT::PrintParameters | ( | ) |
Print the EMT parameters.
|
virtual |
Set the atoms belonging to this potential.
This is called automatically by Atoms.SetCalculator() and should not be called elsewhere.
Implements AsapPotential.
|
virtual |
Specify the element in the continuum region of a QuasiContinuum simulation.
|
inline |
|
private |
sigma_batch does the hard work in CalculateSigmas().
Not virtual, do not reimplement without reimplementing CalculateSigmas().
|
virtual |
Tell the Potential that a new SuperCell has been assigned to the atoms.
Implements AsapPotential.
|
protected |
|
protected |
| struct { ... } EMT::counters |
A structure of counters to check if recalculations are necessary.
|
protected |
|
protected |
|
protected |
Non-NULL if atoms are GhostAtoms.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Cutoff parameters (from EMTParameterProvider).
|
protected |
The stresses. Always remember to use six per atoms!
Should really be declared as vector<double[6]>, but that breaks the vector library when attempting to resize!
|
protected |
|
protected |
|
protected |