CoMD
A Mini-app for Co-Design of Classical Molecular Dynamics.
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
mycommand.h
Go to the documentation of this file.
1 /// \file
2 /// Handle command line arguments.
3 
4 #ifndef MYCOMMAND_H
5 #define MYCOMMAND_H
6 
7 #include <stdio.h>
8 
9 /// A structure to hold the value of every run-time parameter that can
10 /// be read from the command line.
11 typedef struct CommandSt
12 {
13  char potDir[1024]; //!< the directory where EAM potentials reside
14  char potName[1024]; //!< the name of the potential
15  char potType[1024]; //!< the type of the potential (funcfl or setfl)
16  int doeam; //!< a flag to determine whether we're running EAM potentials
17  int nx; //!< number of unit cells in x
18  int ny; //!< number of unit cells in y
19  int nz; //!< number of unit cells in z
20  int xproc; //!< number of processors in x direction
21  int yproc; //!< number of processors in y direction
22  int zproc; //!< number of processors in z direction
23  int nSteps; //!< number of time steps to run
24  int printRate; //!< number of steps between output
25  double dt; //!< time step (in femtoseconds)
26  double lat; //!< lattice constant (in Angstroms)
27  double temperature; //!< simulation initial temperature (in Kelvin)
28  double initialDelta; //!< magnitude of initial displacement from lattice (in Angstroms)
29 } Command;
30 
31 /// Process command line arguments into an easy to handle structure.
32 Command parseCommandLine(int argc, char** argv);
33 
34 /// Print run parameters in yaml format on the supplied output stream.
35 void printCmdYaml(FILE* file, Command* cmd);
36 
37 #endif