atomicrex  0.1
An advanced atomistic model building tool
Classes | Public Member Functions | List of all members
atomicrex::MEAMPotential Class Reference

This class defines general modified embedded atom method (MEAM) potentials. More...

#include <MEAMPotential.h>

Inheritance diagram for atomicrex::MEAMPotential:
atomicrex::Potential atomicrex::FitObject

Public Member Functions

 MEAMPotential (const FPString &id, FitJob *job)
 Constructor.
 
virtual double cutoff () const override
 Returns the maximum cutoff of the potential.
 
virtual double computeEnergyAndForces (AtomicStructure &structure, NeighborList &neighborList) override
 Computes the total energy and forces of the structure.
 
virtual double computeEnergy (AtomicStructure &structure, NeighborList &neighborList) override
 Computes the total energy of the structure.
 
virtual void parse (XML::Element potentialElement) override
 Parses any potential-specific parameters in the XML element in the job file.
 
virtual size_t perAtomDataSize () const override
 
virtual size_t perBondDataSize () const override
 
FunctionBasepairPotential (int speciesA, int speciesB) const
 Returns the pair potential function for the interaction between the given atom types.
 
FunctionBaseelectronDensity (int speciesA, int speciesB) const
 Returns the electron density function for the given pair of atom types.
 
FunctionBaseembeddingEnergy (int species) const
 Returns the embedding energy function for the given atom type.
 
FunctionBaseffunction (int speciesA, int speciesB) const
 Returns the f-function for the given pair of atom types.
 
FunctionBasegfunction (int speciesA, int speciesB, int speciesC) const
 Returns the f-function for the given triplet of atom types.
 
FunctionBasefindFunctionById (const FPString &id) const
 Returns the function with the given ID, or nullptr if no such function is defined.
 
virtual void outputResults () override
 This function is called by the fit job on shutdown, i.e. after the fitting process has finished.
 
void writeTables (const FPString &basename) const
 Writes the tabulated functionals to a set of text files for visualization with Gnuplot.
 
- Public Member Functions inherited from atomicrex::Potential
 Potential (const FPString &id, FitJob *job, const FPString &tag=FPString())
 Constructor.
 
void enableInteraction (int speciesA, int speciesB)
 Enables the interaction between two atom types.
 
bool interacting (int speciesA, int speciesB) const
 Returns whether the interaction between two atom types is enabled for this potential.
 
bool isAtomTypeEnabled (int species) const
 
virtual void preparePotential ()
 
virtual XML::OElement generateXMLDefinition ()
 
- Public Member Functions inherited from atomicrex::FitObject
virtual ~FitObject ()=default
 Virtual destructor.
 
double relativeWeight () const
 Returns the relative fit weight assigned to this object.
 
void setRelativeWeight (double weight)
 Assigns a relative fit weight to this object.
 
virtual void assignAbsoluteWeights (double absoluteWeight)
 Recursively assigns absolute weights to the properties of this object and its sub-objects.
 
virtual bool computeProperties (bool isFitting)
 Computes all enabled properties of the object.
 
const std::vector< FitProperty * > & properties () const
 Returns a list of fitting properties of this object.
 
void listAllProperties (std::vector< FitProperty *> &list) const
 Builds a list of properties of this object and all its sub-objects.
 
FitPropertypropertyById (const FPString &id) const
 Returns the property with the given ID.
 
const std::vector< DegreeOfFreedom * > & DOF () const
 Returns a list of degrees of freedom of this object.
 
void listAllDOF (std::vector< DegreeOfFreedom *> &list) const
 Builds a list of degrees of freedom of this object and all its sub-objects.
 
DegreeOfFreedomDOFById (const FPString &id, const FPString &tag=FPString()) const
 Returns the degree of freedom with the given ID (and tag).
 
virtual void dofValueChanged (DegreeOfFreedom &dof)
 This callback function is called by the DOFs of this fit object each time when their values changes.
 
const std::vector< FitObject * > & fitObjects () const
 Returns the list of FitObjects which are part of this group.
 
void registerSubObject (FitObject *subobject, bool deleteOnShutdown=false)
 Registers a sub-object.
 
virtual void print (MsgLogger &stream)
 Outputs the name of the object.
 
bool fitEnabled () const
 Returns whether this object and it's children are included in the fit.
 
void setFitEnabled (bool enable)
 Sets whether this object and it's children are included in the fit.
 
bool outputEnabled () const
 
void setOutputEnabled (bool enable)
 
const FPStringid () const
 Returns the identifier of this object instance.
 
void setId (const FPString &id)
 Sets the main identification tag.
 
const FPStringtag () const
 Returns the assigned tag string.
 
void setTag (const FPString &tag)
 Sets the complementary identification tag.
 
FitJobjob () const
 Returns a pointer to the job to which this object belongs.
 
FitObjectparent () const
 Returns the parent of this object in the hierarchy.
 

Additional Inherited Members

- Protected Member Functions inherited from atomicrex::FitObject
 FitObject ()
 Default Constructor.
 
 FitObject (const FPString &id, FitJob *job, const FPString &tag=FPString())
 Constructor.
 
void registerProperty (FitProperty *prop, bool deleteOnShutdown=false)
 Registers a property of this object.
 
void registerDOF (DegreeOfFreedom *dof)
 Registers a DOF of this object.
 
- Protected Attributes inherited from atomicrex::FitObject
bool _fitEnabled = true
 Controls whether this object and it's children are included in the fit.
 
bool _outputEnabled = true
 
FitJob_job = nullptr
 Pointer to the job this object belongs to.
 
FPString _id
 The identifier string of this object instance.
 
double _relativeWeight = 1.0
 The relative fit weight assigned to this object.
 

Detailed Description

This class defines general modified embedded atom method (MEAM) potentials.

The total energy for MEAM potentials can be written in the general form

\[ E = \sum_{ij} V(r_{ij}) + \sum_i F(\rho_i) \]

where

\[ \rho_i= \sum_j \rho(r_{ij}) + \sum_{jk} f(r_{ij}) f(r_{ik}) g\left(\cos(\theta_{ijk})\right). \]

In the present implementation it is possible to compose practically arbitrary functional forms using a math parser.

The following code block illustrates the main blocks in the potential definition. More complex cases can be found in the examples directory.

<potentials>
<meam id='my-meam-potential' species-a='*' species-b='*'>
<export-functions>meam_out</export-functions>
<functions>
<user-function id="V">
...
</user-function>
...
</functions>
<mapping>
<pair-interaction species-a='*' species-b='*' function='V' />
<electron-density species-a='*' species-b='*' function='rho' />
<f-function species-a='*' species-b='*' function='f' />
<g-function species-a='*' species-b='*' species-c='*' function='g' />
<embedding-energy species='*' function='U' />
</mapping>
</meam>
</potentials>

Member Function Documentation

◆ perAtomDataSize()

virtual size_t atomicrex::MEAMPotential::perAtomDataSize ( ) const
inlineoverridevirtual

Returns the number of bytes the potential needs per atom to store its intermediate calculation results during energy/force calculation.

Reimplemented from atomicrex::Potential.

◆ perBondDataSize()

virtual size_t atomicrex::MEAMPotential::perBondDataSize ( ) const
inlineoverridevirtual

Returns the number of bytes the potential needs per bond to store its intermediate calculation results during energy/force calculation.

Reimplemented from atomicrex::Potential.


The documentation for this class was generated from the following files: