Loading...
Searching...
No Matches
tip4p_ccl.hpp
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13#include "ccl.hpp"
14
21
22namespace forcefields {
23class Tip4p : public Ccl {
24public:
25 Tip4p();
26 Tip4p(double cutoff, double switchingWidth);
27 ~Tip4p() {}
28 void computeHH_O_(const int nAtoms, const double R[], double F[], double &U,
29 const double b[]);
30 void computeHH_O_(const int nAtoms, const double R[], double F[], double &U,
31 const double b[], const bool fixed[]);
32 static char const *getName();
33
34private:
35 struct Water;
36 template <int H, int O>
37 void computeTemplate(const int nMolecules, const double (*const rh1)[H * 3],
38 const double (*const rh2)[H * 3],
39 const double (*const ro)[O * 3],
40 double (*const fh1)[H * 3], double (*const fh2)[H * 3],
41 double (*const fo)[O * 3], double &energy,
42 double const b[], bool const (*const xh1)[H] = 0,
43 bool const (*const xh2)[H] = 0,
44 bool const (*const xo)[O] = 0);
45 void coulombWithCutoff(Water &w1, Water &w2, double &U);
46 void coulombFull(Water &w1, Water &w2, double &U);
47 void lennardJonesWithCutoff(Water &w1, Water &w2, double &U);
48};
49} // namespace forcefields
Potential CCL Table II for intramolecular interactions in water.
static char const * getName()
Name of the potential.
void coulombWithCutoff(Water &w1, Water &w2, double &U)
Interactions between two molecules.
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
void lennardJonesWithCutoff(Water &w1, Water &w2, double &U)
Interactions between two molecules.
void coulombFull(Water &w1, Water &w2, double &U)
Interactions between two molecules.
void computeTemplate(const int nMolecules, const double(*const rh1)[H *3], const double(*const rh2)[H *3], const double(*const ro)[O *3], double(*const fh1)[H *3], double(*const fh2)[H *3], double(*const fo)[O *3], double &energy, double const b[], bool const (*const xh1)[H]=0, bool const (*const xh2)[H]=0, bool const (*const xo)[O]=0)
Compute forces and energy.