ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/OpenMD/branches/development/src/nonbonded/SC.hpp
(Generate patch)

Comparing branches/development/src/nonbonded/SC.hpp (file contents):
Revision 1489 by gezelter, Tue Aug 10 18:34:59 2010 UTC vs.
Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC

# Line 36 | Line 36
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  
50   namespace OpenMD {
# Line 70 | Line 70 | namespace OpenMD {
70      bool explicitlySet;
71    };
72      
73 <  class SC {
73 >  class SC : public MetallicInteraction {
74      
75    public:    
76 <    static SC* Instance();
77 <    static void setForceField(ForceField *ff) {forceField_ = ff;};
78 <    static void initialize();
79 <    static void addType(AtomType* atomType);
80 <    static void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha);
81 <    
82 <    static void calcDensity(AtomType* at1, AtomType* at2, const RealType rij, RealType &rho_i_at_j, RealType &rho_j_at_i);
83 <
84 <    static void calcFunctional(AtomType* at1, const RealType rho, RealType &frho, RealType &dfrhodrho);
85 <
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 <
76 >    SC();
77 >    void setForceField(ForceField *ff) {forceField_ = ff;};
78 >    void addType(AtomType* atomType);
79 >    void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha);
80 >    void calcDensity(InteractionData &idat);
81 >    void calcFunctional(SelfData &sdat);
82 >    void calcForce(InteractionData &idat);
83 >    virtual string getName() {return name_;}
84 >    virtual RealType getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes);
85 >  
86    private:
87 <    virtual ~SC() { }
88 <    // singleton pattern, prevent reconstruction
89 <    SC() { }
90 <    SC(SC const &) {};
91 <    SC& operator=(SC const&) {};
92 <    static SC* _instance;
87 >    void initialize();
88 >    SCParam getSCParam(AtomType* atomType);
89 >    RealType getC(AtomType* atomType);
90 >    RealType getM(AtomType* atomType);
91 >    RealType getN(AtomType* atomType);
92 >    RealType getAlpha(AtomType* atomType);
93 >    RealType getEpsilon(AtomType* atomType);
94 >    RealType getAlpha(AtomType* atomType1, AtomType* atomType2);
95 >    RealType getEpsilon(AtomType* atomType1, AtomType* atomType2);
96 >    RealType getM(AtomType* atomType1, AtomType* atomType2);
97 >    RealType getN(AtomType* atomType1, AtomType* atomType2);
98      
99 <    static SCParam getSCParam(AtomType* atomType);
100 <    static RealType getC(AtomType* atomType);
101 <    static RealType getM(AtomType* atomType);
102 <    static RealType getN(AtomType* atomType);
103 <    static RealType getAlpha(AtomType* atomType);
104 <    static RealType getEpsilon(AtomType* atomType);
105 <    static RealType getAlpha(AtomType* atomType1, AtomType* atomType2);
106 <    static RealType getEpsilon(AtomType* atomType1, AtomType* atomType2);
111 <    static RealType getM(AtomType* atomType1, AtomType* atomType2);
112 <    static RealType getN(AtomType* atomType1, AtomType* atomType2);
99 >    string name_;
100 >    bool initialized_;
101 >    map<int, AtomType*> SClist;
102 >    map<AtomType*, SCAtomData> SCMap;
103 >    map<pair<AtomType*, AtomType*>, SCInteractionData> MixingMap;
104 >    ForceField* forceField_;
105 >    RealType scRcut_;
106 >    int np_;
107      
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    
108    };
109   }
110  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines