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 1505 by gezelter, Sun Oct 3 22:18:59 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   #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_REACTION_FIELD,
75 >    esm_EWALD_FULL,  /**< Ewald methods aren't supported yet */
76 >    esm_EWALD_PME,   /**< Ewald methods aren't supported yet */
77 >    esm_EWALD_SPME   /**< Ewald methods aren't supported yet */
78    };
79  
80    enum ElectrostaticScreeningMethod{
# Line 82 | Line 87 | namespace OpenMD {
87    public:    
88      Electrostatic();
89      void setForceField(ForceField *ff) {forceField_ = ff;};
90 +    void setSimInfo(SimInfo* info) {info_ = info;};
91      void addType(AtomType* atomType);
92 <    virtual void calcForce(InteractionData idat);
93 <    virtual void calcSkipCorrection(SkipCorrectionData skdat);
88 <    virtual void calcSelfCorrection(SelfCorrectionData scdat);
92 >    virtual void calcForce(InteractionData &idat);
93 >    virtual void calcSelfCorrection(SelfData &sdat);
94      virtual string getName() {return name_;}
95 <    virtual RealType getSuggestedCutoffRadius(AtomType* at1, AtomType* at2);
96 <
92 <    void setElectrostaticCutoffRadius( RealType theECR, RealType theRSW );
95 >    virtual RealType getSuggestedCutoffRadius(pair<AtomType*, AtomType*> atypes);
96 >    void setCutoffRadius( RealType rCut );
97      void setElectrostaticSummationMethod( ElectrostaticSummationMethod esm );
98      void setElectrostaticScreeningMethod( ElectrostaticScreeningMethod sm );
99      void setDampingAlpha( RealType alpha );
# Line 99 | Line 103 | namespace OpenMD {
103      void initialize();
104      string name_;
105      bool initialized_;
106 <    bool haveDefaultCutoff_;
106 >    bool haveCutoffRadius_;
107      bool haveDampingAlpha_;
108      bool haveDielectric_;
109 <    bool haveElectroSpline_;
109 >    bool haveElectroSplines_;
110      std::map<int, AtomType*> ElectrostaticList;
111      std::map<AtomType*, ElectrostaticAtomData> ElectrostaticMap;
112 +    map<pair<AtomType*, AtomType*>, CubicSpline*> Jij;  /** coulomb integral */
113 +    SimInfo* info_;
114      ForceField* forceField_;
115 <    RealType defaultCutoff_;
110 <    RealType defaultCutoff2_;
115 >    RealType cutoffRadius_;
116      RealType pre11_;
117      RealType pre12_;
118      RealType pre22_;
119      RealType pre14_;
120 +    RealType pre24_;
121 +    RealType pre44_;
122 +    RealType v01, v02;
123 +    RealType v11, v12, v13;
124 +    RealType v21, v22, v23, v24;
125 +    RealType v31, v32, v33, v34, v35;
126 +    RealType v41, v42, v43, v44, v45, v46;
127      RealType chargeToC_;
128      RealType angstromToM_;
129      RealType debyeToCm_;
130      int np_;
131      ElectrostaticSummationMethod summationMethod_;    
132      ElectrostaticScreeningMethod screeningMethod_;
133 +    map<string, ElectrostaticSummationMethod> summationMap_;
134 +    map<string, ElectrostaticScreeningMethod> screeningMap_;
135      RealType dampingAlpha_;
122    RealType alpha2_;
123    RealType alpha4_;
124    RealType alpha6_;
125    RealType alpha8_;
136      RealType dielectric_;
127    RealType constEXP_;
128    RealType rcuti_;
129    RealType rcuti2_;
130    RealType rcuti3_;
131    RealType rcuti4_;
132    RealType alphaPi_;
133    RealType invRootPi_;
134    RealType rrf_;
135    RealType rt_;
136    RealType rrfsq_;
137      RealType preRF_;
138 <    RealType preRF2_;
139 <    RealType erfcVal_;
140 <    RealType derfcVal_;
141 <    CubicSpline* erfcSpline_;
142 <    RealType c1_;
143 <    RealType c2_;
144 <    RealType c3_;
145 <    RealType c4_;
146 <    RealType c5_;
147 <    RealType c6_;
148 <    RealType c1c_;
149 <    RealType c2c_;
150 <    RealType c3c_;
151 <    RealType c4c_;
152 <    RealType c5c_;
153 <    RealType c6c_;
154 <    RealType one_third_;    
138 >    RealType selfMult_;
139 >
140 >    CubicSpline* v01s;
141 >    CubicSpline* v02s;
142 >    CubicSpline* v11s;
143 >    CubicSpline* v12s;
144 >    CubicSpline* v13s;
145 >    CubicSpline* v21s;
146 >    CubicSpline* v22s;
147 >    CubicSpline* v23s;
148 >    CubicSpline* v24s;
149 >    CubicSpline* v31s;
150 >    CubicSpline* v32s;
151 >    CubicSpline* v33s;
152 >    CubicSpline* v34s;
153 >    CubicSpline* v35s;
154 >    CubicSpline* v41s;
155 >    CubicSpline* v42s;
156 >    CubicSpline* v43s;
157 >    CubicSpline* v44s;
158 >    CubicSpline* v45s;
159 >    CubicSpline* v46s;    
160    };
161   }
162  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines