JDFTx  1.4.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
VanDerWaals Class Reference

DFT-D2 pair potential dispersion correction [10]. More...

#include <VanDerWaals.h>

Classes

struct  AtomParams
 C6 and R0 parameters for the VDW interactions. More...
 

Public Member Functions

 VanDerWaals (const Everything &everything)
 
double energyAndGrad (std::vector< Atom > &atoms, const double scaleFac) const
 
double energyAndGrad (const std::vector< std::vector< vector3<> > > &atpos, const ScalarFieldTildeArray &Ntilde, const std::vector< int > &atomicNumber, const double scaleFac, ScalarFieldTildeArray *grad_Ntilde=0, struct IonicGradient *forces=0) const
 
double getScaleFactor (string exCorrName, double scaleOverride=0.) const
 
AtomParams getParams (int atomicNumber, int sp) const
 retrieve vdW parameters for an atom
 

Static Public Attributes

static const int unitParticle = -1
 special atomic number used by some fluids: point particle with C6=1 J-nm^6/mol and R0=0
 

Detailed Description

DFT-D2 pair potential dispersion correction [10].

Member Function Documentation

double VanDerWaals::energyAndGrad ( std::vector< Atom > &  atoms,
const double  scaleFac 
) const

Van der Waal correction energy for a collection of discrete atoms at fixed locations Corresponding forces are accumulated to Atom::force for each atom

double VanDerWaals::energyAndGrad ( const std::vector< std::vector< vector3<> > > &  atpos,
const ScalarFieldTildeArray Ntilde,
const std::vector< int > &  atomicNumber,
const double  scaleFac,
ScalarFieldTildeArray grad_Ntilde = 0,
struct IonicGradient forces = 0 
) const

Van der Waal correction to the interaction energy between the explicit atoms (from IonInfo) and the continuous fields Ntilde with specified atomic numbers. The gradient w.r.t site densities is accumulated to grad_Ntilde (if non-null) and the negative gradient w.r.t discrete atom positions is accumulated to forces (if non-null)

double VanDerWaals::getScaleFactor ( string  exCorrName,
double  scaleOverride = 0. 
) const

Retrieve the scale factor for a specified exchange-correlation functional (or return scaleOverride if supplied) Quits with an appropriate error message suggesting the scale-override if functional not parametrized


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