24 #include "Potential.h" 25 #include "functions/Functions.h" 39 :
FitObject(id, job,
tag), _atomTypeA(atomTypeA), _atomTypeB(atomTypeB), _V(V)
46 int atomTypeB()
const {
return _atomTypeB; }
50 if(type_i == _atomTypeA && type_j == _atomTypeB)
return true;
51 if(type_i == _atomTypeB && type_j == _atomTypeA)
return true;
57 if(type == _atomTypeA || type == _atomTypeB)
return true;
62 const std::shared_ptr<FunctionBase>&
V()
const {
return _V; };
68 int _atomTypeA, _atomTypeB;
71 std::shared_ptr<FunctionBase> _V;
85 virtual double cutoff()
const override {
return _cutoff; }
94 virtual void outputResults()
override;
97 void writePotential(
const FPString& filename)
const;
100 void writeTables(
const FPString& basename)
const;
118 std::vector< std::shared_ptr<PairInteraction> > _pairInteractions;
Base class for maintaining structures.
Definition: AtomicStructure.h:42
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: PairPotential.h:33
const FPString & tag() const
Returns the assigned tag string.
Definition: FitObject.h:144
bool isActive(int type) const
Returns whether the interaction contains the geiven atom type.
Definition: PairPotential.h:56
const std::shared_ptr< FunctionBase > & V() const
Returns the pair potential function.
Definition: PairPotential.h:62
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: PairPotential.h:85
Definition: PairPotential.h:77
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: PairPotential.h:49
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
int atomTypeA() const
Returns the atom type indices whose interaction is described by this object.
Definition: PairPotential.h:45
PairInteraction(const FPString &id, FitJob *job, int atomTypeA, int atomTypeB, const std::shared_ptr< FunctionBase > &V, const FPString &tag=FPString())
Constructor.
Definition: PairPotential.h:38
PairPotential(const FPString &id, FitJob *job)
Constructor.
Definition: PairPotential.h:82
Base class for potential.
Definition: Potential.h:41