Loading...
Searching...
No Matches
Tip4p Class Reference

#include <Water.hpp>

Inheritance diagram for Tip4p:

Classes

struct  Water
 Pointers for one molecule of water. More...

Public Member Functions

 Tip4p (const Parameters &params)
void cleanMemory (void)
void force (long N, const double *R, const int *atomicNrs, double *F, double *U, double *variance, const double *box) override
Public Member Functions inherited from eonc::Potential
 Potential (PotType a_ptype)
 Potential (PotType a_ptype, const Parameters &)
 Potential (const Parameters &a_params)
virtual ~Potential ()
std::tuple< double, AtomMatrixget_ef (const AtomMatrix &pos, const VectorXi &atmnrs, const Matrix3d &box)
PotType getType () const
virtual bool isSurrogate () const noexcept
 Whether this is a surrogate (GP) potential.
virtual bool requiresIsolatedMoleculeLayout () const noexcept
 True for molecular QM / non-PBC backends (NWChem socket, ASE ORCA/NWChem, …).
virtual bool isThreadSafe () const noexcept
 Whether this potential's force() can be called from multiple threads on the SAME instance.
virtual bool isSharedInstanceThreadSafe () const noexcept
 Conservative gate for sharing one Potential instance across threads.
virtual bool needsPerImageInstance () const noexcept
 Whether NEB should create separate Potential instances per image for true parallel force evaluation.
virtual bool supportsBatchEvaluation () const noexcept
 Whether this potential supports batched evaluation of N systems in a single call.
virtual void forceBatch (long nSystems, long nAtoms, const double *const *positions, const int *const *atomicNrs, double *const *forces, double *energies, double *variances, const double *const *boxes)
 Evaluate forces for N systems in a single call.

Additional Inherited Members

Public Attributes inherited from eonc::Potential
std::atomic< size_t > forceCallCounter
Protected Attributes inherited from eonc::Potential
PotType ptype
Private Member Functions inherited from forcefields::Tip4p
 Tip4p ()
 Tip4p (double cutoff, double switchingWidth)
 ~Tip4p ()
void computeHH_O_ (const int nAtoms, const double R[], double F[], double &U, const double b[])
 Compute the forces and the energy.
void computeHH_O_ (const int nAtoms, const double R[], double F[], double &U, const double b[], const bool fixed[])
 Compute the forces and the energy (with fixed atom optimisation).
Private Member Functions inherited from forcefields::Ccl
 Ccl ()
void computeHH_O_ (const int nAtoms, const double R[], double F[], double &U, const double b[])
 Compute the forces and the energy.
void computeHH_O_ (const int nAtoms, const double R[], double F[], double &U, const double b[], const bool fixed[])
 Compute the forces and the energy (with fixed atom optimisation).
char const * getName () const
 Name of the potential.
 Ccl (double cutoff, double switchingWidth)
 Constructor with cutoff for derived classes.
void intramolecular (double const rh1[], double const rh2[], double const ro[], double fh1[], double fh2[], double fo[], double &energy)
 Interactions inside one molecules.
void initialiseRho (Vector3 const &v, Rho &r)
 Initialise Rho.
void initialiseDtheta (Vector3 const &v1, Vector3 const &v2, Dtheta &dth, double const thetaEquilibrium)
 Initialise Dtheta.
void intramolecular (Rho const &ro1, Rho const &ro2, Dtheta const &dth, double &energy, double fh1[], double fh2[], double fo[])
 Compute intramolecular energy and forces.
Private Member Functions inherited from forcefields::PotentialBase
 PotentialBase ()
 Non bond interaction cutoff.
 PotentialBase (double cutoff, double switchingWidth)
virtual ~PotentialBase ()
double getCutoff () const
void setCutoff (double cutoff)
double getSwitchingWidth () const
 Width of the switching zone.
void setSwitchingWidth (double width)
void restrainAngle (double const r1[], double const r2[], double const r3[], double f1[], double f2[], double f3[], double &u, const double k, const double aeq)
 Angular quadratic restraints.
void calculateCentre (double const r1[], double const r2[], double rc[])
 Calculate centre of two points.
void calculateCentre (double const r1[], double const r2[], double const r3[], double rc[])
 Calculate centre of three points.
void calculateWeightedCentre (double const w1, double const w2, double const w3, double const r1[], double const r2[], double const r3[], double rc[])
 Calculate barycentre.
void coulombWithCutoff (const double r1[], const double r2[], double f1[], double f2[], double &u, double const qq)
 Coulomb interaction with single charge based cutoff.
void coulomb (const double r1[], const double r2[], double f1[], double f2[], double &u, double const qq)
 Compute Coulomb interaction between two charges.
void coulomb (double distance, double &force, double &energy, double const qq)
 Compute Coulomb interaction between two charges.
void spreadForce (double f1[], double f2[], double const fc[])
 Spread force on centre to other points.
void spreadForce (double f1[], double f2[], double f3[], double const fc[])
 Spread force on centre to other points.
void spreadWeightedForce (double const w1, double const w2, double const w3, double f1[], double f2[], double f3[], double const fc[])
 Spread force on barycentre to atoms.
template<int N, class R, class F>
void addForces (ChargeGroup< N, R, F > const &g1, ChargeGroup< N, R, F > &g2)
 Increment forces.
template<int N, class R, class F>
void switching (ChargeGroup< N, R, F > &g1, ChargeGroup< N, R, F > &g2, double &energy, double cutoff, double switchingWidth)
void computePt (int const nAtoms, double positions[], double forces[], double &energy, double const periods[], bool const fixed[])
 Potential for Platinum.
void restrainLength (const double R1[], const double R2[], double F1[], double F2[], double &u, const double k, const double r0)
 Compute quadratic restraints between two atoms.
void lennardJones (double const distance, double &force, double &energy, double const epsilon, double const sigma)
 Lennard-Jones 12-6 between two atoms.
void lennardJones (const double R1[], const double R2[], double F1[], double F2[], double &E, double const epsilon, double const sigma)
 Lennard-Jones 12-6 between two atoms.
void lennardJonesWithCutoff (double const r1[], double const r2[], double f1[], double f2[], double &energy, double const epsilon, double const sigma)
 Lennard Jones 12-6 Potential with cutoff.
void switching (double const distance, double &force, double &energy)
 Smooth cutoff switch off.
void switching (double const r1[], double const r2[], double f1[], double f2[], double &energy)
 Smooth cutoff switch off.
double applyPeriodicity1 (double r, int const axis)
 Minimum image representation.
void applyPeriodicity1 (double r[])
 Minimum image representation.
void distance (const double x[], const double y[], double z[], double &z1, double &z2)
 Distance vector, norm and norm square.
void distance (const double x[], const double y[], double z[], double &z1)
 Distance.
void distance (const double x[], const double y[], double z[])
 Distance vector, norm.
void distance (const double x[], const double y[], double &z1)
 Distance.
void distance (const double x[], const double y[], Vector3 &z)
 Distance vector, norm and norm square.
void setPeriodicity (const double periods[])
 Set periodicity.
double unBreak1 (double const r, double const ref, int const axis)
 Undo the separation of two atoms created by the periodic boundaries.
void unBreak1 (double r[], double const ref[])
 Undo the separation of two atoms created by the periodic boundaries.
Static Private Member Functions inherited from forcefields::Tip4p
static char const * getName ()
 Name of the potential.
static double applyPeriodicity0 (double r, double const period)
 Minimum image representation.
static void applyPeriodicity0 (double r[], double const periods[])
 Minimum image representation.
static void divide (double v[], double const divisor)
 Divide vector.
static double * crossProduct (const double v[], const double w[], double e[])
 Cross product.
static double dotProduct (double const v[], double const w[])
 Dot product.
static void multiply (double v[], double const factor)
 Multiply vector.
static double norm (double const v[])
 Norm of 3D vector.
static void normalise (double v[])
 Normalise 3D vector \( \frac{\mathbf v}{ |\mathbf v|} \).
static double isoscelesBase (double length, double angle)
 Calculate the base of an isosceles triangle.
static double epsilon (double const A, double const B)
 Conversion for Lennard-Jones.
static double sigma (double const A, double const B)
 Conversion for Lennard-Jones.
static double smithKongEpsilon (double sigma1, double epsilon1, double sigma2, double epsilon2)
 Smith and Kong combination rules.
static double smithKongSigma (double sigma1, double epsilon1, double sigma2, double epsilon2)
 Smith and Kong combination rules.
static double unBreak0 (double const r, double const ref, double const period)
 Undo the separation of two atoms created by the periodic boundaries.
static void unBreak0 (double r[], double const ref[], double const periods[])
 Undo the separation of two atoms created by the periodic boundaries.
Private Attributes inherited from forcefields::PotentialBase
double cutoff_
double periods_ [3]
double switchingWidth_
Static Private Attributes inherited from forcefields::Ccl
static double const re_ = ::re_
 Distance OH at equilibrium.
static double const thetae_ = ::thetae_
 Distance OH at equilibrium.
static const double ONE_OVER_4_PI_EPSILON0
static const double EPSILON_PT = 0.68165797577788501
 Platinum Lennard-Jones.
static const double SIGMA_PT = 2.54

Detailed Description

Definition at line 24 of file Water.hpp.

Constructor & Destructor Documentation

◆ Tip4p()

Tip4p::Tip4p ( const Parameters & params)
inline

Definition at line 26 of file Water.hpp.

27 : Potential(params),
28 forcefields::Tip4p(8.5, 1.0) {};
Potential(PotType a_ptype)
Definition Potential.h:35

Member Function Documentation

◆ cleanMemory()

void Tip4p::cleanMemory ( void )
inline

Definition at line 33 of file Water.hpp.

33{}

◆ force()

void Tip4p::force ( long N,
const double * R,
const int * atomicNrs,
double * F,
double * U,
double * variance,
const double * box )
overridevirtual

Implements eonc::Potential.

Definition at line 14 of file Water.cpp.

15 {
16 if (variance) {
17 *variance = 0.0;
18 }
19 double diagbox[3];
20 diagbox[0] = box[0];
21 diagbox[1] = box[4];
22 diagbox[2] = box[8];
23 computeHH_O_(N, R, F, *U, diagbox, 0);
24}
void computeHH_O_(const int nAtoms, const double R[], double F[], double &U, const double b[])
Compute the forces and the energy.
Definition tip4p_ccl.cpp:85

The documentation for this class was generated from the following files:
  • /home/runner/work/eOn/eOn/include/eon/potentials/Water/Water.hpp
  • /home/runner/work/eOn/eOn/client/potentials/Water/Water.cpp