ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/Restraints.hpp
Revision: 1180
Committed: Thu May 20 20:24:07 2004 UTC (20 years, 1 month ago) by chrisfen
File size: 2221 byte(s)
Log Message:
Several additions... Restraints.cpp and .hpp were included for restraining particles in thermodynamic integration.  By including these, changes were made in Integrator, SimInfo, ForceFeilds, SimSetup, StatWriter, and possibly some other files.  Two bass keywords were also added for performing thermodynamic integration: a lambda value one and a k power one.

File Contents

# User Rev Content
1 chrisfen 1180 /* This is a fun little patch to do molecular restraints for
2     thermodynamic integration of solids. Use only
3     if you really know what you are doing.
4     */
5    
6     #ifndef _RESTRAINTS_H_
7     #define _RESTRAINTS_H_
8    
9     #include <stdlib.h>
10     #include <iostream>
11     #include <vector>
12    
13     #include "Atom.hpp"
14     #include "SimState.hpp"
15    
16     //#include "SimInfo.hpp"
17     //#include "ReadWrite.hpp"
18    
19     // Note: this is a hard coded length - could cause problems with big systems
20     double zAngle[10001];
21    
22     class Restraints{
23    
24     public:
25     Restraints(int nMol, double lambdaVal, double lambdaExp);
26     ~Restraints();
27    
28     void Calc_rVal(double position[3], int currentMol);
29     void Calc_thetaVal(double matrix[3][3], int currentMol);
30     void Calc_omegaVal(double matrix[3][3], int currentMol);
31     void Calc_body_thetaVal(double matrix[3][3], int currentMol);
32     void Calc_body_omegaVal(double matrix[3][3], int currentMol);
33     double Calc_Restraint_Forces(vector<StuntDouble*> vecParticles);
34     void Store_Init_Info();
35     void Determine_Lambda();
36     void Write_zAngle_File();
37     double getVharm();
38    
39     private:
40     char moleculeName[15];
41    
42     int i, j, nMol;
43    
44     double scaleLam;
45     double delRx, delRy, delRz;
46     double theta, omega;
47     double vProj0[3];
48     double vProjDist;
49     double uTx, uTy, uTz, vTx, vTy, vTz;
50     double ub0x, ub0y, ub0z, vb0x, vb0y, vb0z;
51     double kTheta, kOmega, kDist;
52     double restraintFrc[3];
53     double restraintTrq[3];
54     double normalize;
55     double dVdrx, dVdry, dVdrz;
56     double dVdux, dVduy, dVduz;
57     double dVdvx, dVdvy, dVdvz;
58     double harmPotent;
59     double lambdaValue;
60     double lambdaK;
61    
62     vector<double> cofmPosX;
63     vector<double> cofmPosY;
64     vector<double> cofmPosZ;
65     vector<double> ubX0;
66     vector<double> uX0;
67     vector<double> ubY0;
68     vector<double> uY0;
69     vector<double> ubZ0;
70     vector<double> uZ0;
71     vector<double> vbX0;
72     vector<double> vX0;
73     vector<double> vbY0;
74     vector<double> vY0;
75     vector<double> vbZ0;
76     vector<double> vZ0;
77    
78     // SimInfo *info; // all the info we'll ever need
79     // Atom **atoms; /* array of atom pointers */
80     // DirectionalAtom* dAtom;
81     // SimInfo *againInfo; // all the info we'll ever need
82    
83     char *token;
84     char fileName[200];
85     char angleName[200];
86     char inLine[1000];
87     char inValue[200];
88     char springName[200];
89     };
90    
91     #endif