| 1 |
mmeineke |
20 |
#include <iostream> |
| 2 |
|
|
#include <fstream> |
| 3 |
|
|
#include <cstdlib> |
| 4 |
|
|
#include <cmath> |
| 5 |
|
|
#include <cstring> |
| 6 |
|
|
|
| 7 |
mmeineke |
187 |
#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 |
mmeineke |
20 |
|
| 15 |
|
|
char* program_name; |
| 16 |
|
|
using namespace std; |
| 17 |
|
|
|
| 18 |
|
|
int main(int argc,char* argv[]){ |
| 19 |
|
|
|
| 20 |
|
|
int i; |
| 21 |
|
|
unsigned int n_atoms, eo, xo; |
| 22 |
|
|
char* in_name; |
| 23 |
|
|
SimSetup* startMe; |
| 24 |
|
|
SimInfo* entry_plug; |
| 25 |
|
|
Thermo* tStats; |
| 26 |
|
|
int hand_made = 0; |
| 27 |
|
|
|
| 28 |
|
|
Atom** atoms; |
| 29 |
|
|
SRI** the_sris; |
| 30 |
|
|
LRI** the_lris; |
| 31 |
|
|
|
| 32 |
|
|
int n_bonds; |
| 33 |
|
|
int n_bends; |
| 34 |
|
|
int n_torsions; |
| 35 |
|
|
int n_SRI; |
| 36 |
|
|
int n_LRI; |
| 37 |
|
|
int n_exclude; |
| 38 |
|
|
|
| 39 |
mmeineke |
187 |
// first things first, all of the initializations |
| 40 |
mmeineke |
20 |
|
| 41 |
mmeineke |
187 |
srand48( 1337 ); // the random number generator. |
| 42 |
|
|
initSimError(); // the error handler |
| 43 |
mmeineke |
20 |
|
| 44 |
|
|
program_name = argv[0]; /*save the program name in case we need it*/ |
| 45 |
|
|
if( argc < 2 ){ |
| 46 |
mmeineke |
187 |
sprintf( painCave.errMsg, |
| 47 |
|
|
"Error, bass file is needed to run.\n" ); |
| 48 |
|
|
painCave.isFatal = 1; |
| 49 |
|
|
simError(); |
| 50 |
mmeineke |
20 |
} |
| 51 |
|
|
|
| 52 |
|
|
|
| 53 |
|
|
in_name = argv[1]; |
| 54 |
|
|
entry_plug = new SimInfo; |
| 55 |
|
|
|
| 56 |
|
|
startMe = new SimSetup; |
| 57 |
|
|
startMe->setSimInfo( entry_plug ); |
| 58 |
|
|
startMe->parseFile( in_name ); |
| 59 |
|
|
startMe->createSim(); |
| 60 |
|
|
|
| 61 |
|
|
delete startMe; |
| 62 |
|
|
|
| 63 |
|
|
entry_plug->the_integrator->integrate(); |
| 64 |
|
|
|
| 65 |
|
|
return 0 ; |
| 66 |
|
|
} |
| 67 |
|
|
|
| 68 |
|
|
|