Simpatico  v1.10
ddSim.cpp
1 /*
2 * Simpatico - Simulation Package for Polymeric and Molecular Liquids
3 *
4 * Copyright 2010 - 2017, The Regents of the University of Minnesota
5 * Distributed under the terms of the GNU General Public License.
6 */
7 
8 #include <ddMd/simulation/Simulation.h>
9 #include <util/param/ParamComponent.h>
10 #include <util/global.h>
11 
12 #include <iostream>
13 
14 using namespace Util;
15 
16 /*
17 * Main program for parallel domain-decomposition program (ddSim).
18 */
19 int main(int argc, char **argv)
20 {
21 
22  #ifdef UTIL_MPI
23  MPI::Init();
24  #endif
25 
26  #ifdef UTIL_MPI
27  DdMd::Simulation simulation(MPI::COMM_WORLD);
28  #else
29  DdMd::Simulation simulation();
30  #endif
31 
32  // Read and apply command line options.
33  simulation.setOptions(argc, argv);
34 
35  // Read parameter file from default param stream (read on master).
36  simulation.readParam();
37 
38  // Read command file (command file is specified in parameter file).
39  simulation.readCommands();
40 
41  #ifdef UTIL_MPI
42  MPI::Finalize();
43  #endif
44 
45  return 0;
46 }
File containing preprocessor macros for error handling.
Main object for a domain-decomposition MD simulation.
Utility classes for scientific computation.
Definition: accumulators.mod:1