changed reading hint
[gromacs/adressmacs.git] / src / kernel / nmrun.c
blobd064df132559edd99c05b011ea990d540875e849
1 /*
2 * $Id$
3 *
4 * This source code is part of
5 *
6 * G R O M A C S
7 *
8 * GROningen MAchine for Chemical Simulations
9 *
10 * VERSION 2.0
12 * Copyright (c) 1991-1999
13 * BIOSON Research Institute, Dept. of Biophysical Chemistry
14 * University of Groningen, The Netherlands
16 * Please refer to:
17 * GROMACS: A message-passing parallel molecular dynamics implementation
18 * H.J.C. Berendsen, D. van der Spoel and R. van Drunen
19 * Comp. Phys. Comm. 91, 43-56 (1995)
21 * Also check out our WWW page:
22 * http://md.chem.rug.nl/~gmx
23 * or e-mail to:
24 * gromacs@chem.rug.nl
26 * And Hey:
27 * GRowing Old MAkes el Chrono Sweat
29 static char *SRCID_nmrun_c = "$Id$";
31 #include "typedefs.h"
32 #include "macros.h"
33 #include "copyrite.h"
34 #include "main.h"
35 #include "statutil.h"
36 #include "futil.h"
37 #include "mdrun.h"
39 int main(int argc,char *argv[])
41 static char *desc[] = {
42 "nmrun builds a Hessian matrix from single conformation.",
43 "For usual Normal Modes-like calculations, make sure that",
44 "the structure provided is properly energy-minimised.",
45 "The generated matrix can be diagonalized by g_nmeig."
47 t_commrec *cr;
48 t_filenm fnm[] = {
49 { efTPX, NULL, NULL, ffREAD },
50 { efMTX, "-m", "hessian", ffWRITE },
51 { efLOG, "-g", "nm", ffWRITE },
53 #define NFILE asize(fnm)
55 /* Command line options ! */
56 static bool bVerbose=FALSE,bCompact=TRUE;
57 #ifdef PARALLEL
58 static int nprocs=1;
59 #endif
60 static int nDLB=0,nstepout=10;
61 static t_pargs pa[] = {
62 #ifdef PARALLEL
63 { "-np", FALSE, etINT, {&nprocs},
64 "Number of processors, must be the same as used for grompp" },
65 #endif
66 { "-v", FALSE, etBOOL,{&bVerbose}, "Verbose mode" },
67 { "-compact", FALSE, etBOOL,{&bCompact},
68 "Write a compact log file" },
69 { "-dlb", FALSE, etINT, {&nDLB},
70 "HIDDENFrequency of dynamic load balancing. BUGGY do not use" },
71 { "-stepout", FALSE, etINT, {&nstepout},
72 "HIDDENFrequency of writing the remaining runtime" }
74 t_edsamyn edyn;
76 cr = init_par(&argc,&argv);
77 bVerbose = bVerbose && MASTER(cr);
78 edyn.bEdsam=FALSE;
80 if (MASTER(cr))
81 CopyRight(stderr,argv[0]);
83 parse_common_args(&argc,argv,
84 PCA_KEEP_ARGS | PCA_NOEXIT_ON_ARGS | PCA_SET_NPRI |
85 (MASTER(cr) ? 0 : PCA_QUIET),
86 TRUE,NFILE,fnm,asize(pa),pa,asize(desc),desc,0,NULL);
88 open_log(ftp2fn(efLOG,NFILE,fnm),cr);
90 if (MASTER(cr)) {
91 CopyRight(stdlog,argv[0]);
92 please_cite(stdlog,"Berendsen95a");
95 mdrunner(cr,NFILE,fnm,bVerbose,bCompact,nDLB,TRUE,nstepout,&edyn);
97 #ifdef USE_MPI
98 if (gmx_parallel)
99 MPI_Finalize();
100 #endif
102 return 0;