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

This class defines the ABOP potential format. More...

#include <ABOPotential.h>

Inheritance diagram for atomicrex::ABOPotential:
atomicrex::Potential atomicrex::FitObject

Classes

struct  ABOParamSet
 

Public Member Functions

 ABOPotential (const FPString &id, FitJob *job, const FPString &tag=FPString("Tersoff"))
 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 outputResults () override
 This function is called by the fit job on shutdown, i.e. after the fitting process has finished.
 
void writePotential (const FPString &filename) const
 Generates a potential file to be used with simulation codes.
 
virtual void parse (XML::Element potentialElement) override
 Parses any potential-specific parameters in the XML element in the job file.
 
- 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 size_t perAtomDataSize () const
 
virtual size_t perBondDataSize () 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.
 

Protected Member Functions

const ABOParamSetgetParamSet (int itype, int jtype, int ktype) const
 Returns the parameter set for the i-j-k triplet interaction.
 
void parseTersoffFile (const FPString &filename)
 Parses Tersoff parameters from a LAMMPS potential file.
 
void linkDOF ()
 Links the DOF together to get only doublett interaction as in the classical ABOP.
 
- 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

double _cutoff
 
std::vector< ABOParamSet_params
 
int _numAtomTypes
 The number of atom types.
 
FPString _exportPotentialFile
 Potential file that is written after fitting.
 
int _dofMode
 Constrain Mode (0 = All DOF independent, 1 = DOFs connected as in "classical" ABOP)
 
- 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 the ABOP potential format.

The ABOP potential is a reformulation of the Tersoff potential as implemented in atomicPoet and in LAMMPS. The difference lies in the two-body parameters $A$, $B$, $\lambda_1$, and $\lambda_2$, which have been rewritten in terms of the more physical choices, $r_0$, $D_0$, $\beta$, and $S$, which relate to dimer properties and the Pauling relation.

In this format, the potential can be written

\[ E = \frac{1}{2} \sum_i \sum_{j\neq i} V_{ij} \]

with

\[ V_{ij} = f_C(r_{ij})[f_R(r_{ij}) + b_{ij} f_A(r_{ij})]. \]

Here, $V_R(r) = \frac{D_0}{S-1} \exp[-\beta\sqrt{2S} (r-r_0)]$ and $V_A(r) = -\frac{SD_0}{S-1}\exp[-\beta \sqrt{2/S}(r-r_0)]$ are repulsive and attractive pair potential branches, respectively, and $f_C(r_{ij})$ is a cut-off function that is unity and decays sinusodially in the interval $(R-D,R+D)$, after which it vanishes. The three-body contributions arise due to the bond-order parameter

\[ b_{ij} = (1+\beta_2^n\zeta_{ij}^n)^{-\frac{1}{2n}} \]

where

\[ \zeta_{ij} = \sum_{k\neq i,j} f_C(r_{ij})g(\theta_{ijk})\exp [\lambda_3^m(r_{ij}-r_{ik})^m]. \]

The angular dependence is due to the factor

\[ g(\theta) = \gamma_{ijk} \left( 1+\frac{c^2}{d^2} - \frac{c^2}{d^2 + (h + \cos \theta)^2}\right). \]

Parameter files are in LAMMPS tersoff format. In the output files, commented blocks containing the $r_0$, $D_0$, $\beta$, and $S$ parameters are also written.

Note that the $h$ parameter in the ABOP form has the opposite sign than in the Tersoff formulation.

The following code snippet, to be inserted in the potentials block, illustrates the definition of this potential type in the input file.

<abop id="Si" species-a="*" species-b="*">
<param-file>ABOP_potential.tersoff</param-file>
<export-potential>ABOP_potential_fitted.tersoff</export-potential>
<fit-dof>
<r0 tag="SiSiSi" enabled="true" />
<D0 tag="SiSiSi" enabled="true" />
<beta tag="SiSiSi" enabled="true" />
<S tag="SiSiSi" enabled="true" />
<gamma tag="SiSiSi" enabled="true" />
<c tag="SiSiSi" enabled="true" />
<d tag="SiSiSi" enabled="true" />
<h tag="SiSiSi" enabled="true" />
<twomu tag="SiSiSi" enabled="false" />
<beta2 tag="SiSiSi" enabled="false" />
<powern tag="SiSiSi" enabled="false" />
</fit-dof>
</abop>

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