Simpatico  v1.10
mcSim.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 <mcMd/mcSimulation/McSimulation.h>
9 
10 /*
11 * Main single-processor Monte Carlo simulation program (mcSim).
12 */
13 int main(int argc, char **argv)
14 {
15  #ifdef UTIL_MPI
16  MPI::Init();
17  McMd::McSimulation simulation(MPI::COMM_WORLD);
18  #else
19  McMd::McSimulation simulation;
20  #endif
21 
22  // Process command line options
23  simulation.setOptions(argc, argv);
24 
25  // Read parameters from default parameter file
26  simulation.readParam();
27 
28  // Read command script to run simulation
29  simulation.readCommands();
30 
31  #ifdef UTIL_MPI
32  MPI::Finalize();
33  #endif
34 
35  return 0;
36 }
A Monte-Carlo simulation of one McSystem.
Definition: McSimulation.h:32
void readCommands(std::istream &in)
Read and execute commands from a command file input stream.
void readParam()
Read parameters from the default parameter istream.
void setOptions(int argc, char **argv)
Process command line options.