ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE/src/oose.cpp
Revision: 1169
Committed: Wed May 12 19:44:54 2004 UTC (20 years, 11 months ago) by gezelter
File size: 1711 byte(s)
Log Message:
MPI fixes and removal of extraneous write statements

File Contents

# Content
1 #ifndef IS_MPI
2 #include <iostream>
3 #include <fstream>
4 #include <cstdlib>
5 #include <cmath>
6 #include <cstring>
7
8 #ifdef PROFILE
9 #include "mdProfile.hpp"
10 #endif // PROFILE
11
12 #include "simError.h"
13 #include "SimSetup.hpp"
14 #include "SimInfo.hpp"
15 #include "Atom.hpp"
16 #include "Integrator.hpp"
17 #include "Thermo.hpp"
18 #include "ReadWrite.hpp"
19 #include "OOPSEMinimizer.hpp"
20
21 char* program_name;
22 using namespace std;
23
24 int main(int argc,char* argv[]){
25
26 char* in_name;
27 SimSetup* startMe;
28 SimInfo* entry_plug;
29
30 // first things first, all of the initializations
31
32 initSimError(); // the error handler
33 srand48( 1337 ); // the random number generator.
34
35 #ifdef PROFILE
36 initProfile();
37 #endif //profile
38
39 // check command line arguments, and set the input file
40
41 program_name = argv[0]; // save the program name in case we need it
42
43 if( argc < 2 ){
44 sprintf( painCave.errMsg,
45 "Error, bass file is needed to run.\n" );
46 painCave.isFatal = 1;
47 simError();
48 }
49
50 in_name = argv[1];
51
52 // create the simulation objects, and get the show on the road
53
54 entry_plug = new SimInfo();
55 startMe = new SimSetup();
56
57 startMe->setSimInfo( entry_plug );
58
59 #ifdef PROFILE
60 startProfile( pro1 );
61 #endif //profile
62
63 startMe->parseFile( in_name );
64
65 #ifdef PROFILE
66 endProfile( pro1 );
67
68 startProfile( pro2 );
69 #endif //profile
70
71 startMe->createSim();
72 delete startMe;
73
74 #ifdef PROFILE
75 endProfile( pro2 );
76
77 startProfile( pro3 );
78 #endif //profile
79
80 if (!entry_plug->has_minimizer)
81 entry_plug->the_integrator->integrate();
82 else
83 entry_plug->the_minimizer->minimize();
84 #ifdef PROFILE
85 endProfile( pro3 );
86
87 writeProfiles();
88 #endif //profile
89
90 return 0 ;
91 }
92
93 #endif