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

Comparing branches/development/src/nonbonded/InteractionManager.hpp (file contents):
Revision 1504 by gezelter, Sat Oct 2 20:41:53 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_INTERACTIONMANAGER_HPP
# Line 44 | Line 45
45  
46   #include "brains/SimInfo.hpp"
47   #include "types/AtomType.hpp"
47 #include "UseTheForce/ForceField.hpp"
48   #include "nonbonded/LJ.hpp"
49   #include "nonbonded/GB.hpp"
50   #include "nonbonded/Sticky.hpp"
# Line 52 | Line 52
52   #include "nonbonded/SC.hpp"
53   #include "nonbonded/Morse.hpp"
54   #include "nonbonded/Electrostatic.hpp"
55 + #include "nonbonded/MAW.hpp"
56 + #include "nonbonded/RepulsivePower.hpp"
57 + #include "nonbonded/SwitchingFunction.hpp"
58  
59   using namespace std;
60  
61   namespace OpenMD {
62 +
63    /**
64     * @class InteractionManager InteractionManager is responsible for
65 <   * keeping track of the non-bonded interactions (C++) and providing
62 <   * an interface to the low-level loop (Fortran).
65 >   * keeping track of the non-bonded interactions (C++)
66     */
67    class InteractionManager {
68  
69    public:
70 <    static InteractionManager* Instance();
71 <    static void setForceField(ForceField *ff) {forceField_ = ff;};    
70 >    InteractionManager();
71 >    ~InteractionManager();
72 >    void setSimInfo(SimInfo* info) {info_ = info;}
73 >    void initialize();
74  
70    static RealType getCutoff();
71
75      // Fortran support routines
76  
77 <    static void do_prepair(int *atid1, int *atid2, RealType *rij, RealType *rho_i_at_j, RealType *rho_j_at_i);
78 <    static void do_preforce(int *atid, RealType *rho, RealType *frho, RealType *dfrhodrho);
79 <    static void do_pair(int *atid1, int *atid2, RealType *d, RealType *r, RealType *r2, RealType *rcut, RealType *sw, RealType *vdwMult,RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *A1, RealType *A2, RealType *t1, RealType *t2, RealType *rho1, RealType *rho2, RealType *dfrho1, RealType *dfrho2, RealType *fshift1, RealType *fshift2);    
80 <    static void do_skip_correction(int *atid1, int *atid2, RealType *d, RealType *r, RealType *skippedCharge1, RealType *skippedCharge2, RealType *sw, RealType *electroMult, RealType *pot, RealType *vpair, RealType *f1, RealType *eFrame1, RealType *eFrame2, RealType *t1, RealType *t2);
81 <    static void do_self_correction(int *atid, RealType *eFrame, RealType *skippedCharge, RealType *pot, RealType *t);
82 <  
77 >    void doPrePair(InteractionData idat);
78 >    void doPreForce(SelfData sdat);
79 >    void doPair(InteractionData idat);    
80 >    void doSkipCorrection(InteractionData idat);
81 >    void doSelfCorrection(SelfData sdat);
82 >    void setCutoffRadius(RealType rCut);
83 >    void setSwitchingRadius(RealType rSwitch);
84 >    RealType getSuggestedCutoffRadius(int *atid1);  
85 >    RealType getSuggestedCutoffRadius(AtomType *atype);
86      
87    private:
88 <    virtual ~InteractionManager() { }
83 <    // singleton pattern, prevent reconstruction
84 <    InteractionManager() { }
85 <    InteractionManager(InteractionManager const&) {};
86 <    InteractionManager& operator=(InteractionManager const&) {};
87 <    static InteractionManager* _instance;
88 >    bool initialized_;
89  
90 <    static void initialize();
90 <    static bool initialized_;
90 >    void setupElectrostatics();
91  
92 <    static ForceField* forceField_;
93 <    static LJ* lj_;
94 <    static GB* gb_;
95 <    static Sticky* sticky_;
96 <    static EAM* eam_;
97 <    static SC* sc_;
98 <    static Morse* morse_;
99 <    static Electrostatic* electrostatic_;
100 <
101 <    static map<int, AtomType*> typeMap_;
92 >    SimInfo* info_;
93 >    LJ* lj_;
94 >    GB* gb_;
95 >    Sticky* sticky_;
96 >    EAM* eam_;
97 >    SC* sc_;
98 >    Morse* morse_;
99 >    Electrostatic* electrostatic_;
100 >    RepulsivePower* repulsivePower_;
101 >    MAW* maw_;
102 >    
103 >    map<int, AtomType*> typeMap_;
104      /**
105       * Each pair of atom types can have multiple interactions, so the
106       * natural data structures are a map between the pair, and a set
107       * of non-bonded interactions.
108       */
109 <    static map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;
108 <    
109 <
109 >    map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;    
110    };
111   }
112   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines