17 |
|
#include "Integrator.hpp" |
18 |
|
#include "Thermo.hpp" |
19 |
|
#include "ReadWrite.hpp" |
20 |
+ |
#include "OOPSEMinimizer.hpp" |
21 |
|
|
22 |
|
char* program_name; |
23 |
|
using namespace std; |
27 |
|
char* in_name; |
28 |
|
SimSetup* startMe; |
29 |
|
SimInfo* entry_plug; |
30 |
< |
|
30 |
< |
|
30 |
> |
|
31 |
|
// first things first, all of the initializations |
32 |
|
|
33 |
|
MPI_Init( &argc, &argv ); // the MPI communicators |
44 |
|
program_name = argv[0]; // save the program name in case we need it |
45 |
|
|
46 |
|
if( worldRank == 0 ){ |
47 |
+ |
std::cerr << |
48 |
+ |
" +----------------------------------------------------------------------+\n" << |
49 |
+ |
" | ____ ____ ____ _____ ______ The OpenSource, Object-oriented |\n" << |
50 |
+ |
" | / __ \\/ __ \\/ __ \\/ ___// ____/ Parallel Simulation Engine. |\n" << |
51 |
+ |
" | / / / / / / / /_/ /\\__ \\/ __/ |\n" << |
52 |
+ |
" | / /_/ / /_/ / ____/___/ / /___ Copyright 2004 by the |\n" << |
53 |
+ |
" | \\____/\\____/_/ /____/_____/ University of Notre Dame. |\n" << |
54 |
+ |
" | http://www.oopse.org |\n" << |
55 |
+ |
" | |\n" << |
56 |
+ |
" | OOPSE is an OpenScience project. All source code is available for |\n" << |
57 |
+ |
" | any use subject to only one condition: |\n" << |
58 |
+ |
" | |\n" << |
59 |
+ |
" | Any published work resulting from the use of this code must cite the |\n" << |
60 |
+ |
" | following paper: M. A. Meineke, C. F. Vardeman II, T. Lin, |\n" << |
61 |
+ |
" | C. J. Fennell, and J. D. Gezelter, |\n" << |
62 |
+ |
" | J. Comp. Chem. XX, XXXX (2004). |\n" << |
63 |
+ |
" +----------------------------------------------------------------------+\n" << |
64 |
+ |
"\n"; |
65 |
+ |
|
66 |
|
if( argc < 2 ){ |
67 |
|
strcpy( painCave.errMsg, "Error, bass file is needed to run.\n" ); |
68 |
|
painCave.isFatal = 1; |
74 |
|
|
75 |
|
strcpy( checkPointMsg, "Successful number of arguments" ); |
76 |
|
MPIcheckPoint(); |
77 |
< |
|
59 |
< |
|
77 |
> |
|
78 |
|
// create the simulation objects, and get the show on the road |
79 |
|
|
80 |
|
entry_plug = new SimInfo; |
82 |
|
|
83 |
|
startMe->setSimInfo( entry_plug ); |
84 |
|
|
67 |
– |
#ifdef PROFILE |
68 |
– |
startProfile( pro1 ); |
69 |
– |
#endif //profile |
85 |
|
|
86 |
|
startMe->parseFile( in_name ); |
87 |
|
|
73 |
– |
#ifdef PROFILE |
74 |
– |
endProfile( pro1 ); |
75 |
– |
|
76 |
– |
startProfile( pro2 ); |
77 |
– |
#endif //profile |
88 |
|
|
89 |
|
startMe->createSim(); |
90 |
|
|
91 |
|
delete startMe; |
92 |
|
|
93 |
< |
#ifdef PROFILE |
94 |
< |
endProfile( pro2 ); |
93 |
> |
if (!entry_plug->has_minimizer) |
94 |
> |
entry_plug->the_integrator->integrate(); |
95 |
> |
else |
96 |
> |
entry_plug->the_minimizer->minimize(); |
97 |
|
|
86 |
– |
startProfile( pro3 ); |
87 |
– |
#endif //profile |
88 |
– |
|
89 |
– |
entry_plug->the_integrator->integrate(); |
90 |
– |
|
98 |
|
#ifdef PROFILE |
92 |
– |
endProfile( pro3 ); |
93 |
– |
|
99 |
|
writeProfiles(); |
100 |
|
#endif //profile |
101 |
|
|