/*
+ * This file is part of the GROMACS molecular simulation package.
*
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * For more info, check our website at http://www.gromacs.org
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
*
- * And Hey:
- * Green Red Orange Magenta Azure Cyan Skyblue
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
+
#include <math.h>
#include <string.h>
-#include "sysstuff.h"
-#include "physics.h"
-#include "typedefs.h"
-#include "smalloc.h"
-#include "gromacs/fileio/futil.h"
-#include "statutil.h"
-#include "vec.h"
-#include "index.h"
-#include "macros.h"
-#include "gmx_fatal.h"
-#include "xvgr.h"
-#include "rmpbc.h"
+#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trxio.h"
-#include "nrjac.h"
-#include "gmx_ana.h"
-
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/gmxana/gmx_ana.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/viewit.h"
+#include "gromacs/linearalgebra/nrjac.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/rmpbc.h"
+#include "gromacs/topology/index.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
static void gyro_eigen(double **gyr, double *eig, double **eigv, int *ord)
{
int gmx_polystat(int argc, char *argv[])
{
const char *desc[] = {
- "[TT]g_polystat[tt] plots static properties of polymers as a function of time",
+ "[THISMODULE] plots static properties of polymers as a function of time",
"and prints the average.[PAR]",
"By default it determines the average end-to-end distance and radii",
"of gyration of polymers. It asks for an index group and split this",
};
t_filenm fnm[] = {
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efTRX, "-f", NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-o", "polystat", ffWRITE },
gmx_rmpbc_t gpbc = NULL;
if (!parse_common_args(&argc, argv,
- PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT | PCA_BE_NICE,
+ PCA_CAN_VIEW | PCA_CAN_TIME | PCA_TIME_UNIT,
NFILE, fnm, asize(pa), pa, asize(desc), desc, 0, NULL, &oenv))
{
return 0;
}
snew(top, 1);
- ePBC = read_tpx_top(ftp2fn(efTPX, NFILE, fnm),
+ ePBC = read_tpx_top(ftp2fn(efTPR, NFILE, fnm),
NULL, box, &natoms, NULL, NULL, NULL, top);
fprintf(stderr, "Select a group of polymer mainchain atoms:\n");
for (d2 = 0; d2 < DIM; d2++)
{
sprintf(buf, "eig%d %c", d+1, 'x'+d2);
- legp[d*DIM+d2] = strdup(buf);
+ legp[d*DIM+d2] = gmx_strdup(buf);
}
}
xvgr_legend(outv, DIM*DIM, (const char**)legp, oenv);
close_trx(status);
- ffclose(out);
+ gmx_ffclose(out);
if (outv)
{
- ffclose(outv);
+ gmx_ffclose(outv);
}
if (outp)
{
- ffclose(outp);
+ gmx_ffclose(outp);
}
sum_eed2_tot /= frame;
/* Handle printing of internal distances. */
if (outi)
{
- fprintf(outi, "@ xaxes scale Logarithmic\n");
+ if (output_env_get_print_xvgr_codes(oenv))
+ {
+ fprintf(outi, "@ xaxes scale Logarithmic\n");
+ }
ymax = -1;
ymin = 1e300;
j = index[molind[1]-1] - index[molind[0]]; /* Polymer length -1. */
{
fprintf(outi, "%d %8.4f\n", i+1, intd[i]);
}
- ffclose(outi);
+ gmx_ffclose(outi);
}
do_view(oenv, opt2fn("-o", NFILE, fnm), "-nxy");