24 #include "Potential.h" 25 #include "functions/Functions.h" 44 :
FitObject(id, job), _atomTypeA(atomTypeA), _atomTypeB(atomTypeB), _matrix(matrix), _V(V), _sigmaInverseArgument(new
FunctionInverseArgument(
"CDIPHFunction", job, h)) {
51 int atomTypeB()
const {
return _atomTypeB; }
54 int matrix()
const {
return _matrix; }
58 if(type_i == _atomTypeA && type_j == _atomTypeB)
return true;
59 if(type_i == _atomTypeB && type_j == _atomTypeA)
return true;
64 const std::shared_ptr<FunctionBase>&
V()
const {
return _V; }
67 const std::shared_ptr<FunctionInverseArgument>&
h()
const {
return _sigmaInverseArgument; }
73 int _atomTypeA, _atomTypeB, _matrix;
76 std::shared_ptr<FunctionBase> _V;
79 std::shared_ptr<FunctionInverseArgument> _sigmaInverseArgument;
92 _linearizedMode(false), _legacyMode(false) {}
95 virtual double cutoff()
const override {
return _cutoff; }
104 virtual void outputResults()
override;
107 void writePotential(
const FPString& filename)
const;
110 void writeTables(
const FPString& basename)
const;
142 std::vector<std::shared_ptr<FunctionBase>> _sigmas;
145 std::vector<std::shared_ptr<CDIPairInteraction>> _pairInteractions;
Base class for maintaining structures.
Definition: AtomicStructure.h:42
CDIPairInteraction(const FPString &id, FitJob *job, int atomTypeA, int atomTypeB, int matrix, const std::shared_ptr< FunctionBase > &V, const std::shared_ptr< FunctionBase > &h)
Constructor.
Definition: CDIPotential.h:43
const std::shared_ptr< FunctionBase > & V() const
Returns the pair potential function.
Definition: CDIPotential.h:64
int matrix() const
Returns the atomic species whose concentration controls the interaction strength. ...
Definition: CDIPotential.h:54
virtual void parse(XML::Element element)
Parses the base parameters, common to structures, groups, and potentials, from the XML element in the...
Definition: FitObject.cpp:149
Definition: NeighborList.h:58
void registerSubObject(FitObject *subobject, bool deleteOnShutdown=false)
Registers a sub-object.
Definition: FitObject.cpp:57
Definition: CDIPotential.h:86
int atomTypeA() const
Returns the atom type indices whose interaction is described by this object.
Definition: CDIPotential.h:50
CDIPotential(const FPString &id, FitJob *job)
Constructor.
Definition: CDIPotential.h:91
Definition: Functions.h:406
Definition: CDIPotential.h:38
virtual double cutoff() const override
Returns the maximum cutoff of the potential.
Definition: CDIPotential.h:95
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
std::string FPString
The default string type used throughout the code:
Definition: Atomicrex.h:70
Definition: XMLUtilities.h:226
Definition: XMLUtilities.h:69
Definition: FitObject.h:42
FitJob * job() const
Returns a pointer to the job to which this object belongs.
Definition: FitObject.h:150
const std::shared_ptr< FunctionInverseArgument > & h() const
Returns the interpolation function.
Definition: CDIPotential.h:67
Base class for potential.
Definition: Potential.h:41
bool interacting(int type_i, int type_j) const
Returns whether the interaction between the two given atom types is described by this pair interactio...
Definition: CDIPotential.h:57