--- trunk/OOPSE/src/oopse.cpp 2003/06/30 22:04:01 568 +++ trunk/OOPSE/src/oopse.cpp 2004/07/16 16:29:44 1330 @@ -6,6 +6,10 @@ #include #include +#ifdef PROFILE +#include "mdProfile.hpp" +#endif // PROFILE + #include "simError.h" #include "SimSetup.hpp" #include "SimInfo.hpp" @@ -13,34 +17,52 @@ #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 - - cerr << "Hello from MPI!\n"; - + initSimError(); // the error handler srand48( 1337 ); // the random number generator. +#ifdef PROFILE + initProfile(); +#endif //profile // check command line arguments, and set the input file program_name = argv[0]; // save the program name in case we need it if( worldRank == 0 ){ + std::cerr << + " +----------------------------------------------------------------------+\n" << + " | ____ ____ ____ _____ ______ The OpenSource, Object-oriented |\n" << + " | / __ \\/ __ \\/ __ \\/ ___// ____/ Parallel Simulation Engine. |\n" << + " | / / / / / / / /_/ /\\__ \\/ __/ |\n" << + " | / /_/ / /_/ / ____/___/ / /___ Copyright 2004 by the |\n" << + " | \\____/\\____/_/ /____/_____/ University of Notre Dame. |\n" << + " | http://www.oopse.org |\n" << + " | |\n" << + " | OOPSE is an OpenScience project. All source code is available for |\n" << + " | any use subject to only one condition: |\n" << + " | |\n" << + " | Any published work resulting from the use of this code must cite the |\n" << + " | following paper: M. A. Meineke, C. F. Vardeman II, T. Lin, |\n" << + " | C. J. Fennell, and J. D. Gezelter, |\n" << + " | J. Comp. Chem. XX, XXXX (2004). |\n" << + " +----------------------------------------------------------------------+\n" << + "\n"; + if( argc < 2 ){ strcpy( painCave.errMsg, "Error, bass file is needed to run.\n" ); painCave.isFatal = 1; @@ -52,21 +74,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();