ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/libmdtools/SimInfo.cpp
Revision: 420
Committed: Thu Mar 27 17:32:03 2003 UTC (21 years, 3 months ago) by mmeineke
File size: 1607 byte(s)
Log Message:
LJ_FF has been converted to the new Molecule model. TraPPE_Ex is currently being updated.
SimSetups routines are writtten, but not yet called.

File Contents

# User Rev Content
1 mmeineke 377 #include <cstdlib>
2     #include <cstring>
3    
4    
5     #include "SimInfo.hpp"
6     #define __C
7     #include "fSimulation.h"
8     #include "simError.h"
9    
10     #include "fortranWrappers.hpp"
11    
12     SimInfo* currentInfo;
13    
14     SimInfo::SimInfo(){
15     excludes = NULL;
16     n_constraints = 0;
17     n_oriented = 0;
18     n_dipoles = 0;
19     the_integrator = NULL;
20     setTemp = 0;
21     thermalTime = 0.0;
22 mmeineke 420 rCut = 0.0;
23 mmeineke 377
24     usePBC = 0;
25     useLJ = 0;
26     useSticky = 0;
27     useDipole = 0;
28     useReactionField = 0;
29     useGB = 0;
30     useEAM = 0;
31    
32    
33    
34     wrapMeSimInfo( this );
35     }
36    
37     void SimInfo::refreshSim(){
38    
39     simtype fInfo;
40     int isError;
41    
42     fInfo.box[0] = box_x;
43     fInfo.box[1] = box_y;
44     fInfo.box[2] = box_z;
45    
46     fInfo.rlist = rList;
47     fInfo.rcut = rCut;
48 gezelter 394 fInfo.rrf = ecr;
49     fInfo.rt = ecr - est;
50 mmeineke 377 fInfo.dielect = dielectric;
51    
52     fInfo.SIM_uses_PBC = usePBC;
53     fInfo.SIM_uses_LJ = useLJ;
54 gezelter 394 //fInfo.SIM_uses_sticky = useSticky;
55     fInfo.SIM_uses_sticky = 0;
56     fInfo.SIM_uses_dipoles = useDipole;
57 mmeineke 402 //fInfo.SIM_uses_dipoles = 0;
58 gezelter 394 fInfo.SIM_uses_RF = useReactionField;
59 mmeineke 377 fInfo.SIM_uses_GB = useGB;
60     fInfo.SIM_uses_EAM = useEAM;
61    
62    
63     isError = 0;
64    
65     fInfo;
66     n_atoms;
67     identArray;
68     n_exclude;
69     excludes;
70     nGlobalExcludes;
71     globalExcludes;
72     isError;
73    
74     setFsimulation( &fInfo, &n_atoms, identArray, &n_exclude, excludes, &nGlobalExcludes, globalExcludes, &isError );
75    
76     if( isError ){
77    
78     sprintf( painCave.errMsg,
79     "There was an error setting the simulation information in fortran.\n" );
80     painCave.isFatal = 1;
81     simError();
82     }
83    
84     #ifdef IS_MPI
85     sprintf( checkPointMsg,
86     "succesfully sent the simulation information to fortran.\n");
87     MPIcheckPoint();
88     #endif // is_mpi
89     }
90