Class Scine::Utils::Dftd3::Dftd3

class Dftd3

A class calculating D3 semi-classical dispersion corrections (with BJ damping) for energies and gradients.

 This class uses a default constructor. The calculations are initialized by the initialize function.
 Simple calculations are done using the calculate function, to which you can pass the required
 derivative level.

References:

  • J. Chem. Phys. 132, 154104, (2010) (Description D3)

  • J. Comput. Chem. 32, 1456, (2011) (Description of BJ damping function)

Developer Info:

  • The assignment of some functions as public is based on the fact that they are needed for the non-bonded interactions in the molecular mechanics library.

Public Functions

void initialize(AtomCollection atomCollection, double a1, double s8, double a2)

The initialize function needs to be called before a calculation as a set-up.

The meaning of the three Grimme D3 parameters can be found in the aformentioned reference.

double getEnergy()

Getter for the D3 energy.

Return

double

GradientCollection getGradients()

Getter for the D3 gradients.

std::vector<Dftd3Atom> getStructure()

Getter for the structure in the format of a vector of Dftd3Atoms.

void calculate(derivativeType d)

This function needs to be called to do a D3 dispersion correction calculation.

Parameters
  • d: derivative type, up to which will be calculated (either none or first).

void setStructure(std::vector<Dftd3Atom> structure)

Set structure as vector of Dftd3Atoms.

double calculateC6Coefficient(Dftd3Atom atom1, Dftd3Atom atom2)

Calculates C6 coefficient for one atom pair.

Return

double

double calculateC8Coefficient(Dftd3Atom atom1, Dftd3Atom atom2, double c6)

Calculates C8 coefficient for one atom pair.

Return

double

Parameters
  • C6: coefficient for that atom pair.

double getR0(int atom1Index, int atom2Index)

Getter for the pair cutoff radius R0 for one atom pair.

Return

double

Eigen::MatrixXd getC6Matrix() const

Getter for the matrix of all C6 coefficients.

Return

Eigen::MatrixXd

double calculateCoordinationNumber(Dftd3Atom atom)

This function calculates the D3 coordination number (fractional value).

Return

double