|
AvogadroLibs 1.103.0
|
Public Member Functions | |
| virtual EnergyCalculator * | newInstance () const =0 |
| virtual std::string | identifier () const =0 |
| virtual std::string | name () const =0 |
| virtual std::string | description () const =0 |
| virtual bool | setConfiguration (Core::VariantMap &config) |
| virtual Core::Molecule::ElementMask | elements () const =0 |
| Indicate if your method only treats a subset of elements. | |
| virtual bool | acceptsUnitCell () const |
| Indicate if your method can handle unit cells. | |
| virtual bool | acceptsIons () const |
| Indicate if your method can handle ions Many methods only treat neutral systems, either a neutral molecule or a neutral unit cell. | |
| virtual bool | acceptsRadicals () const |
| Indicate if your method can handle radicals Most methods only treat closed-shell molecules. | |
| void | gradient (const TVector &x, TVector &grad) override |
| void | cleanGradients (TVector &grad) |
| Real | constraintEnergies (const TVector &x) |
| void | constraintGradients (const TVector &x, TVector &grad) |
| std::vector< Core::Constraint > | constraints () const |
| void | setConstraints (const std::vector< Core::Constraint > &constraints) |
| void | setMask (TVector mask) |
| TVector | mask () const |
| virtual void | setMolecule (Core::Molecule *mol)=0 |
Protected Member Functions | |
| void | appendError (const std::string &errorString, bool newLine=true) const |
| Append an error to the error string for the model. | |
Protected Attributes | |
| TVector | m_mask |
| std::vector< Core::Constraint > | m_distanceConstraints |
| std::vector< Core::Constraint > | m_angleConstraints |
| std::vector< Core::Constraint > | m_torsionConstraints |
| std::vector< Core::Constraint > | m_outOfPlaneConstraints |
|
pure virtual |
Create a new instance of the model. Ownership passes to the caller.
Implemented in LennardJones, and UFF.
|
pure virtual |
Implemented in LennardJones, and UFF.
|
pure virtual |
Implemented in LennardJones, and UFF.
|
pure virtual |
Implemented in LennardJones, and UFF.
|
virtual |
Called to set the configuration (e.g., for a GUI options dialog)
|
pure virtual |
Implemented in LennardJones, and UFF.
|
virtual |
Reimplemented in LennardJones, and UFF.
|
virtual |
Reimplemented in LennardJones, and UFF.
|
virtual |
Reimplemented in LennardJones, and UFF.
|
override |
Calculate the gradients for this method, defaulting to numerical finite-difference methods
| void cleanGradients | ( | TVector & | grad | ) |
Called to 'clean' gradients
| grad | (e.g., for constraints) |
| Real constraintEnergies | ( | const TVector & | x | ) |
Called to get the energies for the current set of constraints. which should be added to the value() method for real energies in derived classes
| void constraintGradients | ( | const TVector & | x, |
| TVector & | grad ) |
Called to get the gradients for the current set of constraints. which should be added to the gradient() method in derived classes.
| x | the current coordinates |
| grad | the gradient vector to be updated with constraint gradients |
| std::vector< Core::Constraint > constraints | ( | ) | const |
Called to get the constraints for this method.
| void setMask | ( | TVector | mask | ) |
Called to update the "frozen" mask (e.g., during editing)
| TVector mask | ( | ) | const |
|
pure virtual |
Called when the current molecule changes.
Implemented in LennardJones, and UFF.
|
protected |
| errorString | The error to be added. |
| newLine | Add a new line after the error string? |