| 1 | /* 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 | class Restraints{ | 
| 20 |  | 
| 21 | public: | 
| 22 | Restraints(int nMol, double lambdaVal, double lambdaExp); | 
| 23 | ~Restraints(); | 
| 24 |  | 
| 25 | void Calc_rVal(double position[3], int currentMol); | 
| 26 | void Calc_body_thetaVal(double matrix[3][3], int currentMol); | 
| 27 | void Calc_body_omegaVal(double matrix[3][3], double zAngle); | 
| 28 | double Calc_Restraint_Forces(vector<StuntDouble*> vecParticles); | 
| 29 | void Store_Init_Info(vector<StuntDouble*> vecParticles); | 
| 30 | void Write_zAngle_File(vector<StuntDouble*> vecParticles); | 
| 31 | double getVharm(); | 
| 32 |  | 
| 33 | private: | 
| 34 | char moleculeName[15]; | 
| 35 |  | 
| 36 | int i, j, nMol; | 
| 37 |  | 
| 38 | double scaleLam; | 
| 39 | double delRx, delRy, delRz; | 
| 40 | double theta, omega; | 
| 41 | double vProj0[3]; | 
| 42 | double vProjDist; | 
| 43 | double uTx, uTy, uTz, vTx, vTy, vTz; | 
| 44 | double ub0x, ub0y, ub0z, vb0x, vb0y, vb0z; | 
| 45 | double kTheta, kOmega, kDist; | 
| 46 | double restraintFrc[3]; | 
| 47 | double restraintTrq[3]; | 
| 48 | double normalize; | 
| 49 | double dVdrx, dVdry, dVdrz; | 
| 50 | double dVdux, dVduy, dVduz; | 
| 51 | double dVdvx, dVdvy, dVdvz; | 
| 52 | double harmPotent; | 
| 53 | double lambdaValue; | 
| 54 | double lambdaK; | 
| 55 |  | 
| 56 | vector<double> cofmPosX; | 
| 57 | vector<double> cofmPosY; | 
| 58 | vector<double> cofmPosZ; | 
| 59 | vector<double> ubX0; | 
| 60 | vector<double> uX0; | 
| 61 | vector<double> ubY0; | 
| 62 | vector<double> uY0; | 
| 63 | vector<double> ubZ0; | 
| 64 | vector<double> uZ0; | 
| 65 | vector<double> vbX0; | 
| 66 | vector<double> vX0; | 
| 67 | vector<double> vbY0; | 
| 68 | vector<double> vY0; | 
| 69 | vector<double> vbZ0; | 
| 70 | vector<double> vZ0; | 
| 71 |  | 
| 72 | //  SimInfo *info; // all the info we'll ever need | 
| 73 | //   Atom **atoms; /* array of atom pointers */ | 
| 74 | //   DirectionalAtom* dAtom; | 
| 75 | //  SimInfo *againInfo; // all the info we'll ever need | 
| 76 |  | 
| 77 | char *token; | 
| 78 | char fileName[200]; | 
| 79 | char angleName[200]; | 
| 80 | char inLine[1000]; | 
| 81 | char inValue[200]; | 
| 82 | char springName[200]; | 
| 83 | }; | 
| 84 |  | 
| 85 | #endif |