4 |
|
#include <cmath> |
5 |
|
#include <cstring> |
6 |
|
|
7 |
+ |
#include "simError.h" |
8 |
+ |
#include "SimSetup.hpp" |
9 |
+ |
#include "SimInfo.hpp" |
10 |
+ |
#include "Atom.hpp" |
11 |
+ |
#include "Integrator.hpp" |
12 |
+ |
#include "Thermo.hpp" |
13 |
+ |
#include "ReadWrite.hpp" |
14 |
|
|
8 |
– |
#include "../../inc/SimSetup.hpp" |
9 |
– |
#include "../../inc/SimInfo.hpp" |
10 |
– |
#include "../../inc/Atom.hpp" |
11 |
– |
#include "../../inc/Integrator.hpp" |
12 |
– |
#include "../../inc/Thermo.hpp" |
13 |
– |
#include "../../inc/ReadWrite.hpp" |
14 |
– |
|
15 |
|
char* program_name; |
16 |
|
using namespace std; |
17 |
|
|
36 |
|
int n_LRI; |
37 |
|
int n_exclude; |
38 |
|
|
39 |
+ |
// first things first, all of the initializations |
40 |
|
|
41 |
< |
srand48( 1337 ); // initialize the random number generator. |
42 |
< |
|
41 |
> |
printf("Initializing stuff ....\n"); |
42 |
> |
srand48( 1337 ); // the random number generator. |
43 |
> |
initSimError(); // the error handler |
44 |
|
|
45 |
|
program_name = argv[0]; /*save the program name in case we need it*/ |
46 |
|
if( argc < 2 ){ |
47 |
< |
cerr<< "Error, bass file is needed to run.\n"; |
48 |
< |
exit(8); |
47 |
> |
sprintf( painCave.errMsg, |
48 |
> |
"Error, bass file is needed to run.\n" ); |
49 |
> |
painCave.isFatal = 1; |
50 |
> |
simError(); |
51 |
|
} |
52 |
|
|
53 |
|
|
54 |
|
in_name = argv[1]; |
55 |
< |
entry_plug = new SimInfo; |
55 |
> |
entry_plug = new SimInfo(); |
56 |
|
|
57 |
< |
startMe = new SimSetup; |
57 |
> |
startMe = new SimSetup(); |
58 |
|
startMe->setSimInfo( entry_plug ); |
59 |
|
startMe->parseFile( in_name ); |
60 |
|
startMe->createSim(); |