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 1502 by gezelter, Sat Oct 2 19:53:32 2010 UTC

# Line 42 | Line 42
42   #ifndef NONBONDED_SC_HPP
43   #define NONBONDED_SC_HPP
44  
45 < #include "types/AtomType.hpp"
45 > #include "nonbonded/NonBondedInteraction.hpp"
46   #include "UseTheForce/ForceField.hpp"
47 #include "math/Vector3.hpp"
47   #include "math/CubicSpline.hpp"
48  
49   namespace OpenMD {
# Line 70 | Line 69 | namespace OpenMD {
69      bool explicitlySet;
70    };
71      
72 <  class SC {
72 >  class SC : public MetallicInteraction {
73      
74    public:    
75 <    static SC* Instance();
76 <    static void setForceField(ForceField *ff) {forceField_ = ff;};
77 <    static void initialize();
78 <    static void addType(AtomType* atomType);
79 <    static void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha);
80 <    
81 <    static void calcDensity(AtomType* at1, AtomType* at2, const RealType rij, RealType &rho_i_at_j, RealType &rho_j_at_i);
82 <
83 <    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 <
75 >    SC();
76 >    void setForceField(ForceField *ff) {forceField_ = ff;};
77 >    void addType(AtomType* atomType);
78 >    void addExplicitInteraction(AtomType* atype1, AtomType* atype2, RealType epsilon, RealType m, RealType n, RealType alpha);
79 >    void calcDensity(DensityData ddat);
80 >    void calcFunctional(FunctionalData fdat);
81 >    void calcForce(InteractionData idat);
82 >    virtual string getName() {return name_;}
83 >  
84    private:
85 <    virtual ~SC() { }
86 <    // singleton pattern, prevent reconstruction
87 <    SC() { }
88 <    SC(SC const &) {};
89 <    SC& operator=(SC const&) {};
90 <    static SC* _instance;
85 >    void initialize();
86 >    SCParam getSCParam(AtomType* atomType);
87 >    RealType getC(AtomType* atomType);
88 >    RealType getM(AtomType* atomType);
89 >    RealType getN(AtomType* atomType);
90 >    RealType getAlpha(AtomType* atomType);
91 >    RealType getEpsilon(AtomType* atomType);
92 >    RealType getAlpha(AtomType* atomType1, AtomType* atomType2);
93 >    RealType getEpsilon(AtomType* atomType1, AtomType* atomType2);
94 >    RealType getM(AtomType* atomType1, AtomType* atomType2);
95 >    RealType getN(AtomType* atomType1, AtomType* atomType2);
96      
97 <    static SCParam getSCParam(AtomType* atomType);
98 <    static RealType getC(AtomType* atomType);
99 <    static RealType getM(AtomType* atomType);
100 <    static RealType getN(AtomType* atomType);
101 <    static RealType getAlpha(AtomType* atomType);
102 <    static RealType getEpsilon(AtomType* atomType);
103 <    static RealType getAlpha(AtomType* atomType1, AtomType* atomType2);
104 <    static RealType getEpsilon(AtomType* atomType1, AtomType* atomType2);
111 <    static RealType getM(AtomType* atomType1, AtomType* atomType2);
112 <    static RealType getN(AtomType* atomType1, AtomType* atomType2);
97 >    string name_;
98 >    bool initialized_;
99 >    map<int, AtomType*> SClist;
100 >    map<AtomType*, SCAtomData> SCMap;
101 >    map<pair<AtomType*, AtomType*>, SCInteractionData> MixingMap;
102 >    ForceField* forceField_;
103 >    RealType scRcut_;
104 >    int np_;
105      
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    
106    };
107   }
108  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines