template class forcefields::ZhuPhilpott¶
Overview¶
Forcefield for water and platinum interactions. This forcefield is the A2 water-platinum potential invented by Zhu and Philpott”. It includes the SPC/E+CCL potential for interaction between the molecules of water. The SPC/E is a potential for constrained water. This implementation includes restraints so it may be used without constraint (see class SpceCcl).n The potential uses Kong’s rules to combine the Lennard-Jones parameters of platinum with oxygen and hydrogen. A @ref combinationReview “review of combination rules” including Kong’s rule can be find on the web.
The system of unit used by the class is (eV, Angstrom, fs, e). More…
template <class P = zhu_philpott_parameters::Standard>
class ZhuPhilpott:
public forcefields::SpceCcl,
private forcefields::zhu_philpott_parameters::Standard {
public:
// construction
ZhuPhilpott();
ZhuPhilpott(double cutoff, double switchingWidth);
ZhuPhilpott(ZhuPhilpott const& zhuPhilpott);
~ZhuPhilpott();
// methods
void operator=(ZhuPhilpott const& zhuPhilpott);
void computeHH_O_Pt_(const int nWater, const int nPt, const double r[], double f[], double& energy, double const b[], bool const fixed[]);
void computeHH_O_(const int nWater, const double r[], double f[], double& energy, double const b[], bool const fixed[]);
int nPlatinum() const;
void setPlatinum(int nPlatinum, double const positions[]);
template <int H, int O, int H3, int O3>
void computeTemplate(const int nWater, const double(*) rh1[H3], const double(*) rh2[H3], const double(*) ro[O3], double(*) fh1[H3], double(*) fh2[H3], double(*) fo[O3], const int nPt, const double rPt[][3], double fPt[][3], double& energy, double const b[], bool const(*) xh1[H], bool const(*) xh2[H], bool const(*) xo[O], bool const xPt[]);
static char const* getName();
};
Inherited Members¶
public:
// structs
template <int N, class R = double(*const)[N], class F = double(*const)[N]>
struct ChargeGroup;
struct Vector3;
struct Dtheta;
struct Rho;
struct Water;
// fields
static double const sigmaO_ = 2.86;
static double const epsilonO_ = 0.0023734176137013181;
static double const sigmaH_ = 2.56;
static double const epsilonH_ = 0.00087578073518673099;
static double const C10_O_ = 1.28;
static double const C10_H_ = 1.2;
static double const alpha_ = 0.8;
static double const sigmaHPt_ = 2.730249677569295;
static double const sigmaOPt_ = 2.7735458150747108;
static double const epsilonHPt_ = 0.016217645873043762;
static double const epsilonOPt_ = 0.03387330127291549;
// methods
double getSwitchingWidth() const;
void setSwitchingWidth(double width);
double getCutoff() const;
void setCutoff(double cutoff);
static double applyPeriodicity0(double r, double const period);
static void applyPeriodicity0(double r[], double const periods[]);
void computeHH_O_(const int nAtoms, const double R[], double F[], double& U, const double b[]);
void computeHH_O_(const int nAtoms, const double R[], double F[], double& U, const double b[], const bool fixed[]);
char const* getName() const;
void computeHH_O_(const int nAtoms, const double R[], double F[], double& U, const double b[]);
void computeHH_O_(const int nAtoms, const double R[], double F[], double& U, const double b[], const bool fixed[]);
char const* getName() const;
Detailed Documentation¶
Forcefield for water and platinum interactions. This forcefield is the A2 water-platinum potential invented by Zhu and Philpott”. It includes the SPC/E+CCL potential for interaction between the molecules of water. The SPC/E is a potential for constrained water. This implementation includes restraints so it may be used without constraint (see class SpceCcl).n The potential uses Kong’s rules to combine the Lennard-Jones parameters of platinum with oxygen and hydrogen. A @ref combinationReview “review of combination rules” including Kong’s rule can be find on the web.
The system of unit used by the class is (eV, Angstrom, fs, e).
References¶
Interaction of water with metal surfaces, S.-B. Zhu and M.R. Philpott J. Chem. Phys. (1994) vol. 100, No 9, p. 6961.
A Molecular Dynamics Simulation of Water Droplet in Contact with a Platinum Surface, T. Kimura and S. Maruyama, University of Tokyo.
Unlike Lennard-Jones Parameters for Vapor-Liquid Equilibria, Thorsten Schnabel, Jadran Vrabec , Hans Hasse, Institut fur Technische Thermodynamik und Thermische Verfahrenstechnik, Universitat Stuttgart, D-70550 Stuttgart, Germany, http://www.itt.uni-stuttgart.de/~schnabel/CR.pdf.
Methods¶
void computeHH_O_Pt_(const int nWater, const int nPt, const double r[], double f[], double& energy, double const b[], bool const fixed[])
Compute water-platinum forcefield.
Warning
The conductivity is simulated by interaction a mirror images of charges. The mirror surface is set at z=0, which should correspond to the location of the highest layer of platinum atoms.
Parameters:
nWater |
Number of molecules of water. |
nPt |
Number of platinum atoms. |
r |
Positions of the atoms. |
f |
Forces on the atoms. |
energy |
Potential energy. |
b |
Periodic boundaries. Length: 3 |
fixed |
True for fixed atoms, false otherwise. The order of the atoms is all hydrogens (hydrogens belonging to the same molecule are next to each others), all oxygen, all platinum. The length of arrays r and f is \(3\times(3 \times nWater+nPt)\). The length of array fixed is \(3 \times nWater+nPt\). When fixed is provided the interaction between two fixed atoms may be skipped to speed up the calculation. The parameter is optional. |
void computeHH_O_(const int nWater, const double r[], double f[], double& energy, double const b[], bool const fixed[])
Compute water-platinum interactions, call with water’s positions only. This function is called with the coordinates of the atoms of water only. The positions of the platinum atoms must have been previously provided through function setPlatinum().
Note
The function does not return the forces on platinum atoms as they as assumed to be fixed.
Parameters:
nWater |
Number of molecules of water. |
r |
Positions of atoms in water. |
f |
Forces on the atoms in water. |
energy |
Potential energy. |
b |
Periodic boundaries. Length: 3 |
fixed |
True for fixed atoms, false otherwise. The length of arrays r and f is \(9\times nWater\). The length of array fixed is \(3 \times nWater\). |
See also:
setPlatinum() and computeHH_O_Pt_().
int nPlatinum() const
Number of platinum atoms.
See also:
void setPlatinum(int nPlatinum, double const positions[])
Initialises the positions of the atoms of platinum. Use before calling computeHH_O_().
static char const* getName()
Name of the potential.