ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/libmdtools/SimSetup.hpp
Revision: 1417
Committed: Tue Jul 27 15:41:17 2004 UTC (19 years, 11 months ago) by tim
File size: 2312 byte(s)
Log Message:
BASS eradication project (part 1)

File Contents

# User Rev Content
1 gezelter 1334 #ifndef __SIMSETUP_H__
2     #define __SIMSETUP_H__
3 tim 1417 #include <string>
4 gezelter 1334 #include "MakeStamps.hpp"
5     #include "Globals.hpp"
6     #include "ForceFields.hpp"
7     #include "SimInfo.hpp"
8     #include "ReadWrite.hpp"
9     #include "AllIntegrator.hpp"
10    
11 tim 1417 using namespace std;
12 gezelter 1334 // this routine is defined in BASS_interface.cpp
13     extern void set_interface_stamps( MakeStamps* ms, Globals* g );
14    
15 tim 1417 string getPrefix(const string& str ){
16     string prefix = str;
17     int pos;
18    
19     pos = prefix.rfind(".");
20     return prefix.substr(0, pos);
21     };
22    
23 gezelter 1334 class SimSetup{
24    
25     public:
26     SimSetup();
27     ~SimSetup();
28    
29     void setSimInfo( SimInfo* the_info ) { info = the_info; }
30     void setSimInfo( SimInfo* the_info, int theNinfo );
31     void suspendInit( void ) { initSuspend = true; }
32     void parseFile( char* fileName );
33     void createSim( void );
34    
35    
36     private:
37    
38     #ifdef IS_MPI
39     void receiveParse(void);
40     #endif
41    
42     void gatherInfo( void );
43     void sysObjectsCreation( void );
44     void finalInfoCheck( void );
45     void initSystemCoords( void );
46     void makeOutNames(void);
47     void makeIntegrator(void);
48     void initFortran(void);
49     void makeMinimizer(void);
50    
51     void createFF( void );
52     void compList( void );
53     void calcSysValues( void );
54     void makeSysArrays( void );
55    
56     #ifdef IS_MPI
57     void mpiMolDivide( void );
58    
59     int* mol2proc;
60     int* molCompType;
61    
62     #endif //is_mpi
63    
64     void initFromBass( void );
65     void makeMolecules( void );
66     void makeElement( double x, double y, double z );
67    
68     int ensembleCase;
69     int ffCase;
70    
71     MakeStamps* stamps;
72     Globals* globals;
73     char* inFileName;
74    
75     SimInfo* info;
76     int isInfoArray;
77     int nInfo;
78    
79     bool initSuspend;
80    
81     int n_components;
82     int globalAtomCounter;
83     int globalMolCounter;
84    
85     char force_field[100];
86     char forcefield_variant[100];
87     char ensemble[100];
88     Component** the_components;
89    
90     int* components_nmol;
91     MoleculeStamp** comp_stamps; //the stamps matching the components
92     int tot_nmol;
93     int tot_atoms;
94     int tot_groups;
95     int tot_rigid;
96     int tot_bonds;
97     int tot_bends;
98     int tot_torsions;
99     int tot_SRI;
100    
101     ForceFields* the_ff;
102    
103     // needed by makeElement
104    
105     int current_mol;
106     int current_comp_mol;
107     int current_comp;
108     int current_atom_ndx;
109     short int has_forcefield_variant;
110    
111     vector<int> globalAtomIndex;
112     vector<int> globalGroupIndex;
113     void setupZConstraint(SimInfo& theInfo); //setup parameters for zconstraint method
114    
115     };
116     #endif