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

#include <FitObject.h>

Inheritance diagram for atomicrex::FitObject:
atomicrex::AtomicStructure atomicrex::CDIPairInteraction atomicrex::FitGroup atomicrex::FitProperty atomicrex::FunctionBase atomicrex::PairInteraction atomicrex::Potential atomicrex::BinaryCubicLatticeStructure atomicrex::BinaryHexaRhomboTetraLatticeStructure atomicrex::DimerStructure atomicrex::SuperCellStructure atomicrex::UnaryCubicLatticeStructure atomicrex::UnaryHexaRhomboTetraLatticeStructure atomicrex::UserStructure atomicrex::AtomVectorProperty atomicrex::ScalarFitProperty atomicrex::FunctionConstant atomicrex::FunctionExpA atomicrex::FunctionExpB atomicrex::FunctionExpGaussian atomicrex::FunctionInverseArgument atomicrex::FunctionMorseA atomicrex::FunctionMorseB atomicrex::FunctionMorseC atomicrex::FunctionPoly atomicrex::FunctionProduct atomicrex::FunctionSpline atomicrex::FunctionSum atomicrex::ParsedFunction atomicrex::ABOPotential atomicrex::CDIPotential atomicrex::EAMPotential atomicrex::LennardJonesPotential atomicrex::MEAMPotential atomicrex::PairPotential atomicrex::TabulatedEAMPotential atomicrex::TabulatedMEAMPotential atomicrex::TersoffPotential

Public Member Functions

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.
 
virtual void parse (XML::Element element)
 Parses the base parameters, common to structures, groups, and potentials, from the XML element in the job file.
 
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

 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

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 is the abstract base class for potentials, atomic structures, properties and groups.

A FitObject has (a) degrees of freedom that are varied during the fitting process. (b) properties that are fitted to a target value during the fitting process. (c) sub-objects which in turn can have properties and DOFs.

Member Function Documentation

◆ outputEnabled()

bool atomicrex::FitObject::outputEnabled ( ) const
inline

Returns whether this object and it's children are calculated and displayed at the end of the fitting process.

◆ setOutputEnabled()

void atomicrex::FitObject::setOutputEnabled ( bool  enable)
inline

Sets whether this object and it's children are calculated and displayed at the end of the fitting process.

Member Data Documentation

◆ _outputEnabled

bool atomicrex::FitObject::_outputEnabled = true
protected

Controls whether this object and it's children are calculated and displayed at the end of the fitting process.


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