24 #include "Potential.h" 25 #include "functions/Functions.h" 83 virtual double cutoff()
const override {
return _cutoff; }
109 return _electronDensityMap[speciesA *
job()->
numAtomTypes() + speciesB];
114 return _embeddingEnergyMap[species];
129 for(
const auto& f : _functions)
130 if(f && f->id() ==
id)
return f.get();
143 std::vector<std::shared_ptr<FunctionBase>> _functions;
146 std::vector<FunctionBase*> _pairPotentialMap;
149 std::vector<FunctionBase*> _electronDensityMap;
152 std::vector<FunctionBase*> _embeddingEnergyMap;
155 std::vector<FunctionBase*> _ffunctionMap;
158 std::vector<FunctionBase*> _gfunctionMap;
167 struct MEAMBondData {
Base class for maintaining structures.
Definition: AtomicStructure.h:42
int numAtomTypes() const
Returns the number of atom types used in this job.
Definition: FitJob.h:63
FunctionBase * pairPotential(int speciesA, int speciesB) const
Returns the pair potential function for the interaction between the given atom types.
Definition: MEAMPotential.h:103
Definition: NeighborList.h:58
MEAMPotential(const FPString &id, FitJob *job)
Constructor.
Definition: MEAMPotential.h:80
void writeTables(const FPString &basename) const
Writes the tabulated functionals to a set of text files for visualization with Gnuplot.
Definition: MEAMPotential.cpp:429
FunctionBase * ffunction(int speciesA, int speciesB) const
Returns the f-function for the given pair of atom types.
Definition: MEAMPotential.h:118
virtual double computeEnergyAndForces(AtomicStructure &structure, NeighborList &neighborList) override
Computes the total energy and forces of the structure.
Definition: MEAMPotential.cpp:92
FunctionBase * electronDensity(int speciesA, int speciesB) const
Returns the electron density function for the given pair of atom types.
Definition: MEAMPotential.h:108
virtual size_t perAtomDataSize() const override
Definition: MEAMPotential.h:96
FunctionBase * embeddingEnergy(int species) const
Returns the embedding energy function for the given atom type.
Definition: MEAMPotential.h:113
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
virtual double cutoff() const override
Returns the maximum cutoff of the potential.
Definition: MEAMPotential.h:83
const FPString & id() const
Returns the identifier of this object instance.
Definition: FitObject.h:138
This class defines general modified embedded atom method (MEAM) potentials.
Definition: MEAMPotential.h:75
std::string FPString
The default string type used throughout the code:
Definition: Atomicrex.h:70
FunctionBase * gfunction(int speciesA, int speciesB, int speciesC) const
Returns the f-function for the given triplet of atom types.
Definition: MEAMPotential.h:123
Definition: XMLUtilities.h:69
virtual size_t perBondDataSize() const override
Definition: MEAMPotential.h:100
FitJob * job() const
Returns a pointer to the job to which this object belongs.
Definition: FitObject.h:150
virtual double computeEnergy(AtomicStructure &structure, NeighborList &neighborList) override
Computes the total energy of the structure.
Definition: MEAMPotential.cpp:35
Base class for all one-dimensional functions that can be fitted.
Definition: Functions.h:35
virtual void parse(XML::Element potentialElement) override
Parses any potential-specific parameters in the XML element in the job file.
Definition: MEAMPotential.cpp:290
virtual void outputResults() override
This function is called by the fit job on shutdown, i.e. after the fitting process has finished...
Definition: MEAMPotential.cpp:416
FunctionBase * findFunctionById(const FPString &id) const
Returns the function with the given ID, or nullptr if no such function is defined.
Definition: MEAMPotential.h:128
Base class for potential.
Definition: Potential.h:41