36 |
|
* [1] Meineke, et al., J. Comp. Chem. 26, 252-271 (2005). |
37 |
|
* [2] Fennell & Gezelter, J. Chem. Phys. 124, 234104 (2006). |
38 |
|
* [3] Sun, Lin & Gezelter, J. Chem. Phys. 128, 24107 (2008). |
39 |
< |
* [4] Vardeman & Gezelter, in progress (2009). |
39 |
> |
* [4] Kuang & Gezelter, J. Chem. Phys. 133, 164101 (2010). |
40 |
> |
* [5] Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011). |
41 |
|
*/ |
42 |
|
|
43 |
|
#ifndef NONBONDED_SC_HPP |
44 |
|
#define NONBONDED_SC_HPP |
45 |
|
|
46 |
< |
#include "types/AtomType.hpp" |
46 |
> |
#include "nonbonded/NonBondedInteraction.hpp" |
47 |
|
#include "UseTheForce/ForceField.hpp" |
47 |
– |
#include "math/Vector3.hpp" |
48 |
|
#include "math/CubicSpline.hpp" |
49 |
+ |
#include "types/SuttonChenAdapter.hpp" |
50 |
|
|
51 |
|
namespace OpenMD { |
52 |
|
|
71 |
|
bool explicitlySet; |
72 |
|
}; |
73 |
|
|
74 |
< |
class SC { |
74 |
> |
class SC : public MetallicInteraction { |
75 |
|
|
76 |
|
public: |
77 |
< |
static SC* Instance(); |
78 |
< |
static void setForceField(ForceField *ff) {forceField_ = ff;}; |
79 |
< |
static void initialize(); |
80 |
< |
static void addType(AtomType* atomType); |
81 |
< |
static void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha); |
82 |
< |
|
83 |
< |
static void calcDensity(AtomType* at1, AtomType* at2, const RealType rij, RealType &rho_i_at_j, RealType &rho_j_at_i); |
84 |
< |
|
85 |
< |
static void calcFunctional(AtomType* at1, const RealType rho, RealType &frho, RealType &dfrhodrho); |
86 |
< |
|
86 |
< |
static void calcForce(AtomType* at1, AtomType* at2, const Vector3d d, const RealType rij, const RealType r2, const RealType sw, RealType &vpair, RealType &pot, Vector3d &f1, const RealType rho1, const RealType rho2, const RealType dfrho1, const RealType dfrho2, RealType &fshift1, RealType &fshift2); |
87 |
< |
|
88 |
< |
// Fortran support routines; |
89 |
< |
static void calc_sc_prepair_rho(int *atid1, int *atid2, RealType *rij, RealType* rho_i_at_j, RealType* rho_j_at_i); |
90 |
< |
static void calc_sc_preforce_Frho(int *atid1, RealType* rho, RealType* frho, RealType* dfrhodrho); |
91 |
< |
static void do_sc_pair(int *atid1, int *atid2, RealType *d, RealType *rij, RealType *r2, RealType *sw, RealType *vpair, RealType *pot, RealType *f1, RealType* rho1, RealType* rho2, RealType* dfrho1, RealType* dfrho2, RealType* fshift1, RealType* fshift2); |
92 |
< |
static void setCutoffSC(RealType *thisRcut); |
93 |
< |
static RealType getSCcut(int *atid1); |
94 |
< |
|
77 |
> |
SC(); |
78 |
> |
void setForceField(ForceField *ff) {forceField_ = ff;}; |
79 |
> |
void addType(AtomType* atomType); |
80 |
> |
void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha); |
81 |
> |
void calcDensity(InteractionData &idat); |
82 |
> |
void calcFunctional(SelfData &sdat); |
83 |
> |
void calcForce(InteractionData &idat); |
84 |
> |
virtual string getName() {return name_;} |
85 |
> |
virtual RealType getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes); |
86 |
> |
|
87 |
|
private: |
88 |
< |
virtual ~SC() { } |
89 |
< |
// singleton pattern, prevent reconstruction |
90 |
< |
SC() { } |
91 |
< |
SC(SC const &) {}; |
92 |
< |
SC& operator=(SC const&) {}; |
101 |
< |
static SC* _instance; |
88 |
> |
void initialize(); |
89 |
> |
RealType getAlpha(AtomType* atomType1, AtomType* atomType2); |
90 |
> |
RealType getEpsilon(AtomType* atomType1, AtomType* atomType2); |
91 |
> |
RealType getM(AtomType* atomType1, AtomType* atomType2); |
92 |
> |
RealType getN(AtomType* atomType1, AtomType* atomType2); |
93 |
|
|
94 |
< |
static SCParam getSCParam(AtomType* atomType); |
95 |
< |
static RealType getC(AtomType* atomType); |
96 |
< |
static RealType getM(AtomType* atomType); |
97 |
< |
static RealType getN(AtomType* atomType); |
98 |
< |
static RealType getAlpha(AtomType* atomType); |
99 |
< |
static RealType getEpsilon(AtomType* atomType); |
100 |
< |
static RealType getAlpha(AtomType* atomType1, AtomType* atomType2); |
101 |
< |
static RealType getEpsilon(AtomType* atomType1, AtomType* atomType2); |
111 |
< |
static RealType getM(AtomType* atomType1, AtomType* atomType2); |
112 |
< |
static RealType getN(AtomType* atomType1, AtomType* atomType2); |
94 |
> |
string name_; |
95 |
> |
bool initialized_; |
96 |
> |
map<int, AtomType*> SClist; |
97 |
> |
map<AtomType*, SCAtomData> SCMap; |
98 |
> |
map<pair<AtomType*, AtomType*>, SCInteractionData> MixingMap; |
99 |
> |
ForceField* forceField_; |
100 |
> |
RealType scRcut_; |
101 |
> |
int np_; |
102 |
|
|
114 |
– |
static bool initialized_; |
115 |
– |
static map<int, AtomType*> SClist; |
116 |
– |
static map<AtomType*, SCAtomData> SCMap; |
117 |
– |
static map<pair<AtomType*, AtomType*>, SCInteractionData> MixingMap; |
118 |
– |
static ForceField* forceField_; |
119 |
– |
static RealType scRcut_; |
120 |
– |
static int np_; |
121 |
– |
|
103 |
|
}; |
104 |
|
} |
105 |
|
|