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

Comparing:
branches/development/src/nonbonded/InteractionManager.hpp (file contents), Revision 1665 by gezelter, Tue Nov 22 20:38:56 2011 UTC vs.
trunk/src/nonbonded/InteractionManager.hpp (file contents), Revision 1925 by gezelter, Wed Aug 7 15:24:16 2013 UTC

# Line 35 | Line 35
35   *                                                                      
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).          
38 > * [3]  Sun, Lin & Gezelter, J. Chem. Phys. 128, 234107 (2008).          
39   * [4]  Kuang & Gezelter,  J. Chem. Phys. 133, 164101 (2010).
40   * [5]  Vardeman, Stocker & Gezelter, J. Chem. Theory Comput. 7, 834 (2011).
41   */
# Line 61 | Line 61 | namespace OpenMD {
61   namespace OpenMD {
62  
63    /**
64 <   * @class InteractionManager InteractionManager is responsible for
64 >   * @class InteractionManager
65 >   * InteractionManager is responsible for
66     * keeping track of the non-bonded interactions (C++)
67     */
68    class InteractionManager {
69  
70    public:
71      InteractionManager();
72 <    ~InteractionManager();
72 >    virtual ~InteractionManager();
73      void setSimInfo(SimInfo* info) {info_ = info;}
74      void initialize();
75  
76      // Fortran support routines
77  
78 <    void doPrePair(InteractionData idat);
79 <    void doPreForce(SelfData sdat);
80 <    void doPair(InteractionData idat);    
81 <    void doSkipCorrection(InteractionData idat);
82 <    void doSelfCorrection(SelfData sdat);
78 >    void doPrePair(InteractionData &idat);
79 >    void doPreForce(SelfData &sdat);
80 >    void doPair(InteractionData &idat);    
81 >    void doSkipCorrection(InteractionData &idat);
82 >    void doSelfCorrection(SelfData &sdat);
83 >    void doReciprocalSpaceSum(RealType &recipPot);
84      void setCutoffRadius(RealType rCut);
83    void setSwitchingRadius(RealType rSwitch);
85      RealType getSuggestedCutoffRadius(int *atid1);  
86      RealType getSuggestedCutoffRadius(AtomType *atype);
87      
# Line 102 | Line 103 | namespace OpenMD {
103      
104      map<int, AtomType*> typeMap_;
105      /**
106 <     * Each pair of atom types can have multiple interactions, so the
106 >     * Each pair of atom types can have multiple interactions, so the
107       * natural data structures are a map between the pair, and a set
108 <     * of non-bonded interactions.
108 >     * of non-bonded interactions:
109 >     *
110 >     *  map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;
111 >     *
112 >     * Pair creation turns out to be inefficient, and map searching
113 >     * isn't necessary.  Instead of AtomType* sort keys, we now use
114 >     * the AtomType idents (atids) which are ints to access the vector
115 >     * locations.  iHash_ contains largely the same information as
116 >     * interactions_, but in a way that doesn't require a set iterator
117 >     * inside the main pair loop.
118       */
119 <    map<pair<AtomType*, AtomType*>, set<NonBondedInteraction*> > interactions_;    
119 >    vector<vector<set<NonBondedInteraction*> > > interactions_;
120 >    vector<vector<int> > iHash_;
121    };
122   }
123   #endif

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines