ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-4/src/primitives/BendExtensions.cpp
Revision: 1492
Committed: Fri Sep 24 16:27:58 2004 UTC (19 years, 9 months ago) by tim
File size: 647 byte(s)
Log Message:
change the #include in source files

File Contents

# Content
1 #include <math.h>
2
3 #include "primitives/SRI.hpp"
4 #include "utils/simError.h"
5
6 QuadraticBend::QuadraticBend( Atom &a, Atom &b, Atom &c ){
7
8 set_atoms( a, b, c );
9 c1 = 0.0;
10 c2 = 0.0;
11 c3 = 0.0;
12 theta0 = 0.0;
13 }
14
15 void QuadraticBend::setConstants( double the_c1, double the_c2, double the_c3,
16 double the_Th0 ){
17 c1 = the_c1;
18 c2 = the_c2;
19 c3 = the_c3;
20 theta0 = the_Th0;
21 }
22
23
24 double QuadraticBend::bend_force( double theta ){
25
26 double dt, dt2;
27 double force;
28
29
30
31
32 dt = ( theta - theta0 ) * M_PI / 180.0;
33 dt2 = dt * dt;
34
35 c_potential_E = ( c1 * dt2 ) + ( c2 * dt ) + c3;
36 force = -( ( 2.0 * c1 * dt ) + c2 );
37 return force;
38 }