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

Comparing branches/development/src/nonbonded/Electrostatic.hpp (file contents):
Revision 1502 by gezelter, Sat Oct 2 19:53:32 2010 UTC vs.
Revision 1877 by gezelter, Thu Jun 6 15:43:35 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).          
39 < * [4]  Vardeman & Gezelter, in progress (2009).                        
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   */
42  
43   #ifndef NONBONDED_ELECTROSTATIC_HPP
# Line 44 | Line 45
45  
46   #include "nonbonded/NonBondedInteraction.hpp"
47   #include "types/AtomType.hpp"
48 < #include "UseTheForce/ForceField.hpp"
48 > #include "brains/ForceField.hpp"
49   #include "math/SquareMatrix3.hpp"
50   #include "math/CubicSpline.hpp"
51 + #include "brains/SimInfo.hpp"
52  
53   namespace OpenMD {
54  
55    struct ElectrostaticAtomData {
56      bool is_Charge;
57      bool is_Dipole;
56    bool is_SplitDipole;
58      bool is_Quadrupole;
59 <    RealType charge;
60 <    RealType dipole_moment;
61 <    RealType split_dipole_distance;
62 <    Vector3d quadrupole_moments;
59 >    bool is_Fluctuating;
60 >    RealType fixedCharge;
61 >    RealType hardness;
62 >    RealType electronegativity;
63 >    int slaterN;
64 >    RealType slaterZeta;
65 >    Vector3d dipole;
66 >    Mat3x3d  quadrupole;
67    };
68 <  
68 >      
69    enum ElectrostaticSummationMethod{
70 <    NONE,
71 <    SWITCHING_FUNCTION,
72 <    SHIFTED_POTENTIAL,
73 <    SHIFTED_FORCE,
74 <    REACTION_FIELD,
75 <    EWALD_FULL,  /**< Ewald methods aren't supported yet */
76 <    EWALD_PME,   /**< Ewald methods aren't supported yet */
77 <    EWALD_SPME   /**< Ewald methods aren't supported yet */
70 >    esm_HARD,
71 >    esm_SWITCHING_FUNCTION,
72 >    esm_SHIFTED_POTENTIAL,
73 >    esm_SHIFTED_FORCE,
74 >    esm_TAYLOR_SHIFTED,
75 >    esm_REACTION_FIELD,
76 >    esm_EWALD_FULL,  /**< Ewald methods aren't supported yet */
77 >    esm_EWALD_PME,   /**< Ewald methods aren't supported yet */
78 >    esm_EWALD_SPME   /**< Ewald methods aren't supported yet */
79    };
80  
81    enum ElectrostaticScreeningMethod{
# Line 82 | Line 88 | namespace OpenMD {
88    public:    
89      Electrostatic();
90      void setForceField(ForceField *ff) {forceField_ = ff;};
91 +    void setSimInfo(SimInfo* info) {info_ = info;};
92      void addType(AtomType* atomType);
93 <    void calcForce(InteractionData idat);
94 <    void calcSkipCorrection(SkipCorrectionData skdat);
88 <    void calcSelfCorrection(SelfCorrectionData scdat);
93 >    virtual void calcForce(InteractionData &idat);
94 >    virtual void calcSelfCorrection(SelfData &sdat);
95      virtual string getName() {return name_;}
96 <
97 <    void setElectrostaticCutoffRadius( RealType theECR, RealType theRSW );
96 >    virtual RealType getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes);
97 >    void setCutoffRadius( RealType rCut );
98      void setElectrostaticSummationMethod( ElectrostaticSummationMethod esm );
99      void setElectrostaticScreeningMethod( ElectrostaticScreeningMethod sm );
100      void setDampingAlpha( RealType alpha );
# Line 98 | Line 104 | namespace OpenMD {
104      void initialize();
105      string name_;
106      bool initialized_;
107 <    bool haveDefaultCutoff_;
107 >    bool haveCutoffRadius_;
108      bool haveDampingAlpha_;
109      bool haveDielectric_;
110 <    bool haveElectroSpline_;
110 >    bool haveElectroSplines_;
111      std::map<int, AtomType*> ElectrostaticList;
112      std::map<AtomType*, ElectrostaticAtomData> ElectrostaticMap;
113 +    map<pair<AtomType*, AtomType*>, CubicSpline*> Jij;  /** coulomb integral */
114 +    SimInfo* info_;
115      ForceField* forceField_;
116 <    RealType defaultCutoff_;
109 <    RealType defaultCutoff2_;
116 >    RealType cutoffRadius_;
117      RealType pre11_;
118      RealType pre12_;
119      RealType pre22_;
120      RealType pre14_;
121 +    RealType pre24_;
122 +    RealType pre44_;
123 +    RealType v01, v11, v21, v22, v31, v32, v41, v42, v43;
124 +    RealType dv01, dv11, dv21, dv22, dv31, dv32, dv41, dv42, dv43;
125 +    RealType v01or, v11or, v21or, v22or, v31or, v32or, v41or, v42or, v43or;
126      RealType chargeToC_;
127      RealType angstromToM_;
128      RealType debyeToCm_;
129      int np_;
130      ElectrostaticSummationMethod summationMethod_;    
131      ElectrostaticScreeningMethod screeningMethod_;
132 +    map<string, ElectrostaticSummationMethod> summationMap_;
133 +    map<string, ElectrostaticScreeningMethod> screeningMap_;
134      RealType dampingAlpha_;
121    RealType alpha2_;
122    RealType alpha4_;
123    RealType alpha6_;
124    RealType alpha8_;
135      RealType dielectric_;
126    RealType constEXP_;
127    RealType rcuti_;
128    RealType rcuti2_;
129    RealType rcuti3_;
130    RealType rcuti4_;
131    RealType alphaPi_;
132    RealType invRootPi_;
133    RealType rrf_;
134    RealType rt_;
135    RealType rrfsq_;
136      RealType preRF_;
137 <    RealType preRF2_;
138 <    RealType erfcVal_;
139 <    RealType derfcVal_;
140 <    CubicSpline* erfcSpline_;
141 <    RealType c1_;
142 <    RealType c2_;
143 <    RealType c3_;
144 <    RealType c4_;
145 <    RealType c5_;
146 <    RealType c6_;
147 <    RealType c1c_;
148 <    RealType c2c_;
149 <    RealType c3c_;
150 <    RealType c4c_;
151 <    RealType c5c_;
152 <    RealType c6c_;
153 <    RealType one_third_;    
137 >    RealType selfMult_;
138 >
139 >    CubicSpline* v01s;
140 >    CubicSpline* v11s;
141 >    CubicSpline* v21s;
142 >    CubicSpline* v22s;
143 >    CubicSpline* v31s;
144 >    CubicSpline* v32s;
145 >    CubicSpline* v41s;
146 >    CubicSpline* v42s;
147 >    CubicSpline* v43s;
148 >
149 >    /*
150 >    CubicSpline* dv01s;
151 >    CubicSpline* dv11s;
152 >    CubicSpline* dv21s;
153 >    CubicSpline* dv22s;
154 >    CubicSpline* dv31s;
155 >    CubicSpline* dv32s;
156 >    CubicSpline* dv41s;
157 >    CubicSpline* dv42s;
158 >    CubicSpline* dv43s;
159 >    */
160    };
161   }
162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines