* 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 <string.h>
+#include "gmxpre.h"
+
#include <math.h>
+#include <string.h>
#include <algorithm>
-#include "macros.h"
#include "gromacs/commandline/pargs.h"
-#include "sysstuff.h"
-#include "smalloc.h"
-#include "vec.h"
-#include "pbc.h"
-#include "bondf.h"
-#include "gromacs/fileio/futil.h"
-#include "xvgr.h"
-#include "txtdump.h"
-#include "gromacs/statistics/statistics.h"
-#include "gstat.h"
-#include "index.h"
-#include "random.h"
-#include "names.h"
-#include "physics.h"
-#include "calcmu.h"
#include "gromacs/fileio/enxio.h"
-#include "nrjac.h"
#include "gromacs/fileio/matio.h"
-#include "gmx_ana.h"
-#include "copyrite.h"
#include "gromacs/fileio/trxio.h"
-
+#include "gromacs/fileio/xvgr.h"
+#include "gromacs/gmxana/gmx_ana.h"
+#include "gromacs/gmxana/gstat.h"
+#include "gromacs/legacyheaders/calcmu.h"
+#include "gromacs/legacyheaders/copyrite.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/txtdump.h"
+#include "gromacs/legacyheaders/viewit.h"
+#include "gromacs/linearalgebra/nrjac.h"
+#include "gromacs/listed-forces/bonded.h"
+#include "gromacs/math/units.h"
+#include "gromacs/math/vec.h"
+#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/pbcutil/rmpbc.h"
+#include "gromacs/random/random.h"
+#include "gromacs/statistics/statistics.h"
+#include "gromacs/topology/index.h"
#include "gromacs/utility/exceptions.h"
-#include "gromacs/utility/programinfo.h"
+#include "gromacs/utility/fatalerror.h"
+#include "gromacs/utility/futil.h"
+#include "gromacs/utility/smalloc.h"
#define e2d(x) ENM2DEBYE*(x)
#define EANG2CM E_CHARGE*1.0e-10 /* e Angstrom to Coulomb meter */
snew(gb, 1);
- if ((ptr = getenv("GKRWIDTH")) != NULL)
+ if ((ptr = getenv("GMX_DIPOLE_SPACING")) != NULL)
{
double bw = strtod(ptr, NULL);
gb->spacing = bw;
}
/*2.0*j/(gb->ny-1.0)-1.0;*/
}
- out = ffopen(cmap, "w");
+ out = gmx_ffopen(cmap, "w");
write_xpm(out, 0,
"Dipole Orientation Distribution", "Fraction", "r (nm)",
gb->bPhi ? "Phi" : "Alpha",
gb->nx, gb->ny, xaxis, yaxis,
gb->cmap, 0, hi, rlo, rhi, nlevels);
- ffclose(out);
+ gmx_ffclose(out);
sfree(xaxis);
sfree(yaxis);
}
/* Swap x0 and x1 */
x0 = x1;
}
- ffclose(fp);
+ gmx_ffclose(fp);
}
gmx_bool read_mu_from_enx(ener_file_t fmu, int Vol, ivec iMu, rvec mu, real *vol,
slab_dipole[i][ZZ]/nframes,
mutot);
}
- ffclose(fp);
+ gmx_ffclose(fp);
do_view(oenv, fn, "-autoscale xy -nxy");
}
snew(dipsp, gnx_tot);
/* we need a dummy file for gnuplot */
- dip3d = (FILE *)ffopen("dummy.dat", "w");
+ dip3d = (FILE *)gmx_ffopen("dummy.dat", "w");
fprintf(dip3d, "%f %f %f", 0.0, 0.0, 0.0);
- ffclose(dip3d);
+ gmx_ffclose(dip3d);
- dip3d = (FILE *)ffopen(fndip3d, "w");
+ dip3d = (FILE *)gmx_ffopen(fndip3d, "w");
try
{
gmx::BinaryInformationSettings settings;
settings.generatedByHeader(true);
settings.linePrefix("# ");
- gmx::printBinaryInformation(dip3d, gmx::ProgramInfo::getInstance(),
+ gmx::printBinaryInformation(dip3d, output_env_get_program_context(oenv),
settings);
}
GMX_CATCH_ALL_AND_EXIT_WITH_FATAL_ERROR;
close_trj(status);
}
- ffclose(outmtot);
- ffclose(outaver);
- ffclose(outeps);
+ gmx_ffclose(outmtot);
+ gmx_ffclose(outaver);
+ gmx_ffclose(outeps);
if (fnadip)
{
- ffclose(adip);
+ gmx_ffclose(adip);
}
if (cosaver)
{
- ffclose(caver);
+ gmx_ffclose(caver);
}
if (dip3d)
fprintf(dip3d, "set zrange [0.0:%4.2f]\n\n", box[ZZ][ZZ]);
fprintf(dip3d, "splot 'dummy.dat' using 1:2:3 w vec\n");
fprintf(dip3d, "pause -1 'Hit return to continue'\n");
- ffclose(dip3d);
+ gmx_ffclose(dip3d);
}
if (bSlab)
fprintf(outdd, "%10g %10f\n",
(i*mu_max)/ndipbin, dipole_bin[i]/(double)teller);
}
- ffclose(outdd);
+ gmx_ffclose(outdd);
sfree(dipole_bin);
}
if (bGkr)
t_filenm fnm[] = {
{ efEDR, "-en", NULL, ffOPTRD },
{ efTRX, "-f", NULL, ffREAD },
- { efTPX, NULL, NULL, ffREAD },
+ { efTPR, NULL, NULL, ffREAD },
{ efNDX, NULL, NULL, ffOPTRD },
{ efXVG, "-o", "Mtot", ffWRITE },
{ efXVG, "-eps", "epsilon", ffWRITE },
npargs = asize(pa);
ppa = add_acf_pargs(&npargs, pa);
- if (!parse_common_args(&argc, argv, PCA_CAN_TIME | PCA_CAN_VIEW | PCA_BE_NICE,
+ if (!parse_common_args(&argc, argv, PCA_CAN_TIME | PCA_CAN_VIEW,
NFILE, fnm, npargs, ppa, asize(desc), desc, 0, NULL, &oenv))
{
return 0;
}
snew(top, 1);
- ePBC = read_tpx_top(ftp2fn(efTPX, NFILE, fnm), NULL, box,
+ ePBC = read_tpx_top(ftp2fn(efTPR, NFILE, fnm), NULL, box,
&natoms, NULL, NULL, NULL, top);
snew(gnx, ncos);