atomicrex
0.1
An advanced atomistic model building tool
|
Base class for all degrees of freedom a potential or a structure may have. More...
#include <DegreeOfFreedom.h>
Public Member Functions | |
DegreeOfFreedom (const FPString &id=FPString(), const FPString &tag=FPString()) | |
Constructor. More... | |
virtual | ~DegreeOfFreedom () |
Virtual destructor. | |
const FPString & | id () const |
Return the identifier of this degree of freedom. | |
void | setId (const FPString &id) |
Sets the identifier of this degree of freedom. | |
const FPString & | tag () const |
Returns the tag on this DOF. | |
void | setTag (const FPString &tag) |
Sets the tag on this DOF. | |
bool | fitEnabled () const |
Returns whether this DOF should be varied during the fitting process. | |
void | setFitEnabled (bool enable) |
Sets whether this DOF should be varied during the fitting process. | |
bool | relax () const |
Returns whether this DOF should be relaxed during each iteration when fitting. | |
void | setRelax (bool enable) |
Sets whether this DOF is being relaxed during each iteration when fitting. | |
FitObject * | object () const |
Returns a pointer to the potential or structure to which this DOF belongs. | |
virtual int | numScalars ()=0 |
Returns the number of scalar degrees of freedom this DOF is composed of. More... | |
virtual void | exportValue (double *&dst)=0 |
Lets the DOF export its current value(s) into the given value array. | |
virtual void | importValue (const double *&src)=0 |
Lets the DOF import its value(s) from the given value array. | |
virtual bool | hasBoundConstraints () const |
Returns whether this DOF has any bound constraints applied to it. | |
virtual bool | satisfiesBoundConstraints () const |
Returns whether this DOF satisfies the bound constraints applied to it. | |
virtual void | getBoundConstraints (std::vector< Minimizer::BoundConstraints >::iterator &types, std::vector< double >::iterator &lowerBounds, std::vector< double >::iterator &upperBounds) |
Lets the DOF write its constraints information to the given linear arrays. | |
virtual void | print (MsgLogger &stream) |
Outputs the current value of the DOF. | |
bool | resetBeforeRelax () const |
void | setResetBeforeRelax (bool enableReset) |
virtual void | reset () |
Resets the value of the DOF to what was specified in the job file. | |
virtual void | parseFit (XML::Element fitElement) |
Parse the contents of the <fit> element in the job file. | |
virtual void | parseRelax (XML::Element relaxElement) |
Parse the contents of the <relax> element in the job file. | |
virtual XML::OElement | generateXMLValueDefinition () const |
Produces an XML representation of the DOF's current value. | |
virtual XML::OElement | generateXMLFitDefinition () const |
Produces an XML representation of the DOF's fit settings. | |
Friends | |
class | FitObject |
Base class for all degrees of freedom a potential or a structure may have.
The degrees of freedom of a potential are varied during fitting to minimize the objective function.
The degrees of freedom of an atomic structure (e.g. the atomic coordinates) are varied to relax the structure.
Note that a DOF may actually consist of several (sub-)degrees of freedom. For example, a vector DOF consists of three internal scalar DOFs.
|
inline |
Constructor.
id | ID associated with degree of freedom |
tag | Tag aassociated with degree of freedom |
|
pure virtual |
Returns the number of scalar degrees of freedom this DOF is composed of.
This is the number of entries created in the state vector during fitting.
Implemented in atomicrex::ScalarDOF, and atomicrex::AtomCoordinatesDOF.
|
inline |
Returns whether the DOF is reset to the initial value specified by the user each time a new relaxation round is performed.
|
inline |
Sets whether the DOF is reset to the initial value specified by the user each time a new relaxation round is performed.