Loading...
Searching...
No Matches
LennardJones Class Reference
Inheritance diagram for LennardJones:

## Public Member Functions

LennardJones * | newInstance () const override
std::string | identifier () const override
std::string | name () const override
std::string | description () const override
bool | acceptsIons () const override
| Indicate if your method can handle ions Many methods only treat neutral systems, either a neutral molecule or a neutral unit cell.
bool | acceptsRadicals () const override
| Indicate if your method can handle radicals Most methods only treat closed-shell molecules.
bool | acceptsUnitCell () const override
| Indicate if your method can handle unit cells.
Core::Molecule::ElementMask | elements () const override
| Indicate if your method only treats a subset of elements.
Real | value (const Eigen::VectorXd &x) override
void | gradient (const Eigen::VectorXd &x, Eigen::VectorXd &grad) override
Real | evaluate (const Eigen::VectorXd &x, Eigen::VectorXd *grad) override
void | setMolecule (Core::Molecule *mol) override
Public Member Functions inherited from EnergyCalculator
virtual std::string | userOptions () const
| Return a JSON object string describing optional user-editable settings for this model. Empty string means no user options.
virtual bool | setUserOptions (const std::string &optionsJson)
| Set user-selected options serialized as a JSON object string.
void | finiteGradient (const Eigen::VectorXd &x, Eigen::VectorXd &grad, int accuracy=0)
virtual void | hessian (const Eigen::VectorXd &x, Eigen::MatrixXd &hess)
void | finiteHessian (const Eigen::VectorXd &x, Eigen::MatrixXd &hess, int accuracy=0)
void | cleanGradients (Eigen::VectorXd &grad)
Real | constraintEnergies (const Eigen::VectorXd &x)
void | constraintGradients (const Eigen::VectorXd &x, Eigen::VectorXd &grad)
std::vector< Core::Constraint > | constraints () const
void | setConstraints (const std::vector< Core::Constraint > &constraints)
void | setMask (Eigen::VectorXd mask)
Eigen::VectorXd | mask () const

## Protected Attributes

Core::Molecule * | m_molecule
Core::UnitCell * | m_cell
Eigen::MatrixXd | m_radii
bool | m_vdw
Real | m_depth
int | m_exponent
Core::Molecule::ElementMask | m_elements
Protected Attributes inherited from EnergyCalculator
Eigen::VectorXd | 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

## Additional Inherited Members

Protected Member Functions inherited from EnergyCalculator
void | appendError (const std::string &errorString, bool newLine=true) const
| Append an error to the error string for the model.

## Member Function Documentation

## newInstance()

LennardJones * newInstance | ( |  | ) | const

override virtual

Create a new instance of the model. Ownership passes to the caller.

Implements EnergyCalculator.

## identifier()

std::string identifier | ( |  | ) | const

override virtual

Returns
  a unique identifier for this calculator.

Implements EnergyCalculator.

## name()

std::string name | ( |  | ) | const

override virtual

Returns
  A short translatable name for this method (e.g., MMFF94, UFF, etc.)

Implements EnergyCalculator.

## description()

std::string description | ( |  | ) | const

override virtual

Returns
  a description of the method

Implements EnergyCalculator.

## acceptsIons()

bool acceptsIons | ( |  | ) | const

override virtual

Returns
  true if ions are supported

Reimplemented from EnergyCalculator.

## acceptsRadicals()

bool acceptsRadicals | ( |  | ) | const

override virtual

Returns
  true if radicals are supported

Reimplemented from EnergyCalculator.

## acceptsUnitCell()

bool acceptsUnitCell | ( |  | ) | const

override virtual

Returns
  true if unit cells are supported

Reimplemented from EnergyCalculator.

## elements()

Core::Molecule::ElementMask elements | ( |  | ) | const

override virtual

Returns
  an element mask corresponding to the defined subset

Implements EnergyCalculator.

## value()

Real value | ( | const Eigen::VectorXd & | x | ) |

override virtual

Calculate the energy for this method.

Implements EnergyCalculator.

## gradient()

void gradient | ( | const Eigen::VectorXd & | x,
|  | Eigen::VectorXd & | grad )

override virtual

Calculate the gradients for this method, defaulting to numerical finite-difference methods

Reimplemented from EnergyCalculator.

## evaluate()

Real evaluate | ( | const Eigen::VectorXd & | x,
|  | Eigen::VectorXd * | grad )

override virtual

Evaluate the energy and optionally gradients in one call.

Derived classes with efficient fused implementations should override this.

Reimplemented from EnergyCalculator.

## setMolecule()

void setMolecule | ( | Core::Molecule * | mol | ) |

override virtual

Called when the current molecule changes.

Implements EnergyCalculator.

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

- lennardjones.h