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

Comparing branches/development/src/brains/ForceManager.hpp (file contents):
Revision 1503 by gezelter, Sat Oct 2 19:54:41 2010 UTC vs.
Revision 1787 by gezelter, Wed Aug 29 18:13:11 2012 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   /**
# Line 52 | Line 53
53  
54   #include "brains/SimInfo.hpp"
55   #include "primitives/Molecule.hpp"
56 < #include "nonbonded/LJ.hpp"
57 < #include "nonbonded/GB.hpp"
58 < #include "nonbonded/Sticky.hpp"
59 < #include "nonbonded/EAM.hpp"
60 < #include "nonbonded/SC.hpp"
60 < #include "nonbonded/Morse.hpp"
61 < #include "nonbonded/Electrostatic.hpp"
56 > #include "nonbonded/Cutoffs.hpp"
57 > #include "nonbonded/SwitchingFunction.hpp"
58 > #include "nonbonded/InteractionManager.hpp"
59 > #include "perturbations/Perturbation.hpp"
60 > #include "parallel/ForceDecomposition.hpp"
61  
62 + #define PREPAIR_LOOP 0
63 + #define PAIR_LOOP 1
64 +
65 + using namespace std;
66   namespace OpenMD {
67    /**
68     * @class ForceManager ForceManager.hpp "brains/ForceManager.hpp"
69 <   * ForceManager is responsible for calculating the short range
70 <   * interactions (C++) and long range interactions (Fortran). If the
68 <   * Fortran side is not set up before the force calculation, call
69 <   * SimInfo's update function to settle it down.
69 >   * ForceManager is responsible for calculating both the short range
70 >   * (bonded) interactions and long range (non-bonded) interactions.
71     *
72 <   * @note the reason we delay fortran side's setup is that some
73 <   * applications (Dump2XYZ etc.) may not need force calculation, so why
74 <   * bother?
72 >   * @note the reason we delay some of the setup is that
73 >   * initialization must wait until after the force field has been
74 >   * parsed so that the atom types are known.
75     */
76    class ForceManager {
77  
78    public:
78    
79      ForceManager(SimInfo * info);                          
80      virtual ~ForceManager() {}
81
82    // public virtual functions should be avoided
83    /**@todo needs refactoring */
81      virtual void calcForces();
82 <    virtual void init() {};
82 >    void initialize();
83  
84 <  protected:
84 >  protected:
85 >    bool initialized_;
86 >    bool doParticlePot_;
87 >    bool doElectricField_;
88 >    bool doHeatFlux_;
89  
90 +    virtual void setupCutoffs();
91      virtual void preCalculation();        
92 <    virtual void calcShortRangeInteraction();
93 <    virtual void calcLongRangeInteraction();
92 >    virtual void shortRangeInteractions();
93 >    virtual void longRangeInteractions();
94      virtual void postCalculation();
93
94    SimInfo * info_;        
95    std::map<Bend*, BendDataSet> bendDataSets;
96    std::map<Torsion*, TorsionDataSet> torsionDataSets;
97    std::map<Inversion*, InversionDataSet> inversionDataSets;
98    Mat3x3d tau;
95  
96 <    bool NBforcesInitialized_;
97 <    LJ* lj_;
98 <    GB* gb_;
99 <    Sticky* sticky_;
100 <    EAM* eam_;
105 <    SC* sc_;
106 <    Morse* morse_;
107 <    Electrostatic* electrostatic_;
108 <    
109 <  };
96 >    SimInfo* info_;        
97 >    ForceField* forceField_;
98 >    InteractionManager* interactionMan_;
99 >    ForceDecomposition* fDecomp_;
100 >    SwitchingFunction* switcher_;
101  
102 < } //end namespace OpenMD
102 >    SwitchingFunctionType sft_;/**< Type of switching function in use */
103 >    RealType rCut_;            /**< cutoff radius for non-bonded interactions */
104 >    RealType rSwitch_;         /**< inner radius of switching function */
105 >    CutoffMethod cutoffMethod_;/**< Cutoff Method for most non-bonded interactions */
106 >    CutoffPolicy cutoffPolicy_;/**< Cutoff Policy for non-bonded interactions */
107 >
108 >    map<Bend*, BendDataSet> bendDataSets;
109 >    map<Torsion*, TorsionDataSet> torsionDataSets;
110 >    map<Inversion*, InversionDataSet> inversionDataSets;
111 >    vector<pair<int, int> > neighborList;
112 >
113 >    vector<RealType> vdwScale_;
114 >    vector<RealType> electrostaticScale_;
115 >
116 >    Mat3x3d stressTensor;
117 >
118 >    vector<Perturbation*> perturbations_;
119 >  };
120 > }
121   #endif //BRAINS_FORCEMANAGER_HPP

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines