--- trunk/OOPSE/src/oopse.cpp 2003/04/03 20:21:54 447 +++ trunk/OOPSE/src/oopse.cpp 2004/05/12 19:44:54 1169 @@ -6,6 +6,10 @@ #include #include +#ifdef PROFILE +#include "mdProfile.hpp" +#endif // PROFILE + #include "simError.h" #include "SimSetup.hpp" #include "SimInfo.hpp" @@ -13,25 +17,27 @@ #include "Integrator.hpp" #include "Thermo.hpp" #include "ReadWrite.hpp" +#include "OOPSEMinimizer.hpp" char* program_name; using namespace std; int main(int argc,char* argv[]){ - int i; - unsigned int n_atoms, eo, xo; char* in_name; SimSetup* startMe; SimInfo* entry_plug; - - + // first things first, all of the initializations MPI_Init( &argc, &argv ); // the MPI communicators + initSimError(); // the error handler srand48( 1337 ); // the random number generator. +#ifdef PROFILE + initProfile(); +#endif //profile // check command line arguments, and set the input file @@ -49,21 +55,31 @@ int main(int argc,char* argv[]){ strcpy( checkPointMsg, "Successful number of arguments" ); MPIcheckPoint(); - - + // create the simulation objects, and get the show on the road entry_plug = new SimInfo; startMe = new SimSetup; startMe->setSimInfo( entry_plug ); + + startMe->parseFile( in_name ); + + startMe->createSim(); delete startMe; + + if (!entry_plug->has_minimizer) + entry_plug->the_integrator->integrate(); + else + entry_plug->the_minimizer->minimize(); - entry_plug->the_integrator->integrate(); - +#ifdef PROFILE + writeProfiles(); +#endif //profile + strcpy( checkPointMsg, "Oh what a lovely Tea Party!" ); MPIcheckPoint();