ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/types/CubicTorsionType.hpp
(Generate patch)

Comparing trunk/OOPSE-4/src/types/CubicTorsionType.hpp (file contents):
Revision 3172 by tim, Wed May 17 21:51:42 2006 UTC vs.
Revision 3173 by gezelter, Fri Jul 13 18:10:52 2007 UTC

# Line 57 | Line 57 | namespace oopse {
57     * @todo document
58     */
59    class CubicTorsionType : public TorsionType {
60 <
60 >    
61    public:
62 <
62 >    
63      CubicTorsionType(RealType k3, RealType k2, RealType k1, RealType k0)
64        : k3_(k3), k2_(k2),  k1_(k1), k0_(k0){
65 <      }
66 <
65 >    }
66 >    
67      void setForceConstant(RealType k3, RealType k2, RealType k1, RealType k0) {
68        k3_ = k3;
69        k2_ = k2;
70        k1_ = k1;
71        k0_ = k0;
72      }
73 <
74 <    void getForceConstant(RealType& k3, RealType& k2, RealType& k1, RealType& k0) {
73 >    
74 >    void getForceConstant(RealType& k3, RealType& k2, RealType& k1,
75 >                          RealType& k0) {
76        k3 = k3_;
77 <      k2  = k2_;
77 >      k2 = k2_;
78        k1 = k1_;
79        k0 = k0_;
80      }
81 <
81 >    
82      virtual void calcForce(RealType cosPhi, RealType& V, RealType& dVdCosPhi){
83        RealType cosPhi2 = cosPhi * cosPhi;
84        RealType cosPhi3 = cosPhi2 * cosPhi;
# Line 85 | Line 86 | namespace oopse {
86        V =k0_ + k1_ * cosPhi + k2_*cosPhi2 + k3_*cosPhi3;
87        dVdCosPhi = k1_ + 2.0*k2_ * cosPhi + 3.0 * k3_*cosPhi2;    
88      }
89 <        
89 >    
90    private:
91 <
91 >    
92      RealType k3_;
93      RealType k2_;
94      RealType k1_;
95      RealType k0_;
96 <
96 >    
97    };
98 <
98 >  
99   }//end namespace oopse
100   #endif //TYPES_CUBICTORSIONTYPE_HPP
101  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines