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

Comparing branches/development/src/nonbonded/NonBondedInteraction.hpp (file contents):
Revision 1535 by gezelter, Sun Oct 3 22:18:59 2010 UTC vs.
Revision 1536 by gezelter, Wed Jan 5 14:49:05 2011 UTC

# Line 80 | Line 80 | namespace OpenMD {
80      RealType sw;          /**< switching function value at rij (precomputed) */
81      RealType vdwMult;     /**< multiplier for van der Waals interactions */
82      RealType electroMult; /**< multiplier for electrostatic interactions */
83 <    RealType pot;         /**< total potential */
84 <    RealType vpair;       /**< pair potential */
85 <    Vector3d f1;         /**< force between the two atoms */
86 <    Mat3x3d eFrame1;     /**< pointer to electrostatic frame for first atom */
87 <    Mat3x3d eFrame2;     /**< pointer to electrostatic frame for second atom*/
88 <    RotMat3x3d A1;       /**< pointer to rotation matrix of first atom */
89 <    RotMat3x3d A2;       /**< pointer to rotation matrix of second atom */
90 <    Vector3d t1;         /**< pointer to torque on first atom */
91 <    Vector3d t2;         /**< pointer to torque on second atom */
83 >    RealType pot[4];      /**< total potential */
84 >    RealType vpair[4];    /**< pair potential */
85 >    Vector3d f1;          /**< force between the two atoms */
86 >    Mat3x3d eFrame1;      /**< pointer to electrostatic frame for first atom */
87 >    Mat3x3d eFrame2;      /**< pointer to electrostatic frame for second atom*/
88 >    RotMat3x3d A1;        /**< pointer to rotation matrix of first atom */
89 >    RotMat3x3d A2;        /**< pointer to rotation matrix of second atom */
90 >    Vector3d t1;          /**< pointer to torque on first atom */
91 >    Vector3d t2;          /**< pointer to torque on second atom */
92      RealType rho1;        /**< electron density at first atom */
93      RealType rho2;        /**< electron density at second atom */
94      RealType dfrho1;      /**< derivative of density functional for atom 1 */
# Line 108 | Line 108 | namespace OpenMD {
108     * their indirect interactions on each other.
109     */
110    struct SkipCorrectionData {
111 <    AtomType* atype1;         /**< pointer to AtomType of first atom */
112 <    AtomType* atype2;         /**< pointer to AtomType of second atom */
113 <    Vector3d d;               /**< interatomic vector (already wrapped into box) */
114 <    RealType rij;             /**< interatomic separation (precomputed) */
115 <    RealType skippedCharge1;  /**< charge skipped in normal pairwise interaction loop */
116 <    RealType skippedCharge2;  /**< charge skipped in normal pairwise interaction loop */
117 <    RealType sw;              /**< switching function value at rij (precomputed) */
118 <    RealType electroMult;     /**< multiplier for electrostatic interactions */
119 <    RealType pot;             /**< total potential */
120 <    RealType vpair;           /**< pair potential */
121 <    Vector3d f1;              /**< force correction */
122 <    Mat3x3d eFrame1;         /**< pointer to electrostatic frame for first atom */
123 <    Mat3x3d eFrame2;         /**< pointer to electrostatic frame for second atom*/
124 <    Vector3d t1;             /**< pointer to torque on first atom */
125 <    Vector3d t2;             /**< pointer to torque on second atom */
111 >    AtomType* atype1;      /**< pointer to AtomType of first atom */
112 >    AtomType* atype2;      /**< pointer to AtomType of second atom */
113 >    Vector3d d;            /**< interatomic vector (already wrapped into box) */
114 >    RealType rij;          /**< interatomic separation (precomputed) */
115 >    RealType skippedCharge1; /**< charge skipped in normal pairwise interaction loop */
116 >    RealType skippedCharge2; /**< charge skipped in normal pairwise interaction loop */
117 >    RealType sw;           /**< switching function value at rij (precomputed) */
118 >    RealType electroMult;  /**< multiplier for electrostatic interactions */
119 >    RealType pot[4];       /**< total potential */
120 >    RealType vpair[4];     /**< pair potential */
121 >    Vector3d f1;           /**< force correction */
122 >    Mat3x3d eFrame1;       /**< pointer to electrostatic frame for first atom */
123 >    Mat3x3d eFrame2;       /**< pointer to electrostatic frame for second atom*/
124 >    Vector3d t1;           /**< pointer to torque on first atom */
125 >    Vector3d t2;           /**< pointer to torque on second atom */
126    };
127  
128    /**
# Line 136 | Line 136 | namespace OpenMD {
136      AtomType* atype;        /**< pointer to AtomType of the atom */
137      Mat3x3d eFrame;        /**< pointer to electrostatic frame for first atom */
138      RealType skippedCharge; /**< charge skipped in normal pairwise interaction loop */
139 <    RealType pot;           /**< total potential contribution */
139 >    RealType pot[4];       /**< total potential contribution */
140      Vector3d t;            /**< pointer to resultant torque on atom */
141    };
142  
# Line 178 | Line 178 | namespace OpenMD {
178    public:
179      NonBondedInteraction() {}
180      virtual ~NonBondedInteraction() {}
181 <    virtual void calcForce(InteractionData idat) = 0;
181 >    virtual void calcForce(InteractionData &idat) = 0;
182      virtual InteractionFamily getFamily() = 0;
183      virtual RealType getSuggestedCutoffRadius(AtomType* at1, AtomType* at2) = 0;
184      virtual string getName() =  0;
# Line 201 | Line 201 | namespace OpenMD {
201    public:
202      ElectrostaticInteraction() : NonBondedInteraction() { }
203      virtual ~ElectrostaticInteraction() {}
204 <    virtual void calcSkipCorrection(SkipCorrectionData skdat) = 0;
205 <    virtual void calcSelfCorrection(SelfCorrectionData scdat) = 0;
206 <    virtual InteractionFamily getFamily() {return ELECTROSTATIC_FAMILY;}
204 >    virtual void calcSkipCorrection(SkipCorrectionData &skdat) = 0;
205 >    virtual void calcSelfCorrection(SelfCorrectionData &scdat) = 0;
206 >    virtual InteractionFamily getFamily() {return ELECTROSTATIC_FAMILY;}    
207    };    
208  
209    /**
# Line 213 | Line 213 | namespace OpenMD {
213    public:
214      MetallicInteraction() : NonBondedInteraction() { }
215      virtual ~MetallicInteraction() {}
216 <    virtual void calcDensity(DensityData ddat) = 0;
217 <    virtual void calcFunctional(FunctionalData fdat) = 0;
216 >    virtual void calcDensity(DensityData &ddat) = 0;
217 >    virtual void calcFunctional(FunctionalData &fdat) = 0;
218      virtual InteractionFamily getFamily() {return METALLIC_FAMILY;}
219    };
220            

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines