Combined enums.h and names* to mdtypes/md_enums.cpp/h.
Added doxygen comments to md_enums.h
Removed macros in inputrec.h to reduce cyclic dependencies.
Clean up of legacyheaders. By removing some unnecessary includes
from the files names.h and enums.h (now md_enums.h)
a lot of 'freeriders' showed up, therefore had to include
topology.h in many files.
Part of #1415
Change-Id: I12b8ef4f82b7aec806aea2eee7d77604e86dc576
mdlib -> imd
mdlib -> ewald
mdlib -> pulling
-mdtypes -> legacyheaders
timing -> legacyheaders
timing -> gmxlib
topology -> fileio
#include "gromacs/correlationfunctions/manyautocorrelation.h"
#include "gromacs/correlationfunctions/polynomials.h"
#include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/legacyheaders/types/hw_info.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/mdlib/vsite.h"
#include "gromacs/mdtypes/df_history.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/ishift.h"
static gmx_bool dynamic_dd_box(gmx_ddbox_t *ddbox, t_inputrec *ir)
{
- return (ddbox->nboundeddim < DIM || DYNAMIC_BOX(*ir));
+ return (ddbox->nboundeddim < DIM || inputrecDynamicBox(ir));
}
int ddglatnr(gmx_domdec_t *dd, int i)
dd = cr->dd;
comm = dd->comm;
- bBoxChanged = (bMasterState || DEFORM(*ir));
+ bBoxChanged = (bMasterState || inputrecDeform(ir));
if (ir->epc != epcNO)
{
/* With nstpcouple > 1 pressure coupling happens.
#include "gromacs/domdec/domdec.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/perf_est.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
{
/* For Ewald exclusions pbc_dx is not called */
bExcl_pbcdx =
- (IR_EXCL_FORCES(*ir) && !EEL_FULL(ir->coulombtype));
+ (inputrecExclForces(ir) && !EEL_FULL(ir->coulombtype));
pbcdxr = (double)n_bonded_dx(mtop, bExcl_pbcdx)/(double)mtop->natoms;
}
else
#include "gromacs/gmxlib/chargegroup.h"
#include "gromacs/gmxlib/gmx_omp_nthreads.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
* excluded pair should appear exactly once.
*/
rt->bExclRequired = (ir->cutoff_scheme == ecutsGROUP &&
- IR_EXCL_FORCES(*ir));
+ inputrecExclForces(ir));
int nexcl, mb;
bonded_distance_t bd_2b = { 0, -1, -1, -1 };
bonded_distance_t bd_mb = { 0, -1, -1, -1 };
- bExclRequired = IR_EXCL_FORCES(*ir);
+ bExclRequired = inputrecExclForces(ir);
vsite = init_vsite(mtop, NULL, TRUE);
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/math/vec.h"
+#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdlib/update.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <cmath>
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
/* There's nothing special to do here if just masses are perturbed,
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
#include "gromacs/mdlib/sim_util.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxmpi.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/gmxcomplex.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/cyclecounter.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/fileio/xdr_datatype.h"
#include "gromacs/fileio/xdrf.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/df_history.h"
#include "gromacs/mdtypes/energyhistory.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/utility/baseversion.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/fileio/gmxfio-xdr.h"
#include "gromacs/fileio/xdrf.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
bufi = *(groups->grpname[ni]);
for (j = 0; (j < state->nhchainlength); j++)
{
- if (IR_NVT_TROTTER(ir))
+ if (inputrecNvtTrotter(ir))
{
sprintf(cns, "-%d", j);
}
}
fprintf(stderr, "\nREAD %d NOSE-HOOVER Xi chains FROM %s\n\n", state->ngtc, fn);
- if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir))
+ if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir))
{
for (i = 0; i < state->nnhpres; i++)
{
#include "gromacs/fileio/filenm.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/gmxfio-xdr.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/boxutilities.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/gmxfio-xdr.h"
#include "gromacs/fileio/txtdump.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/trx.h"
#include "gromacs/fileio/xdrf.h"
#include "gromacs/fileio/xtcio.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/atoms.h"
+#include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/gmxassert.h"
#include <algorithm>
#include "gromacs/fileio/tpxio.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/fileio/enxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdlib/mdebin.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/dir_separator.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.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/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/main.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/math/do_fit.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/gmxana/gmx_ana.h"
#include "gromacs/gmxlib/disre.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
#include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
#include "gromacs/gmxana/gstat.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdebin.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/math/calculate-ewald-splitting-coefficient.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/random/random.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/index.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/do_fit.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/rmpbc.h"
#include "gromacs/topology/index.h"
#include "gromacs/gmxana/gmx_ana.h"
#include "gromacs/gmxlib/calcgrid.h"
#include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/perf_est.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/walltime_accounting.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/baseversion.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/random/random.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/fileio/trx.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/index.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/legacyheaders/gmx_cpuid.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arrayref.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/basenetwork.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/gmxlib/gpu_utils/ocl_compiler.h"
#include "gromacs/gmxlib/ocl_tools/oclutils.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/hw_info.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
void
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
void
#include "gromacs/gmxlib/nonbonded/nb_generic.h"
#include "gromacs/gmxlib/nonbonded/nb_generic_cg.h"
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/legacyheaders/types/nblist.h"
#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include <algorithm>
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/copyrite.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/gmxlib/warninp.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/gmxpreprocess/gpp_atomtype.h"
#include "gromacs/gmxpreprocess/topio.h"
#include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/resall.h"
#include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/residuetypes.h"
#include "gromacs/topology/symtab.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/3dtransforms.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/random.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/gmxpreprocess/toputil.h"
#include "gromacs/gmxpreprocess/vsite_parm.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/legacyheaders/types/nblist.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdlib/compute_io.h"
#include "gromacs/mdlib/genborn.h"
#include "gromacs/mdlib/perf_est.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/boxutilities.h"
#include "gromacs/pbcutil/pbc.h"
nshells++;
}
}
- if (IR_TWINRANGE(*ir) && (nshells > 0))
+ if (inputrecTwinRange(ir) && (nshells > 0))
{
snprintf(warn_buf, STRLEN,
"The combination of using shells and a twin-range cut-off is not supported");
#include <string.h>
#include "gromacs/gmxpreprocess/notset.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/pdb2top.h"
#include "gromacs/gmxpreprocess/toppush.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/gmxlib/readinp.h"
#include "gromacs/gmxlib/warninp.h"
#include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/index.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
{
warning_error(wi, "rlistlong can not be shorter than rlist");
}
- if (IR_TWINRANGE(*ir) && ir->nstlist == 0)
+ if (inputrecTwinRange(ir) && ir->nstlist == 0)
{
warning_error(wi, "Can not have nstlist == 0 with twin-range interactions");
}
- if (IR_TWINRANGE(*ir) && EI_VV(ir->eI))
+ if (inputrecTwinRange(ir) && EI_VV(ir->eI))
{
sprintf(warn_buf, "Twin-range interactions are not supported with integrator %s.", ei_names[ir->eI]);
warning_error(wi, warn_buf);
ir->nstpcouple = ir_optimal_nstpcouple(ir);
}
}
- if (IR_TWINRANGE(*ir))
+ if (inputrecTwinRange(ir))
{
check_nst("nstcalclr", ir->nstcalclr,
"nstcalcenergy", &ir->nstcalcenergy, wi);
}
}
- if (IR_TWINRANGE(*ir))
+ if (inputrecTwinRange(ir))
{
sprintf(err_buf, "nstdhdl must be divisible by nstcalclr");
CHECK(ir->fepvals->nstdhdl > 0 &&
if (ir_coulomb_is_zero_at_cutoff(ir) && ir->rlistlong <= ir->rcoulomb)
{
sprintf(warn_buf, "For energy conservation with switch/shift potentials, %s should be 0.1 to 0.3 nm larger than rcoulomb.",
- IR_TWINRANGE(*ir) ? "rlistlong" : "rlist");
+ inputrecTwinRange(ir) ? "rlistlong" : "rlist");
warning_note(wi, warn_buf);
}
if (ir_vdw_switched(ir) && (ir->rlistlong <= ir->rvdw))
{
sprintf(warn_buf, "For energy conservation with switch/shift potentials, %s should be 0.1 to 0.3 nm larger than rvdw.",
- IR_TWINRANGE(*ir) ? "rlistlong" : "rlist");
+ inputrecTwinRange(ir) ? "rlistlong" : "rlist");
warning_note(wi, warn_buf);
}
}
warning_error(wi, warn_buf);
}
- if (IR_TWINRANGE(*ir) && ir->nstlist > 1)
+ if (inputrecTwinRange(ir) && ir->nstlist > 1)
{
sprintf(warn_buf, "With twin-range cut-off's and SHAKE the virial and the pressure are incorrect.");
if (ir->epc == epcNO)
#include "gromacs/gmxlib/readinp.h"
#include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdatoms.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/trrio.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/gmxpreprocess/topshake.h"
#include "gromacs/gmxpreprocess/toputil.h"
#include "gromacs/gmxpreprocess/vsite_parm.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdlib/genborn.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/symtab.h"
#include "gromacs/topology/topology.h"
#include "gromacs/gmxpreprocess/readir.h"
#include "gromacs/gmxpreprocess/topdirs.h"
#include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/symtab.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/resall.h"
#include "gromacs/gmxpreprocess/toputil.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/gmxpreprocess/notset.h"
#include "gromacs/gmxpreprocess/pdb2top.h"
#include "gromacs/gmxpreprocess/toppush.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/symtab.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/imd/imdsocket.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
/* Catch all rule for the remaining IMD types which we don't expect */
default:
- fprintf(stderr, " %s Received unexpected %s.\n", IMDstr, ENUM_NAME((int)itype, IMD_NR, eIMDType_names));
+ fprintf(stderr, " %s Received unexpected %s.\n", IMDstr, enum_name((int)itype, IMD_NR, eIMDType_names));
imd_fatal(IMDsetup, "Terminating connection\n");
break;
} /* end switch */
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, 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.
- *
- * 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.
- *
- * 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.
- *
- * 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.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef _names_h
-#define _names_h
-
-#include "gromacs/legacyheaders/types/forcerec.h"
-#include "gromacs/topology/atoms.h"
-#include "gromacs/topology/topology.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/* All string arrays are NULL terminated, and therefore have an
- * extra argument (the +1)
- * these should correspond to names.c and include/types/enums.h
- */
-extern const char *etcoupl_names[etcNR+1];
-extern const char *epcoupl_names[epcNR+1];
-extern const char *epcoupltype_names[epctNR+1];
-extern const char *erefscaling_names[erscNR+1];
-extern const char *ecutscheme_names[ecutsNR+1];
-extern const char *ens_names[ensNR+1];
-extern const char *ei_names[eiNR+1];
-extern const char *yesno_names[BOOL_NR+1];
-extern const char *bool_names[BOOL_NR+1];
-extern const char *eintmod_names[eintmodNR+1];
-extern const char *eel_names[eelNR+1];
-extern const char *eewg_names[eewgNR+1];
-extern const char *evdw_names[evdwNR+1];
-extern const char *eljpme_names[eljpmeNR+1];
-extern const char *econstr_names[econtNR+1];
-extern const char *ptype_str[eptNR+1];
-extern const char *egrp_nm[egNR+1];
-extern const char *edisre_names[edrNR+1];
-extern const char *edisreweighting_names[edrwNR+1];
-extern const char *enbf_names[eNBF_NR+1];
-extern const char *ecomb_names[eCOMB_NR+1];
-extern const char *gtypes[egcNR+1];
-extern const char *esimtemp_names[esimtempNR+1];
-extern const char *efep_names[efepNR+1];
-extern const char *efpt_names[efptNR+1];
-extern const char *efpt_singular_names[efptNR+1];
-extern const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1];
-extern const char *elamstats_names[elamstatsNR+1];
-extern const char *elmcmove_names[elmcmoveNR+1];
-extern const char *elmceq_names[elmceqNR+1];
-extern const char *separate_dhdl_file_names[esepdhdlfileNR+1];
-extern const char *dhdl_derivatives_names[edhdlderivativesNR+1];
-extern const char *esol_names[esolNR+1];
-extern const char *edispc_names[edispcNR+1];
-extern const char *ecm_names[ecmNR+1];
-extern const char *eann_names[eannNR+1];
-extern const char *egb_names[egbNR+1];
-extern const char *eis_names[eisNR+1];
-extern const char *esa_names[esaNR+1];
-extern const char *ewt_names[ewtNR+1];
-extern const char *epull_names[epullNR+1];
-extern const char *epullg_names[epullgNR+1];
-extern const char *erotg_names[erotgNR+1];
-extern const char *erotg_originnames[erotgNR+1];
-extern const char *erotg_fitnames[erotgFitNR+1];
-extern const char *eSwapTypes_names[eSwapTypesNR+1];
-extern const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1];
-
-extern const char *eQMmethod_names[eQMmethodNR+1];
-extern const char *eQMbasis_names[eQMbasisNR+1];
-extern const char *eQMMMscheme_names[eQMMMschemeNR+1];
-extern const char *eMultentOpt_names[eMultentOptNR+1];
-extern const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1];
-extern const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1];
-extern const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1];
-extern const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1];
-
-#define UNDEFINED "UNDEFINED"
-#define ENUM_NAME(e, max, names) ((((e) < 0) || ((e) >= (max))) ? UNDEFINED : (names)[e])
-
-#define EBOOL(e) ENUM_NAME(e, BOOL_NR, bool_names)
-#define ECUTSCHEME(e) ENUM_NAME(e, ecutsNR, ecutscheme_names)
-#define ENS(e) ENUM_NAME(e, ensNR, ens_names)
-#define EI(e) ENUM_NAME(e, eiNR, ei_names)
-#define ETCOUPLTYPE(e) ENUM_NAME(e, etcNR, etcoupl_names)
-#define EPCOUPLTYPE(e) ENUM_NAME(e, epcNR, epcoupl_names)
-#define EPCOUPLTYPETYPE(e) ENUM_NAME(e, epctNR, epcoupltype_names)
-#define EREFSCALINGTYPE(e) ENUM_NAME(e, erscNR, erefscaling_names)
-#define EBLOCKS(e) ENUM_NAME(e, ebNR, eblock_names)
-#define EPARAM(e) ENUM_NAME(e, epNR, eparam_names)
-#define INTMODIFIER(e) ENUM_NAME(e, eintmodNR, eintmod_names)
-#define EELTYPE(e) ENUM_NAME(e, eelNR, eel_names)
-#define EVDWTYPE(e) ENUM_NAME(e, evdwNR, evdw_names)
-#define ECONSTRTYPE(e) ENUM_NAME(e, econtNR, econstr_names)
-#define EDISRETYPE(e) ENUM_NAME(e, edrNR, edisre_names)
-#define EDISREWEIGHTING(e) ENUM_NAME(e, edrwNR, edisreweighting_names)
-#define ENBFNAME(e) ENUM_NAME(e, eNBF_NR, enbf_names)
-#define ECOMBNAME(e) ENUM_NAME(e, eCOMB_NR, ecomb_names)
-#define ESIMTEMP(e) ENUM_NAME(e, esimtempNR, esimtemp_names)
-#define EFEPTYPE(e) ENUM_NAME(e, efepNR, efep_names)
-#define SEPDHDLFILETYPE(e) ENUM_NAME(e, esepdhdlfileNR, separate_dhdl_file_names)
-#define DHDLDERIVATIVESTYPE(e) ENUM_NAME(e, edhdlderivativesNR, dhdl_derivatives_names)
-#define ESOLTYPE(e) ENUM_NAME(e, esolNR, esol_names)
-#define ENLISTTYPE(e) ENUM_NAME(e, enlistNR, enlist_names)
-#define EDISPCORR(e) ENUM_NAME(e, edispcNR, edispc_names)
-#define ECOM(e) ENUM_NAME(e, ecmNR, ecm_names)
-#define EANNEAL(e) ENUM_NAME(e, eannNR, eann_names)
-#define EGBALGORITHM(e) ENUM_NAME(e, egbNR, egb_names)
-#define ESAALGORITHM(e) ENUM_NAME(e, esaNR, esa_names)
-#define EIMPLICITSOL(e) ENUM_NAME(e, eisNR, eis_names)
-#define EWALLTYPE(e) ENUM_NAME(e, ewtNR, ewt_names)
-#define EPULLTYPE(e) ENUM_NAME(e, epullNR, epull_names)
-#define EPULLGEOM(e) ENUM_NAME(e, epullgNR, epullg_names)
-#define EROTGEOM(e) ENUM_NAME(e, erotgNR, erotg_names)
-#define EROTORIGIN(e) ENUM_NAME(e, erotgOriginNR, erotg_originnames)
-#define EROTFIT(e) ENUM_NAME(e, erotgFitNR, erotg_fitnames)
-#define ESWAPTYPE(e) ENUM_NAME(e, eSwapTypesNR, eSwapTypes_names)
-#define EQMMETHOD(e) ENUM_NAME(e, eQMmethodNR, eQMmethod_names)
-#define EQMBASIS(e) ENUM_NAME(e, eQMbasisNR, eQMbasis_names)
-#define EQMMMSCHEME(e) ENUM_NAME(e, eQMMMschemeNR, eQMMMscheme_names)
-#define EMULTENTOPT(e) ENUM_NAME(e, eMultentOptNR, eMultentOpt_names)
-#define ELJPMECOMBNAMES(e) ENUM_NAME(e, eljpmeNR, eljpme_names)
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _names_h */
+++ /dev/null
-/*
- * This file is part of the GROMACS molecular simulation package.
- *
- * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015, 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.
- *
- * 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.
- *
- * 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.
- *
- * 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.
- *
- * To help us fund GROMACS development, we humbly ask that you cite
- * the research papers on the package. Check out http://www.gromacs.org.
- */
-
-#ifndef ENUMS_H_
-#define ENUMS_H_
-
-/* note: these enums should correspond to the names in gmxlib/names.c */
-
-/*! \brief The two compartments for CompEL setups. */
-enum eCompartment {
- eCompA, eCompB, eCompNR
-};
-
-/*! \brief The channels that define with their COM the compartment boundaries in CompEL setups.
- *
- * In principle one could also use modified setups with more than two channels.
- */
-enum eChannel {
- eChan0, eChan1, eChanNR
-};
-
-enum {
- etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENMASSIVE, etcVRESCALE, etcNR
-}; /* yes is an alias for berendsen */
-
-#define ETC_ANDERSEN(e) (((e) == etcANDERSENMASSIVE) || ((e) == etcANDERSEN))
-
-enum {
- epcNO, epcBERENDSEN, epcPARRINELLORAHMAN, epcISOTROPIC, epcMTTK, epcNR
-}; /* isotropic is an alias for berendsen */
-
-/* trotter decomposition extended variable parts */
-enum {
- etrtNONE, etrtNHC, etrtBAROV, etrtBARONHC, etrtNHC2, etrtBAROV2, etrtBARONHC2,
- etrtVELOCITY1, etrtVELOCITY2, etrtPOSITION, etrtSKIPALL, etrtNR
-};
-
-/* sequenced parts of the trotter decomposition */
-enum {
- ettTSEQ0, ettTSEQ1, ettTSEQ2, ettTSEQ3, ettTSEQ4, ettTSEQMAX
-};
-
-enum {
- epctISOTROPIC, epctSEMIISOTROPIC, epctANISOTROPIC,
- epctSURFACETENSION, epctNR
-};
-
-enum {
- erscNO, erscALL, erscCOM, erscNR
-};
-
-enum {
- ecutsVERLET, ecutsGROUP, ecutsNR
-};
-
-/* Coulomb / VdW interaction modifiers.
- * grompp replaces eintmodPOTSHIFT_VERLET by eintmodPOTSHIFT or eintmodNONE.
- * Exactcutoff is only used by Reaction-field-zero, and is not user-selectable.
- */
-enum eintmod {
- eintmodPOTSHIFT_VERLET, eintmodPOTSHIFT, eintmodNONE, eintmodPOTSWITCH, eintmodEXACTCUTOFF, eintmodFORCESWITCH, eintmodNR
-};
-
-/*
- * eelNOTUSED1 used to be GB, but to enable generalized born with different
- * forms of electrostatics (RF, switch, etc.) in the future it is now selected
- * separately (through the implicit_solvent option).
- */
-enum {
- eelCUT, eelRF, eelGRF, eelPME, eelEWALD, eelP3M_AD,
- eelPOISSON, eelSWITCH, eelSHIFT, eelUSER, eelGB_NOTUSED, eelRF_NEC_UNSUPPORTED, eelENCADSHIFT,
- eelPMEUSER, eelPMESWITCH, eelPMEUSERSWITCH, eelRF_ZERO, eelNR
-};
-
-/* Ewald geometry */
-enum {
- eewg3D, eewg3DC, eewgNR
-};
-
-#define EEL_RF(e) ((e) == eelRF || (e) == eelGRF || (e) == eelRF_NEC_UNSUPPORTED || (e) == eelRF_ZERO )
-
-#define EEL_PME(e) ((e) == eelPME || (e) == eelPMESWITCH || (e) == eelPMEUSER || (e) == eelPMEUSERSWITCH || (e) == eelP3M_AD)
-#define EEL_PME_EWALD(e) (EEL_PME(e) || (e) == eelEWALD)
-#define EEL_FULL(e) (EEL_PME_EWALD(e) || (e) == eelPOISSON)
-
-#define EEL_USER(e) ((e) == eelUSER || (e) == eelPMEUSER || (e) == (eelPMEUSERSWITCH))
-
-enum {
- evdwCUT, evdwSWITCH, evdwSHIFT, evdwUSER, evdwENCADSHIFT,
- evdwPME, evdwNR
-};
-
-enum {
- eljpmeGEOM, eljpmeLB, eljpmeNR
-};
-
-#define EVDW_PME(e) ((e) == evdwPME)
-
-enum {
- ensGRID, ensSIMPLE, ensNR
-};
-
-/* eiVV is normal velocity verlet -- eiVVAK uses 1/2*(KE(t-dt/2)+KE(t+dt/2)) as the kinetic energy, and the half step kinetic
- energy for temperature control */
-
-enum {
- eiMD, eiSteep, eiCG, eiBD, eiSD2, eiNM, eiLBFGS, eiTPI, eiTPIC, eiSD1, eiVV, eiVVAK, eiNR
-};
-#define EI_VV(e) ((e) == eiVV || (e) == eiVVAK)
-#define EI_MD(e) ((e) == eiMD || EI_VV(e))
-#define EI_SD(e) ((e) == eiSD1 || (e) == eiSD2)
-#define EI_RANDOM(e) (EI_SD(e) || (e) == eiBD)
-/*above integrators may not conserve momenta*/
-#define EI_DYNAMICS(e) (EI_MD(e) || EI_RANDOM(e))
-#define EI_ENERGY_MINIMIZATION(e) ((e) == eiSteep || (e) == eiCG || (e) == eiLBFGS)
-#define EI_TPI(e) ((e) == eiTPI || (e) == eiTPIC)
-
-#define EI_STATE_VELOCITY(e) (EI_MD(e) || EI_SD(e))
-
-enum {
- econtLINCS, econtSHAKE, econtNR
-};
-
-enum {
- edrNone, edrSimple, edrEnsemble, edrNR
-};
-
-enum {
- edrwConservative, edrwEqual, edrwNR
-};
-
-/* Combination rule things */
-enum {
- eCOMB_NONE, eCOMB_GEOMETRIC, eCOMB_ARITHMETIC, eCOMB_GEOM_SIG_EPS, eCOMB_NR
-};
-
-/* NBF selection */
-enum {
- eNBF_NONE, eNBF_LJ, eNBF_BHAM, eNBF_NR
-};
-
-/* simulated tempering methods */
-enum {
- esimtempGEOMETRIC, esimtempEXPONENTIAL, esimtempLINEAR, esimtempNR
-};
-/* FEP selection */
-enum {
- efepNO, efepYES, efepSTATIC, efepSLOWGROWTH, efepEXPANDED, efepNR
-};
-/* if efepNO, there are no evaluations at other states.
- if efepYES, treated equivalently to efepSTATIC.
- if efepSTATIC, then lambdas do not change during the simulation.
- if efepSLOWGROWTH, then the states change monotonically throughout the simulation.
- if efepEXPANDED, then expanded ensemble simulations are occuring.
- */
-
-/* FEP coupling types */
-enum {
- efptFEP, efptMASS, efptCOUL, efptVDW, efptBONDED, efptRESTRAINT, efptTEMPERATURE, efptNR
-};
-
-/* Printing the energy to the free energy dhdl file. YES is an alias to TOTAL, and
- * will be converted in readir, so we never have to account for it in code.
- */
-enum {
- edHdLPrintEnergyNO, edHdLPrintEnergyTOTAL, edHdLPrintEnergyPOTENTIAL, edHdLPrintEnergyYES, edHdLPrintEnergyNR
-};
-
-/* How the lambda weights are calculated:
- elamstatsMETROPOLIS = using the metropolis criteria
- elamstatsBARKER = using the Barker critera for transition weights - also called unoptimized Bennett
- elamstatsMINVAR = using Barker + minimum variance for weights
- elamstatsWL = Wang-Landu (using visitation counts)
- elamstatsWWL = Weighted Wang-Landau (using optimized gibbs weighted visitation counts)
- */
-enum {
- elamstatsNO, elamstatsMETROPOLIS, elamstatsBARKER, elamstatsMINVAR, elamstatsWL, elamstatsWWL, elamstatsNR
-};
-
-#define ELAMSTATS_EXPANDED(e) ((e) > elamstatsNO)
-
-#define EWL(e) ((e) == elamstatsWL || (e) == elamstatsWWL)
-
-/* How moves in lambda are calculated:
- elmovemcMETROPOLIS - using the Metropolis criteria, and 50% up and down
- elmovemcBARKER - using the Barker criteria, and 50% up and down
- elmovemcGIBBS - computing the transition using the marginalized probabilities of the lambdas
- elmovemcMETGIBBS - computing the transition using the metropolized version of Gibbs (Monte Carlo Strategies in Scientific computing, Liu, p. 134)
- */
-enum {
- elmcmoveNO, elmcmoveMETROPOLIS, elmcmoveBARKER, elmcmoveGIBBS, elmcmoveMETGIBBS, elmcmoveNR
-};
-
-/* how we decide whether weights have reached equilibrium
- elmceqNO - never stop, weights keep going
- elmceqYES - fix the weights from the beginning; no movement
- elmceqWLDELTA - stop when the WL-delta falls below a certain level
- elmceqNUMATLAM - stop when we have a certain number of samples at every step
- elmceqSTEPS - stop when we've run a certain total number of steps
- elmceqSAMPLES - stop when we've run a certain total number of samples
- elmceqRATIO - stop when the ratio of samples (lowest to highest) is sufficiently large
- */
-enum {
- elmceqNO, elmceqYES, elmceqWLDELTA, elmceqNUMATLAM, elmceqSTEPS, elmceqSAMPLES, elmceqRATIO, elmceqNR
-};
-
-/* separate_dhdl_file selection */
-enum
-{
- /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
- esepdhdlfileYES, esepdhdlfileNO, esepdhdlfileNR
-};
-
-/* dhdl_derivatives selection */
-enum
-{
- /* NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool */
- edhdlderivativesYES, edhdlderivativesNO, edhdlderivativesNR
-};
-
-/* Solvent model */
-enum {
- esolNO, esolSPC, esolTIP4P, esolNR
-};
-
-/* Dispersion correction */
-enum {
- edispcNO, edispcEnerPres, edispcEner, edispcAllEnerPres, edispcAllEner, edispcNR
-};
-
-/* Center of mass motion selection */
-enum {
- ecmLINEAR, ecmANGULAR, ecmNO, ecmNR
-};
-
-/* New version of simulated annealing */
-enum {
- eannNO, eannSINGLE, eannPERIODIC, eannNR
-};
-
-/* Implicit solvent algorithms */
-enum {
- eisNO, eisGBSA, eisNR
-};
-
-/* Algorithms for calculating GB radii */
-enum {
- egbSTILL, egbHCT, egbOBC, egbNR
-};
-
-enum {
- esaAPPROX, esaNO, esaSTILL, esaNR
-};
-
-/* Wall types */
-enum {
- ewt93, ewt104, ewtTABLE, ewt126, ewtNR
-};
-
-/* Pull stuff */
-enum {
- epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullFLATBOTTOM, epullNR
-};
-
-enum {
- epullgDIST, epullgDIR, epullgCYL, epullgDIRPBC, epullgDIRRELATIVE, epullgNR
-};
-
-/* Enforced rotation groups */
-enum {
- erotgISO, erotgISOPF,
- erotgPM, erotgPMPF,
- erotgRM, erotgRMPF,
- erotgRM2, erotgRM2PF,
- erotgFLEX, erotgFLEXT,
- erotgFLEX2, erotgFLEX2T,
- erotgNR
-};
-
-enum {
- erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
-};
-
-/* Direction along which ion/water swaps happen in "Computational
- * Electrophysiology" (CompEL) setups */
-enum eSwaptype {
- eswapNO, eswapX, eswapY, eswapZ, eSwapTypesNR
-};
-
-/* These are just the fixed groups we need for any setup. In t_swap's grp
- * entry after that follows the variable number of swap groups.
- */
-enum {
- eGrpSplit0, eGrpSplit1, eGrpSolvent, eSwapFixedGrpNR
-};
-
-
-/* QMMM */
-enum {
- eQMmethodAM1, eQMmethodPM3, eQMmethodRHF,
- eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
- eQMmethodDIRECT, eQMmethodNR
-};
-
-enum {
- eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G,
- eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
- eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp,
- eQMbasis6311G, eQMbasisNR
-};
-
-enum {
- eQMMMschemenormal, eQMMMschemeoniom, eQMMMschemeNR
-};
-
-enum {
- eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
-};
-
-/* flat-bottom posres geometries */
-enum {
- efbposresZERO, efbposresSPHERE, efbposresCYLINDER, efbposresX, efbposresY, efbposresZ,
- efbposresCYLINDERX, efbposresCYLINDERY, efbposresCYLINDERZ, efbposresNR
-};
-
-
-/* The interactions contained in a (possibly merged) table
- * for computing electrostatic, VDW repulsion and/or VDW dispersion
- * contributions.
- */
-enum gmx_table_interaction
-{
- GMX_TABLE_INTERACTION_ELEC,
- GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
- GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
- GMX_TABLE_INTERACTION_VDWDISP,
- GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
- GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
- GMX_TABLE_INTERACTION_ELEC_VDWDISP,
- GMX_TABLE_INTERACTION_NR
-};
-
-/* Different formats for table data. Cubic spline tables are typically stored
- * with the four Y,F,G,H intermediate values (check tables.c for format), which
- * makes it easy to load with a single 4-way SIMD instruction too.
- * Linear tables only need one value per table point, or two if both V and F
- * are calculated. However, with SIMD instructions this makes the loads unaligned,
- * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
- * which again makes it possible to load as a single instruction.
- */
-enum gmx_table_format
-{
- GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
- GMX_TABLE_FORMAT_LINEAR_VF,
- GMX_TABLE_FORMAT_LINEAR_V,
- GMX_TABLE_FORMAT_LINEAR_F,
- GMX_TABLE_FORMAT_LINEAR_FDV0,
- GMX_TABLE_FORMAT_NR
-};
-
-/* Neighborlist geometry type.
- * Kernels will compute interactions between two particles,
- * 3-center water, 4-center water or coarse-grained beads.
- */
-enum gmx_nblist_kernel_geometry
-{
- GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
- GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
- GMX_NBLIST_GEOMETRY_WATER3_WATER3,
- GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
- GMX_NBLIST_GEOMETRY_WATER4_WATER4,
- GMX_NBLIST_GEOMETRY_CG_CG,
- GMX_NBLIST_GEOMETRY_NR
-};
-
-/* Types of electrostatics calculations available inside nonbonded kernels.
- * Note that these do NOT necessarily correspond to the user selections in the MDP file;
- * many interactions for instance map to tabulated kernels.
- */
-enum gmx_nbkernel_elec
-{
- GMX_NBKERNEL_ELEC_NONE,
- GMX_NBKERNEL_ELEC_COULOMB,
- GMX_NBKERNEL_ELEC_REACTIONFIELD,
- GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
- GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
- GMX_NBKERNEL_ELEC_EWALD,
- GMX_NBKERNEL_ELEC_NR
-};
-
-/* Types of vdw calculations available inside nonbonded kernels.
- * Note that these do NOT necessarily correspond to the user selections in the MDP file;
- * many interactions for instance map to tabulated kernels.
- */
-enum gmx_nbkernel_vdw
-{
- GMX_NBKERNEL_VDW_NONE,
- GMX_NBKERNEL_VDW_LENNARDJONES,
- GMX_NBKERNEL_VDW_BUCKINGHAM,
- GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
- GMX_NBKERNEL_VDW_LJEWALD,
- GMX_NBKERNEL_VDW_NR
-};
-/* Types of interactions inside the neighborlist
- */
-enum gmx_nblist_interaction_type
-{
- GMX_NBLIST_INTERACTION_STANDARD,
- GMX_NBLIST_INTERACTION_FREE_ENERGY,
- GMX_NBLIST_INTERACTION_NR
-};
-
-#endif /* ENUMS_H_ */
#ifndef GMX_LEGACYHEADERS_TYPES_FORCEREC_H
#define GMX_LEGACYHEADERS_TYPES_FORCEREC_H
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/genborn.h"
#include "gromacs/legacyheaders/types/hw_info.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/legacyheaders/types/ns.h"
#include "gromacs/legacyheaders/types/qmmmrec.h"
#include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/inputrec.h"
#include "gromacs/topology/idef.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
struct bonded_threading_t;
struct t_nblist;
+/* The interactions contained in a (possibly merged) table
+ * for computing electrostatic, VDW repulsion and/or VDW dispersion
+ * contributions.
+ */
+enum gmx_table_interaction
+{
+ GMX_TABLE_INTERACTION_ELEC,
+ GMX_TABLE_INTERACTION_VDWREP_VDWDISP,
+ GMX_TABLE_INTERACTION_VDWEXPREP_VDWDISP,
+ GMX_TABLE_INTERACTION_VDWDISP,
+ GMX_TABLE_INTERACTION_ELEC_VDWREP_VDWDISP,
+ GMX_TABLE_INTERACTION_ELEC_VDWEXPREP_VDWDISP,
+ GMX_TABLE_INTERACTION_ELEC_VDWDISP,
+ GMX_TABLE_INTERACTION_NR
+};
+
+/* Different formats for table data. Cubic spline tables are typically stored
+ * with the four Y,F,G,H intermediate values (check tables.c for format), which
+ * makes it easy to load with a single 4-way SIMD instruction too.
+ * Linear tables only need one value per table point, or two if both V and F
+ * are calculated. However, with SIMD instructions this makes the loads unaligned,
+ * and in that case we store the data as F, D=F(i+1)-F(i), V, and then a blank value,
+ * which again makes it possible to load as a single instruction.
+ */
+enum gmx_table_format
+{
+ GMX_TABLE_FORMAT_CUBICSPLINE_YFGH,
+ GMX_TABLE_FORMAT_LINEAR_VF,
+ GMX_TABLE_FORMAT_LINEAR_V,
+ GMX_TABLE_FORMAT_LINEAR_F,
+ GMX_TABLE_FORMAT_LINEAR_FDV0,
+ GMX_TABLE_FORMAT_NR
+};
+
+
/* Structure describing the data in a single table */
typedef struct
{
egCOULSR, egLJSR, egBHAMSR, egCOULLR, egLJLR, egBHAMLR,
egCOUL14, egLJ14, egGB, egNR
};
+extern const char *egrp_nm[egNR+1];
typedef struct gmx_grppairener_t {
int nener; /* The number of energy group pairs */
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/idef.h"
#include "gromacs/gmxlib/main.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/topology/symtab.h"
#include "gromacs/topology/topology.h"
#include "gromacs/mdlib/nbnxn_simd.h"
#include "gromacs/mdlib/nbnxn_util.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pbcutil/pbc-simd.h"
#include "gromacs/simd/simd.h"
#include <stdlib.h>
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/topology.h"
static int div_nsteps(int nsteps, int nst)
#include "gromacs/gmxlib/gmx_omp_nthreads.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/splitter.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/topology/block.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/gmx_omp_nthreads.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/units.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdtypes/energy.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/boxutilities.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/random.h"
if (ir->eI == eiVV)
{
- if (IR_NPT_TROTTER(ir))
+ if (inputrecNptTrotter(ir))
{
/* This is the complicated version - there are 4 possible calls, depending on ordering.
We start with the initial one. */
/* trotter_seq[4] is etrtNHC for second 1/2 step velocities - leave zero */
}
- else if (IR_NVT_TROTTER(ir))
+ else if (inputrecNvtTrotter(ir))
{
/* This is the easy version - there are only two calls, both the same.
Otherwise, even easier -- no calls */
trotter_seq[2][0] = etrtNHC;
trotter_seq[3][0] = etrtNHC;
}
- else if (IR_NPH_TROTTER(ir))
+ else if (inputrecNphTrotter(ir))
{
/* This is the complicated version - there are 4 possible calls, depending on ordering.
We start with the initial one. */
}
else if (ir->eI == eiVVAK)
{
- if (IR_NPT_TROTTER(ir))
+ if (inputrecNptTrotter(ir))
{
/* This is the complicated version - there are 4 possible calls, depending on ordering.
We start with the initial one. */
/* The second half trotter update */
trotter_seq[4][0] = etrtNHC;
}
- else if (IR_NVT_TROTTER(ir))
+ else if (inputrecNvtTrotter(ir))
{
/* This is the easy version - there is only one call, both the same.
Otherwise, even easier -- no calls */
trotter_seq[1][0] = etrtNHC;
trotter_seq[4][0] = etrtNHC;
}
- else if (IR_NPH_TROTTER(ir))
+ else if (inputrecNphTrotter(ir))
{
/* This is the complicated version - there are 4 possible calls, depending on ordering.
We start with the initial one. */
}
}
- if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir))
+ if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir))
{
/* add the energy from the barostat thermostat chain */
for (i = 0; i < state->nnhpres; i++)
if (nd > 0.0)
{
- if (IR_NVT_TROTTER(ir))
+ if (inputrecNvtTrotter(ir))
{
/* contribution from the thermal momenta of the NH chain */
for (j = 0; j < nh; j++)
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calcmu.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/update.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/random/random.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/fatalerror.h"
}
}
- if (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir) || IR_NVT_TROTTER(ir))
+ if (inputrecNptTrotter(ir) || inputrecNphTrotter(ir) || inputrecNvtTrotter(ir))
{
/* we need to recalculate the masses if the temperature has changed */
init_npt_masses(ir, state, MassQ, FALSE);
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/listed-forces/listed-forces.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "nbnxn_gpu_jit_support.h"
+const char *egrp_nm[egNR+1] = {
+ "Coul-SR", "LJ-SR", "Buck-SR", "Coul-LR", "LJ-LR", "Buck-LR",
+ "Coul-14", "LJ-14", NULL
+};
+
t_forcerec *mk_forcerec(void)
{
t_forcerec *fr;
fr->bF_NoVirSum = (EEL_FULL(fr->eeltype) || EVDW_PME(fr->vdwtype) ||
gmx_mtop_ftype_count(mtop, F_POSRES) > 0 ||
gmx_mtop_ftype_count(mtop, F_FBPOSRES) > 0 ||
- IR_ELEC_FIELD(*ir)
+ inputrecElecField(ir)
);
if (fr->cutoff_scheme == ecutsGROUP &&
#include "gromacs/fileio/pdbio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/genborn_allvsall.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/genborn.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/vcm.h"
#include "gromacs/mdtypes/df_history.h"
#include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
if (bTemp)
{
/* Sum the kinetic energies of the groups & calc temp */
- /* compute full step kinetic energies if vv, or if vv-avek and we are computing the pressure with IR_NPT_TROTTER */
+ /* compute full step kinetic energies if vv, or if vv-avek and we are computing the pressure with inputrecNptTrotter */
/* three maincase: VV with AveVel (md-vv), vv with AveEkin (md-vv-avek), leap with AveEkin (md).
Leap with AveVel is not supported; it's not clear that it will actually work.
bEkinAveVel: If TRUE, we simply multiply ekin by ekinscale to get a full step kinetic energy.
t_inputrec *ir, gmx_mtop_t *mtop)
{
/* Check required for old tpx files */
- if (IR_TWINRANGE(*ir) && ir->nstlist > 1 &&
+ if (inputrecTwinRange(ir) && ir->nstlist > 1 &&
ir->nstcalcenergy % ir->nstlist != 0)
{
md_print_warn(cr, fplog, "Old tpr file with twin-range settings: modifying energy calculation and/or T/P-coupling frequencies\n");
}
}
- if (EI_VV(ir->eI) && IR_TWINRANGE(*ir) && ir->nstlist > 1)
+ if (EI_VV(ir->eI) && inputrecTwinRange(ir) && ir->nstlist > 1)
{
gmx_fatal(FARGS, "Twin-range multiple time stepping does not work with integrator %s.", ei_names[ir->eI]);
}
if (ir->ePBC != epbcNONE)
{
state->flags |= (1<<estBOX);
- if (PRESERVE_SHAPE(*ir))
+ if (inputrecPreserveShape(ir))
{
state->flags |= (1<<estBOX_REL);
}
}
if (ir->epc != epcNO)
{
- if (IR_NPT_TROTTER(ir) || (IR_NPH_TROTTER(ir)))
+ if (inputrecNptTrotter(ir) || (inputrecNphTrotter(ir)))
{
state->nnhpres = 1;
state->flags |= (1<<estNHPRES_XI);
#include "gromacs/gmxlib/gmx_omp_nthreads.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/units.h"
#include "gromacs/mdlib/mdebin_bar.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/topology/mtop_util.h"
md->bDiagPres = !TRICLINIC(ir->ref_p);
md->ref_p = (ir->ref_p[XX][XX]+ir->ref_p[YY][YY]+ir->ref_p[ZZ][ZZ])/DIM;
md->bTricl = TRICLINIC(ir->compress) || TRICLINIC(ir->deform);
- md->bDynBox = DYNAMIC_BOX(*ir);
+ md->bDynBox = inputrecDynamicBox(ir);
md->etc = ir->etc;
- md->bNHC_trotter = IR_NVT_TROTTER(ir);
+ md->bNHC_trotter = inputrecNvtTrotter(ir);
md->bPrintNHChains = ir->bPrintNHChains;
- md->bMTTK = (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir));
- md->bMu = NEED_MUTOT(*ir);
+ md->bMTTK = (inputrecNptTrotter(ir) || inputrecNphTrotter(ir));
+ md->bMu = inputrecNeedMutot(ir);
md->ebin = mk_ebin();
/* Pass NULL for unit to let get_ebin_space determine the units
#include "gromacs/fileio/enxio.h"
#include "gromacs/mdlib/mdebin.h"
#include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/trajectory_writing.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/linearalgebra/sparsematrix.h"
#include "gromacs/listed-forces/manage-threading.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdlib/vsite.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/gmxlib/cuda_tools/cudautils.cuh"
#include "gromacs/gmxlib/cuda_tools/pmalloc_cuda.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/force_flags.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/timing/gpu_timing.h"
#include "gromacs/utility/basedefinitions.h"
#include "config.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
#ifdef {0}
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "config.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
#ifdef GMX_NBNXN_SIMD_2XNN
#include "config.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_simd.h"
+#include "gromacs/mdtypes/md_enums.h"
#ifdef GMX_NBNXN_SIMD_4XN
#include "gromacs/gmxlib/gmx_detect_hardware.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/gmxlib/ocl_tools/oclutils.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/force_flags.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/nbnxn_gpu.h"
#include "gromacs/mdlib/nbnxn_gpu_data_mgmt.h"
#include "gromacs/mdlib/nbnxn_gpu_jit_support.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/timing/gpu_timing.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/gmxlib/gpu_utils/ocl_compiler.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_gpu.h"
#include "gromacs/mdlib/nbnxn_gpu_jit_support.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/mdlib/nbnxn_simd.h"
#include "gromacs/mdlib/nbnxn_util.h"
#include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/nsgrid.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_search.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
#include "gromacs/mdlib/qmmm.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <cmath>
#include "gromacs/fileio/copyrite.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
real RF_excl_correction(const t_forcerec *fr, t_graph *g,
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/smalloc.h"
typedef struct gmx_shakedata
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/chargegroup.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
#include "gromacs/gmxlib/nonbonded/nonbonded.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/listed-forces/bonded.h"
#include "gromacs/math/units.h"
#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_ref.h"
#include "gromacs/mdlib/nbnxn_kernels/simd_2xnn/nbnxn_kernel_simd_2xnn.h"
#include "gromacs/mdlib/nbnxn_kernels/simd_4xn/nbnxn_kernel_simd_4xn.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
{
update_forcerec(fr, box);
- if (NEED_MUTOT(*inputrec))
+ if (inputrecNeedMutot(inputrec))
{
/* Calculate total (local) dipole moment in a temporary common array.
* This makes it possible to sum them over nodes faster.
dd_move_x(cr->dd, box, x);
/* When we don't need the total dipole we sum it in global_stat */
- if (bStateChanged && NEED_MUTOT(*inputrec))
+ if (bStateChanged && inputrecNeedMutot(inputrec))
{
gmx_sumd(2*DIM, mu, cr);
}
cycles_force += wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
}
- if (bStateChanged && NEED_MUTOT(*inputrec))
+ if (bStateChanged && inputrecNeedMutot(inputrec))
{
if (PAR(cr))
{
if (bDoForces)
{
- if (IR_ELEC_FIELD(*inputrec))
+ if (inputrecElecField(inputrec))
{
/* Compute forces due to electric field */
calc_f_el(MASTER(cr) ? field : NULL,
{
update_forcerec(fr, box);
- if (NEED_MUTOT(*inputrec))
+ if (inputrecNeedMutot(inputrec))
{
/* Calculate total (local) dipole moment in a temporary common array.
* This makes it possible to sum them over nodes faster.
wallcycle_stop(wcycle, ewcMOVEX);
}
- if (NEED_MUTOT(*inputrec))
+ if (inputrecNeedMutot(inputrec))
{
-
if (bStateChanged)
{
if (PAR(cr))
if (bDoForces)
{
- if (IR_ELEC_FIELD(*inputrec))
+ if (inputrecElecField(inputrec))
{
/* Compute forces due to electric field */
calc_f_el(MASTER(cr) ? field : NULL,
#include "gromacs/fileio/txtdump.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/utilities.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdlib/vcm.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
irmsd = add_binr(rb, inputrec->eI == eiSD2 ? 3 : 2, rmsd_data);
}
}
- if (!NEED_MUTOT(*inputrec))
+ if (!inputrecNeedMutot(inputrec))
{
imu = add_binr(rb, DIM, mu_tot);
where();
{
extract_binr(rb, irmsd, inputrec->eI == eiSD2 ? 3 : 2, rmsd_data);
}
- if (!NEED_MUTOT(*inputrec))
+ if (!inputrecNeedMutot(inputrec))
{
extract_binr(rb, imu, DIM, mu_tot);
}
#include "gromacs/gmxlib/conformation-utilities.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/units.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdlib/vsite.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/random.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/nrnb.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/units.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/boxutilities.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
/* if using vv with trotter decomposition methods, we do this elsewhere in the code */
if (inputrec->etc != etcNO &&
- !(IR_NVT_TROTTER(inputrec) || IR_NPT_TROTTER(inputrec) || IR_NPH_TROTTER(inputrec)))
+ !(inputrecNvtTrotter(inputrec) || inputrecNptTrotter(inputrec) || inputrecNphTrotter(inputrec)))
{
/* We should only couple after a step where energies were determined (for leapfrog versions)
or the step energies are determined, for velocity verlet versions */
int i;
/* if using Trotter pressure, we do this in coupling.c, so we leave it false. */
- if (inputrec->epc != epcNO && (!(IR_NPT_TROTTER(inputrec) || IR_NPH_TROTTER(inputrec))))
+ if (inputrec->epc != epcNO && (!(inputrecNptTrotter(inputrec) || inputrecNphTrotter(inputrec))))
{
/* We should only couple after a step where energies were determined */
bPCouple = (inputrec->nstpcouple == 1 ||
break;
}
- if (DEFORM(*inputrec))
+ if (inputrecDeform(inputrec))
{
deform(upd, start, homenr, state->x, state->box, inputrec, step);
}
#include "gromacs/fileio/txtdump.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/topology/topology.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/gmxlib/nrnb.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/ns.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
energy.h
inputrec.h
mdatom.h
+ md_enums.h
state.h
)
#include <algorithm>
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
sfree(ir->pull);
}
}
+
+gmx_bool inputrecDeform(const t_inputrec *ir)
+{
+ return (ir->deform[XX][XX] != 0 || ir->deform[YY][YY] != 0 || ir->deform[ZZ][ZZ] != 0 ||
+ ir->deform[YY][XX] != 0 || ir->deform[ZZ][XX] != 0 || ir->deform[ZZ][YY] != 0);
+}
+
+gmx_bool inputrecDynamicBox(const t_inputrec *ir)
+{
+ return (ir->epc != epcNO || ir->eI == eiTPI || inputrecDeform(ir));
+}
+
+gmx_bool inputrecPreserveShape(const t_inputrec *ir)
+{
+ return (ir->epc != epcNO && ir->deform[XX][XX] == 0 &&
+ (ir->epct == epctISOTROPIC || ir->epct == epctSEMIISOTROPIC));
+}
+
+gmx_bool inputrecNeedMutot(const t_inputrec *ir)
+{
+ return ((ir->coulombtype == eelEWALD || EEL_PME(ir->coulombtype)) &&
+ (ir->ewald_geometry == eewg3DC || ir->epsilon_surface != 0));
+}
+
+gmx_bool inputrecTwinRange(const t_inputrec *ir)
+{
+ return (ir->rlist > 0 && (ir->rlistlong == 0 || ir->rlistlong > ir->rlist));
+}
+
+gmx_bool inputrecElecField(const t_inputrec *ir)
+{
+ return (ir->ex[XX].n > 0 || ir->ex[YY].n > 0 || ir->ex[ZZ].n > 0);
+}
+
+gmx_bool inputrecExclForces(const t_inputrec *ir)
+{
+ return (EEL_FULL(ir->coulombtype) || (EEL_RF(ir->coulombtype)) ||
+ ir->implicit_solvent != eisNO);
+}
+
+gmx_bool inputrecNptTrotter(const t_inputrec *ir)
+{
+ return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+ (ir->epc == epcMTTK) && (ir->etc == etcNOSEHOOVER) );
+}
+
+gmx_bool inputrecNvtTrotter(const t_inputrec *ir)
+{
+ return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+ (ir->epc != epcMTTK) && (ir->etc == etcNOSEHOOVER) );
+}
+
+gmx_bool inputrecNphTrotter(const t_inputrec *ir)
+{
+ return ( ( (ir->eI == eiVV) || (ir->eI == eiVVAK) ) &&
+ (ir->epc == epcMTTK) && (ir->etc != etcNOSEHOOVER) );
+}
#ifndef GMX_MDTYPES_INPUTREC_H
#define GMX_MDTYPES_INPUTREC_H
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
-#ifdef __cplusplus
-extern "C" {
-#endif
-
typedef struct {
//! Number of terms
int n;
gmx_bool bAdress;
} t_inputrec;
-#define DEFORM(ir) ((ir).deform[XX][XX] != 0 || (ir).deform[YY][YY] != 0 || (ir).deform[ZZ][ZZ] != 0 || (ir).deform[YY][XX] != 0 || (ir).deform[ZZ][XX] != 0 || (ir).deform[ZZ][YY] != 0)
-
-#define DYNAMIC_BOX(ir) ((ir).epc != epcNO || (ir).eI == eiTPI || DEFORM(ir))
-
-#define PRESERVE_SHAPE(ir) ((ir).epc != epcNO && (ir).deform[XX][XX] == 0 && ((ir).epct == epctISOTROPIC || (ir).epct == epctSEMIISOTROPIC))
-
-#define NEED_MUTOT(ir) (((ir).coulombtype == eelEWALD || EEL_PME((ir).coulombtype)) && ((ir).ewald_geometry == eewg3DC || (ir).epsilon_surface != 0))
-
-#define IR_TWINRANGE(ir) ((ir).rlist > 0 && ((ir).rlistlong == 0 || (ir).rlistlong > (ir).rlist))
-
-#define IR_ELEC_FIELD(ir) ((ir).ex[XX].n > 0 || (ir).ex[YY].n > 0 || (ir).ex[ZZ].n > 0)
-
-#define IR_EXCL_FORCES(ir) (EEL_FULL((ir).coulombtype) || EEL_RF((ir).coulombtype) || (ir).implicit_solvent != eisNO)
-/* use pointer definitions of ir here, since that's what's usually used in the code */
-#define IR_NPT_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && (((ir)->epc == epcMTTK) && ((ir)->etc == etcNOSEHOOVER)))
-
-#define IR_NVT_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && ((!((ir)->epc == epcMTTK)) && ((ir)->etc == etcNOSEHOOVER)))
-
-#define IR_NPH_TROTTER(ir) ((((ir)->eI == eiVV) || ((ir)->eI == eiVVAK)) && (((ir)->epc == epcMTTK) && (!(((ir)->etc == etcNOSEHOOVER)))))
-
int ir_optimal_nstcalcenergy(const t_inputrec *ir);
int tcouple_min_integration_steps(int etc);
*/
void done_inputrec(t_inputrec *ir);
-#ifdef __cplusplus
-}
-#endif
+gmx_bool inputrecDeform(const t_inputrec *ir);
+
+gmx_bool inputrecDynamicBox(const t_inputrec *ir);
+
+gmx_bool inputrecPreserveShape(const t_inputrec *ir);
+
+gmx_bool inputrecNeedMutot(const t_inputrec *ir);
+
+gmx_bool inputrecTwinRange(const t_inputrec *ir);
+
+gmx_bool inputrecElecField(const t_inputrec *ir);
+
+gmx_bool inputrecExclForces(const t_inputrec *ir);
+
+gmx_bool inputrecNptTrotter(const t_inputrec *ir);
+
+gmx_bool inputrecNvtTrotter(const t_inputrec *ir);
+
+gmx_bool inputrecNphTrotter(const t_inputrec *ir);
#endif /* GMX_MDTYPES_INPUTREC_H */
*/
#include "gmxpre.h"
-#include "gromacs/legacyheaders/names.h"
+#include "md_enums.h"
+const char *enum_name(int index, int max_index, const char *names[])
+{
+ if (index < 0 || index >= max_index)
+ {
+ static const char *undef = "UNDEFINED";
+ return undef;
+ }
+ else
+ {
+ return names[index];
+ }
+}
-/* note: these arrays should correspond to enums in include/types/enums.h */
-
-const char *ens_names[ensNR+1] =
+const char *bool_names[BOOL_NR+1] =
{
- "Grid", "Simple", NULL
+ "FALSE", "TRUE", nullptr
};
-const char *ei_names[eiNR+1] =
+const char *yesno_names[BOOL_NR+1] =
{
- "md", "steep", "cg", "bd", "sd2", "nm", "l-bfgs", "tpi", "tpic", "sd", "md-vv", "md-vv-avek", NULL
+ "no", "yes", nullptr
};
-const char *bool_names[BOOL_NR+1] =
+
+
+const char *ens_names[ensNR+1] =
{
- "FALSE", "TRUE", NULL
+ "Grid", "Simple", nullptr
};
-const char *yesno_names[BOOL_NR+1] =
+const char *ei_names[eiNR+1] =
{
- "no", "yes", NULL
+ "md", "steep", "cg", "bd", "sd2", "nm", "l-bfgs", "tpi", "tpic", "sd", "md-vv", "md-vv-avek", nullptr
};
-const char *ptype_str[eptNR+1] = {
- "Atom", "Nucleus", "Shell", "Bond", "VSite", NULL
+const char *ecutscheme_names[ecutsNR+1] = {
+ "Verlet", "Group", nullptr
};
-const char *ecutscheme_names[ecutsNR+1] = {
- "Verlet", "Group", NULL
+const char *erefscaling_names[erscNR+1] = {
+ "No", "All", "COM", nullptr
};
const char *eel_names[eelNR+1] = {
"PME", "Ewald", "P3M-AD", "Poisson", "Switch", "Shift", "User",
"Generalized-Born", "Reaction-Field-nec", "Encad-shift",
"PME-User", "PME-Switch", "PME-User-Switch",
- "Reaction-Field-zero", NULL
+ "Reaction-Field-zero", nullptr
};
const char *eewg_names[eewgNR+1] = {
- "3d", "3dc", NULL
+ "3d", "3dc", nullptr
};
const char *eljpme_names[eljpmeNR+1] = {
- "Geometric", "Lorentz-Berthelot", NULL
+ "Geometric", "Lorentz-Berthelot", nullptr
};
const char *evdw_names[evdwNR+1] = {
"Cut-off", "Switch", "Shift", "User", "Encad-shift",
- "PME", NULL
+ "PME", nullptr
};
const char *econstr_names[econtNR+1] = {
- "Lincs", "Shake", NULL
+ "Lincs", "Shake", nullptr
};
const char *eintmod_names[eintmodNR+1] = {
- "Potential-shift-Verlet", "Potential-shift", "None", "Potential-switch", "Exact-cutoff", "Force-switch", NULL
-};
-
-const char *egrp_nm[egNR+1] = {
- "Coul-SR", "LJ-SR", "Buck-SR", "Coul-LR", "LJ-LR", "Buck-LR",
- "Coul-14", "LJ-14", NULL
+ "Potential-shift-Verlet", "Potential-shift", "None", "Potential-switch", "Exact-cutoff", "Force-switch", nullptr
};
const char *etcoupl_names[etcNR+1] = {
- "No", "Berendsen", "Nose-Hoover", "yes", "Andersen", "Andersen-massive", "V-rescale", NULL
+ "No", "Berendsen", "Nose-Hoover", "yes", "Andersen", "Andersen-massive", "V-rescale", nullptr
}; /* yes is alias for berendsen */
const char *epcoupl_names[epcNR+1] = {
- "No", "Berendsen", "Parrinello-Rahman", "Isotropic", "MTTK", NULL
+ "No", "Berendsen", "Parrinello-Rahman", "Isotropic", "MTTK", nullptr
}; /* isotropic is alias for berendsen */
const char *epcoupltype_names[epctNR+1] = {
- "Isotropic", "Semiisotropic", "Anisotropic", "Surface-Tension", NULL
-};
-
-const char *erefscaling_names[erscNR+1] = {
- "No", "All", "COM", NULL
+ "Isotropic", "Semiisotropic", "Anisotropic", "Surface-Tension", nullptr
};
const char *edisre_names[edrNR+1] = {
- "No", "Simple", "Ensemble", NULL
+ "No", "Simple", "Ensemble", nullptr
};
const char *edisreweighting_names[edrwNR+1] = {
- "Conservative", "Equal", NULL
+ "Conservative", "Equal", nullptr
};
const char *enbf_names[eNBF_NR+1] = {
- "", "LJ", "Buckingham", NULL
+ "", "LJ", "Buckingham", nullptr
};
const char *ecomb_names[eCOMB_NR+1] = {
- "", "Geometric", "Arithmetic", "GeomSigEps", NULL
-};
-
-const char *gtypes[egcNR+1] = {
- "T-Coupling", "Energy Mon.", "Acceleration", "Freeze",
- "User1", "User2", "VCM", "Compressed X", "Or. Res. Fit", "QMMM", NULL
+ "", "Geometric", "Arithmetic", "GeomSigEps", nullptr
};
const char *esimtemp_names[esimtempNR+1] = {
- "geometric", "exponential", "linear", NULL
+ "geometric", "exponential", "linear", nullptr
};
const char *efep_names[efepNR+1] = {
- "no", "yes", "static", "slow-growth", "expanded", NULL
+ "no", "yes", "static", "slow-growth", "expanded", nullptr
};
const char *efpt_names[efptNR+1] = {
- "fep-lambdas", "mass-lambdas", "coul-lambdas", "vdw-lambdas", "bonded-lambdas", "restraint-lambdas", "temperature-lambdas", NULL
+ "fep-lambdas", "mass-lambdas", "coul-lambdas", "vdw-lambdas", "bonded-lambdas", "restraint-lambdas", "temperature-lambdas", nullptr
};
const char *efpt_singular_names[efptNR+1] = {
- "fep-lambda", "mass-lambda", "coul-lambda", "vdw-lambda", "bonded-lambda", "restraint-lambda", "temperature-lambda", NULL
+ "fep-lambda", "mass-lambda", "coul-lambda", "vdw-lambda", "bonded-lambda", "restraint-lambda", "temperature-lambda", nullptr
};
const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1] = {
- "no", "total", "potential", "yes", NULL
+ "no", "total", "potential", "yes", nullptr
};
const char *elamstats_names[elamstatsNR+1] = {
- "no", "metropolis-transition", "barker-transition", "minvar", "wang-landau", "weighted-wang-landau", NULL
+ "no", "metropolis-transition", "barker-transition", "minvar", "wang-landau", "weighted-wang-landau", nullptr
};
const char *elmcmove_names[elmcmoveNR+1] = {
- "no", "metropolis", "barker", "gibbs", "metropolized-gibbs", NULL
+ "no", "metropolis", "barker", "gibbs", "metropolized-gibbs", nullptr
};
const char *elmceq_names[elmceqNR+1] = {
- "no", "yes", "wl-delta", "number-all-lambda", "number-steps", "number-samples", "count-ratio", NULL
+ "no", "yes", "wl-delta", "number-all-lambda", "number-steps", "number-samples", "count-ratio", nullptr
};
const char *separate_dhdl_file_names[esepdhdlfileNR+1] = {
- "yes", "no", NULL
+ "yes", "no", nullptr
};
const char *dhdl_derivatives_names[edhdlderivativesNR+1] = {
- "yes", "no", NULL
+ "yes", "no", nullptr
};
const char *esol_names[esolNR+1] = {
- "No", "SPC", "TIP4p", NULL
+ "No", "SPC", "TIP4p", nullptr
};
const char *edispc_names[edispcNR+1] = {
- "No", "EnerPres", "Ener", "AllEnerPres", "AllEner", NULL
+ "No", "EnerPres", "Ener", "AllEnerPres", "AllEner", nullptr
};
const char *ecm_names[ecmNR+1] = {
- "Linear", "Angular", "None", NULL
+ "Linear", "Angular", "None", nullptr
};
const char *eann_names[eannNR+1] = {
- "No", "Single", "Periodic", NULL
+ "No", "Single", "Periodic", nullptr
};
const char *eis_names[eisNR+1] = {
- "No", "GBSA", NULL
+ "No", "GBSA", nullptr
};
const char *egb_names[egbNR+1] = {
- "Still", "HCT", "OBC", NULL
+ "Still", "HCT", "OBC", nullptr
};
const char *esa_names[esaNR+1] = {
- "Ace-approximation", "None", "Still", NULL
+ "Ace-approximation", "None", "Still", nullptr
};
const char *ewt_names[ewtNR+1] = {
- "9-3", "10-4", "table", "12-6", NULL
+ "9-3", "10-4", "table", "12-6", nullptr
};
const char *epull_names[epullNR+1] = {
- "umbrella", "constraint", "constant-force", "flat-bottom", NULL
+ "umbrella", "constraint", "constant-force", "flat-bottom", nullptr
};
const char *epullg_names[epullgNR+1] = {
- "distance", "direction", "cylinder", "direction-periodic", "direction-relative", NULL
+ "distance", "direction", "cylinder", "direction-periodic", "direction-relative", nullptr
};
const char *erotg_names[erotgNR+1] = {
- "iso", "iso-pf", "pm", "pm-pf", "rm", "rm-pf", "rm2", "rm2-pf", "flex", "flex-t", "flex2", "flex2-t", NULL
+ "iso", "iso-pf", "pm", "pm-pf", "rm", "rm-pf", "rm2", "rm2-pf", "flex", "flex-t", "flex2", "flex2-t", nullptr
};
const char *erotg_fitnames[erotgFitNR+1] = {
- "rmsd", "norm", "potential", NULL
+ "rmsd", "norm", "potential", nullptr
};
const char *eSwapTypes_names[eSwapTypesNR+1] = {
- "no", "X", "Y", "Z", NULL
+ "no", "X", "Y", "Z", nullptr
};
const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1] = {
- "Split0", "Split1", "Solvent", NULL
+ "Split0", "Split1", "Solvent", nullptr
};
const char *eQMmethod_names[eQMmethodNR+1] = {
"AM1", "PM3", "RHF",
"UHF", "DFT", "B3LYP", "MP2", "CASSCF", "B3LYPLAN",
- "DIRECT", NULL
+ "DIRECT", nullptr
};
const char *eQMbasis_names[eQMbasisNR+1] = {
"STO3G", "STO-3G", "3-21G",
"3-21G*", "3-21+G*", "6-21G",
"6-31G", "6-31G*", "6-31+G*",
- "6-311G", NULL
+ "6-311G", nullptr
};
const char *eQMMMscheme_names[eQMMMschemeNR+1] = {
- "normal", "ONIOM", NULL
+ "normal", "ONIOM", nullptr
};
const char *eMultentOpt_names[eMultentOptNR+1] = {
- "multiple_entries", "no", "use_last", NULL
+ "multiple_entries", "no", "use_last", nullptr
};
const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1] = {
- "Particle-Particle", "Water3-Particle", "Water3-Water3", "Water4-Particle", "Water4-Water4", "CG-CG", NULL
+ "Particle-Particle", "Water3-Particle", "Water3-Water3", "Water4-Particle", "Water4-Water4", "CG-CG", nullptr
};
const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1] = {
- "Standard", "Free_Energy", NULL
+ "Standard", "Free_Energy", nullptr
};
const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1] =
{
- "None", "Coulomb", "Reaction-Field", "Cubic-Spline-Table", "Generalized-Born", "Ewald", NULL
+ "None", "Coulomb", "Reaction-Field", "Cubic-Spline-Table", "Generalized-Born", "Ewald", nullptr
};
const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1] =
{
- "None", "Lennard-Jones", "Buckingham", "Cubic-Spline-Table", "LJEwald", NULL
+ "None", "Lennard-Jones", "Buckingham", "Cubic-Spline-Table", "LJEwald", nullptr
};
--- /dev/null
+/*
+ * This file is part of the GROMACS molecular simulation package.
+ *
+ * Copyright (c) 1991-2000, University of Groningen, The Netherlands.
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014,2015, 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * 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.
+ *
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
+ */
+/*! \file
+ * \brief
+ * Declares enumerated types used throughout the code.
+ *
+ * \author David van der Spoel <david.vanderspoel@icm.uu.se>
+ * \inpublicapi
+ * \ingroup module_mdtypes
+ */
+#ifndef GMX_MDTYPES_MD_ENUMS_H
+#define GMX_MDTYPES_MD_ENUMS_H
+
+#include "gromacs/utility/basedefinitions.h"
+
+/*! \brief Return a string from a list of strings
+ *
+ * If index if within 0 .. max_index-1 returns the corresponding string
+ * or UNDEFINED otherwise, in other words this is a range-check that does
+ * not crash.
+ * \param[in] index The index in the array
+ * \param[in] max_index The length of the array
+ * \param[in] names The array
+ * \return the correct string or UNDEFINED
+ */
+const char *enum_name(int index, int max_index, const char *names[]);
+
+//! Boolean strings no or yes
+extern const char *yesno_names[BOOL_NR+1];
+//! Boolean strings false or true
+extern const char *bool_names[BOOL_NR+1];
+//! Macro to select a bool name
+#define EBOOL(e) enum_name(e, BOOL_NR, bool_names)
+
+
+//! \brief The two compartments for CompEL setups.
+enum eCompartment {
+ eCompA, eCompB, eCompNR
+};
+
+/*! \brief The channels that define with their COM the compartment boundaries in CompEL setups.
+ *
+ * In principle one could also use modified setups with more than two channels.
+ */
+enum eChannel {
+ eChan0, eChan1, eChanNR
+};
+
+/*! \brief Temperature coupling type
+ *
+ * yes is an alias for berendsen
+ */
+enum {
+ etcNO, etcBERENDSEN, etcNOSEHOOVER, etcYES, etcANDERSEN, etcANDERSENMASSIVE, etcVRESCALE, etcNR
+};
+//! Strings corresponding to temperatyre coupling types
+extern const char *etcoupl_names[etcNR+1];
+//! Macro for selecting t coupling string
+#define ETCOUPLTYPE(e) enum_name(e, etcNR, etcoupl_names)
+//! Return whether this is andersen coupling
+#define ETC_ANDERSEN(e) (((e) == etcANDERSENMASSIVE) || ((e) == etcANDERSEN))
+
+/*! \brief Pressure coupling types
+ *
+ * isotropic is an alias for berendsen
+ */
+enum {
+ epcNO, epcBERENDSEN, epcPARRINELLORAHMAN, epcISOTROPIC, epcMTTK, epcNR
+};
+//! String corresponding to pressure coupling algorithm
+extern const char *epcoupl_names[epcNR+1];
+//! Macro to return the correct pcoupling string
+#define EPCOUPLTYPE(e) enum_name(e, epcNR, epcoupl_names)
+
+//! Flat-bottom posres geometries
+enum {
+ efbposresZERO, efbposresSPHERE, efbposresCYLINDER, efbposresX, efbposresY, efbposresZ,
+ efbposresCYLINDERX, efbposresCYLINDERY, efbposresCYLINDERZ, efbposresNR
+};
+
+//! Relative coordinate scaling type for position restraints.
+enum {
+ erscNO, erscALL, erscCOM, erscNR
+};
+//! String corresponding to relativ coordinate scaling.
+extern const char *erefscaling_names[erscNR+1];
+//! Macro to select correct coordinate scaling string.
+#define EREFSCALINGTYPE(e) enum_name(e, erscNR, erefscaling_names)
+
+//! Trotter decomposition extended variable parts.
+enum {
+ etrtNONE, etrtNHC, etrtBAROV, etrtBARONHC, etrtNHC2, etrtBAROV2, etrtBARONHC2,
+ etrtVELOCITY1, etrtVELOCITY2, etrtPOSITION, etrtSKIPALL, etrtNR
+};
+
+//! Sequenced parts of the trotter decomposition.
+enum {
+ ettTSEQ0, ettTSEQ1, ettTSEQ2, ettTSEQ3, ettTSEQ4, ettTSEQMAX
+};
+
+//! Pressure coupling type
+enum {
+ epctISOTROPIC, epctSEMIISOTROPIC, epctANISOTROPIC,
+ epctSURFACETENSION, epctNR
+};
+//! String corresponding to pressure coupling type
+extern const char *epcoupltype_names[epctNR+1];
+//! Macro to select the right string for pcoupl type
+#define EPCOUPLTYPETYPE(e) enum_name(e, epctNR, epcoupltype_names)
+
+//! \\brief Cutoff scheme
+enum {
+ ecutsVERLET, ecutsGROUP, ecutsNR
+};
+//! String corresponding to cutoff scheme
+extern const char *ecutscheme_names[ecutsNR+1];
+//! Macro to select the right string for cutoff scheme
+#define ECUTSCHEME(e) enum_name(e, ecutsNR, ecutscheme_names)
+
+/*! \brief Coulomb / VdW interaction modifiers.
+ *
+ * grompp replaces eintmodPOTSHIFT_VERLET by eintmodPOTSHIFT or eintmodNONE.
+ * Exactcutoff is only used by Reaction-field-zero, and is not user-selectable.
+ */
+enum eintmod {
+ eintmodPOTSHIFT_VERLET, eintmodPOTSHIFT, eintmodNONE, eintmodPOTSWITCH, eintmodEXACTCUTOFF, eintmodFORCESWITCH, eintmodNR
+};
+//! String corresponding to interaction modifiers
+extern const char *eintmod_names[eintmodNR+1];
+//! Macro to select the correct string for modifiers
+#define INTMODIFIER(e) enum_name(e, eintmodNR, eintmod_names)
+
+/*! \brief Cut-off treatment for Coulomb
+ *
+ * eelNOTUSED1 used to be GB, but to enable generalized born with different
+ * forms of electrostatics (RF, switch, etc.) in the future it is now selected
+ * separately (through the implicit_solvent option).
+ */
+enum {
+ eelCUT, eelRF, eelGRF, eelPME, eelEWALD, eelP3M_AD,
+ eelPOISSON, eelSWITCH, eelSHIFT, eelUSER, eelGB_NOTUSED, eelRF_NEC_UNSUPPORTED, eelENCADSHIFT,
+ eelPMEUSER, eelPMESWITCH, eelPMEUSERSWITCH, eelRF_ZERO, eelNR
+};
+//! String corresponding to Coulomb treatment
+extern const char *eel_names[eelNR+1];
+//! Macro for correct string for Coulomb treatment
+#define EELTYPE(e) enum_name(e, eelNR, eel_names)
+
+//! Ewald geometry.
+enum {
+ eewg3D, eewg3DC, eewgNR
+};
+//! String corresponding to Ewald geometry
+extern const char *eewg_names[eewgNR+1];
+
+//! Macro telling us whether we use reaction field
+#define EEL_RF(e) ((e) == eelRF || (e) == eelGRF || (e) == eelRF_NEC_UNSUPPORTED || (e) == eelRF_ZERO )
+
+//! Macro telling us whether we use PME
+#define EEL_PME(e) ((e) == eelPME || (e) == eelPMESWITCH || (e) == eelPMEUSER || (e) == eelPMEUSERSWITCH || (e) == eelP3M_AD)
+//! Macro telling us whether we use PME or full Ewald
+#define EEL_PME_EWALD(e) (EEL_PME(e) || (e) == eelEWALD)
+//! Macro telling us whether we use full electrostatics of any sort
+#define EEL_FULL(e) (EEL_PME_EWALD(e) || (e) == eelPOISSON)
+//! Macro telling us whether we use user defined electrostatics
+#define EEL_USER(e) ((e) == eelUSER || (e) == eelPMEUSER || (e) == (eelPMEUSERSWITCH))
+
+//! Van der Waals interaction treatment
+enum {
+ evdwCUT, evdwSWITCH, evdwSHIFT, evdwUSER, evdwENCADSHIFT,
+ evdwPME, evdwNR
+};
+//! String corresponding to Van der Waals treatment
+extern const char *evdw_names[evdwNR+1];
+//! Macro for selecting correct string for VdW treatment
+#define EVDWTYPE(e) enum_name(e, evdwNR, evdw_names)
+
+//! Type of long-range VdW treatment of combination rules
+enum {
+ eljpmeGEOM, eljpmeLB, eljpmeNR
+};
+//! String for LJPME combination rule treatment
+extern const char *eljpme_names[eljpmeNR+1];
+//! Macro for correct LJPME comb rule name
+#define ELJPMECOMBNAMES(e) enum_name(e, eljpmeNR, eljpme_names)
+
+//! Macro to tell us whether we use LJPME
+#define EVDW_PME(e) ((e) == evdwPME)
+
+//! Neighborsearching algorithm
+enum {
+ ensGRID, ensSIMPLE, ensNR
+};
+//! String corresponding to neighborsearching
+extern const char *ens_names[ensNR+1];
+//! Macro for correct NS algorithm
+#define ENS(e) enum_name(e, ensNR, ens_names)
+
+/*! \brief Integrator algorithm
+ *
+ * eiVV is normal velocity verlet
+ * eiVVAK uses 1/2*(KE(t-dt/2)+KE(t+dt/2)) as the kinetic energy,
+ * and the half step kinetic energy for temperature control
+ */
+enum {
+ eiMD, eiSteep, eiCG, eiBD, eiSD2, eiNM, eiLBFGS, eiTPI, eiTPIC, eiSD1, eiVV, eiVVAK, eiNR
+};
+//! Name of the integrator algorithm
+extern const char *ei_names[eiNR+1];
+//! Macro returning integrator string
+#define EI(e) enum_name(e, eiNR, ei_names)
+//! Do we use velocity Verlet
+#define EI_VV(e) ((e) == eiVV || (e) == eiVVAK)
+//! Do we use molecular dynamics
+#define EI_MD(e) ((e) == eiMD || EI_VV(e))
+//! Do we use stochastic dynamics
+#define EI_SD(e) ((e) == eiSD1 || (e) == eiSD2)
+//! Do we use any stochastic integrator
+#define EI_RANDOM(e) (EI_SD(e) || (e) == eiBD)
+/*above integrators may not conserve momenta*/
+//! Do we use any type of dynamics
+#define EI_DYNAMICS(e) (EI_MD(e) || EI_RANDOM(e))
+//! Or do we use minimization
+#define EI_ENERGY_MINIMIZATION(e) ((e) == eiSteep || (e) == eiCG || (e) == eiLBFGS)
+//! Do we apply test particle insertion
+#define EI_TPI(e) ((e) == eiTPI || (e) == eiTPIC)
+//! Do we deal with particle velocities
+#define EI_STATE_VELOCITY(e) (EI_MD(e) || EI_SD(e))
+
+//! Constraint algorithm
+enum {
+ econtLINCS, econtSHAKE, econtNR
+};
+//! String corresponding to constraint algorithm
+extern const char *econstr_names[econtNR+1];
+//! Macro to select the correct string
+#define ECONSTRTYPE(e) enum_name(e, econtNR, econstr_names)
+
+//! Distance restraint refinement algorithm
+enum {
+ edrNone, edrSimple, edrEnsemble, edrNR
+};
+//! String corresponding to distance restraint algorithm
+extern const char *edisre_names[edrNR+1];
+//! Macro to select the right disre algorithm string
+#define EDISRETYPE(e) enum_name(e, edrNR, edisre_names)
+
+//! Distance restraints weighting type
+enum {
+ edrwConservative, edrwEqual, edrwNR
+};
+//! String corresponding to distance restraint weighting
+extern const char *edisreweighting_names[edrwNR+1];
+//! Macro corresponding to dr weighting
+#define EDISREWEIGHTING(e) enum_name(e, edrwNR, edisreweighting_names)
+
+//! Combination rule algorithm.
+enum {
+ eCOMB_NONE, eCOMB_GEOMETRIC, eCOMB_ARITHMETIC, eCOMB_GEOM_SIG_EPS, eCOMB_NR
+};
+//! String for combination rule algorithm
+extern const char *ecomb_names[eCOMB_NR+1];
+//! Macro to select the comb rule string
+#define ECOMBNAME(e) enum_name(e, eCOMB_NR, ecomb_names)
+
+//! Van der Waals potential.
+enum {
+ eNBF_NONE, eNBF_LJ, eNBF_BHAM, eNBF_NR
+};
+//! String corresponding to Van der Waals potential
+extern const char *enbf_names[eNBF_NR+1];
+//! Macro for correct VdW potential string
+#define ENBFNAME(e) enum_name(e, eNBF_NR, enbf_names)
+
+//! Simulated tempering methods.
+enum {
+ esimtempGEOMETRIC, esimtempEXPONENTIAL, esimtempLINEAR, esimtempNR
+};
+//! String corresponding to simulated tempering
+extern const char *esimtemp_names[esimtempNR+1];
+//! Macro for correct tempering string
+#define ESIMTEMP(e) enum_name(e, esimtempNR, esimtemp_names)
+
+/*! \brief Free energy perturbation type
+ *
+ * efepNO, there are no evaluations at other states.
+ * efepYES, treated equivalently to efepSTATIC.
+ * efepSTATIC, then lambdas do not change during the simulation.
+ * efepSLOWGROWTH, then the states change monotonically
+ * throughout the simulation.
+ * efepEXPANDED, then expanded ensemble simulations are occuring.
+ */
+enum {
+ efepNO, efepYES, efepSTATIC, efepSLOWGROWTH, efepEXPANDED, efepNR
+};
+//! String corresponding to FEP type.
+extern const char *efep_names[efepNR+1];
+//! Macro corresponding to FEP string.
+#define EFEPTYPE(e) enum_name(e, efepNR, efep_names)
+
+//! Free energy pertubation coupling types.
+enum {
+ efptFEP, efptMASS, efptCOUL, efptVDW, efptBONDED, efptRESTRAINT, efptTEMPERATURE, efptNR
+};
+//! String for FEP coupling type
+extern const char *efpt_names[efptNR+1];
+//! Long names for FEP coupling type
+extern const char *efpt_singular_names[efptNR+1];
+
+/*! \brief What to print for free energy calculations
+ *
+ * Printing the energy to the free energy dhdl file.
+ * YES is an alias to TOTAL, and
+ * will be converted in readir, so we never have to account for it in code.
+ */
+enum {
+ edHdLPrintEnergyNO, edHdLPrintEnergyTOTAL, edHdLPrintEnergyPOTENTIAL, edHdLPrintEnergyYES, edHdLPrintEnergyNR
+};
+//! String corresponding to printing of free energy
+extern const char *edHdLPrintEnergy_names[edHdLPrintEnergyNR+1];
+
+/*! \brief How the lambda weights are calculated
+ *
+ * elamstatsMETROPOLIS - using the metropolis criteria
+ * elamstatsBARKER - using the Barker critera for transition weights,
+ * also called unoptimized Bennett
+ * elamstatsMINVAR - using Barker + minimum variance for weights
+ * elamstatsWL - Wang-Landu (using visitation counts)
+ * elamstatsWWL - Weighted Wang-Landau (using optimized Gibbs
+ * weighted visitation counts)
+ */
+enum {
+ elamstatsNO, elamstatsMETROPOLIS, elamstatsBARKER, elamstatsMINVAR, elamstatsWL, elamstatsWWL, elamstatsNR
+};
+//! String corresponding to lambda weights
+extern const char *elamstats_names[elamstatsNR+1];
+//! Macro telling us whether we use expanded ensemble
+#define ELAMSTATS_EXPANDED(e) ((e) > elamstatsNO)
+//! Macro telling us whether we use some kind of Wang-Landau
+#define EWL(e) ((e) == elamstatsWL || (e) == elamstatsWWL)
+
+/*! \brief How moves in lambda are calculated
+ *
+ * elmovemcMETROPOLIS - using the Metropolis criteria, and 50% up and down
+ * elmovemcBARKER - using the Barker criteria, and 50% up and down
+ * elmovemcGIBBS - computing the transition using the marginalized
+ * probabilities of the lambdas
+ * elmovemcMETGIBBS - computing the transition using the metropolized
+ * version of Gibbs (Monte Carlo Strategies in
+ * Scientific computing, Liu, p. 134)
+ */
+enum {
+ elmcmoveNO, elmcmoveMETROPOLIS, elmcmoveBARKER, elmcmoveGIBBS, elmcmoveMETGIBBS, elmcmoveNR
+};
+//! String corresponding to lambda moves
+extern const char *elmcmove_names[elmcmoveNR+1];
+
+/*! \brief How we decide whether weights have reached equilibrium
+ *
+ * elmceqNO - never stop, weights keep going
+ * elmceqYES - fix the weights from the beginning; no movement
+ * elmceqWLDELTA - stop when the WL-delta falls below a certain level
+ * elmceqNUMATLAM - stop when we have a certain number of samples at
+ * every step
+ * elmceqSTEPS - stop when we've run a certain total number of steps
+ * elmceqSAMPLES - stop when we've run a certain total number of samples
+ * elmceqRATIO - stop when the ratio of samples (lowest to highest)
+ * is sufficiently large
+ */
+enum {
+ elmceqNO, elmceqYES, elmceqWLDELTA, elmceqNUMATLAM, elmceqSTEPS, elmceqSAMPLES, elmceqRATIO, elmceqNR
+};
+//! String corresponding to equilibrium algorithm
+extern const char *elmceq_names[elmceqNR+1];
+
+/*! \brief separate_dhdl_file selection
+ *
+ * NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool
+ */
+enum
+{
+ esepdhdlfileYES, esepdhdlfileNO, esepdhdlfileNR
+};
+//! String corresponding to separate DHDL file selection
+extern const char *separate_dhdl_file_names[esepdhdlfileNR+1];
+//! Monster macro for DHDL file selection
+#define SEPDHDLFILETYPE(e) enum_name(e, esepdhdlfileNR, separate_dhdl_file_names)
+
+/*! \brief dhdl_derivatives selection \
+ *
+ * NOTE: YES is the first one. Do NOT interpret this one as a gmx_bool
+ */
+enum
+{
+ edhdlderivativesYES, edhdlderivativesNO, edhdlderivativesNR
+};
+//! String for DHDL derivatives
+extern const char *dhdl_derivatives_names[edhdlderivativesNR+1];
+//! YAMM (Yet another monster macro)
+#define DHDLDERIVATIVESTYPE(e) enum_name(e, edhdlderivativesNR, dhdl_derivatives_names)
+
+/*! \brief Solvent model
+ *
+ * Distinguishes classical water types with 3 or 4 particles
+ */
+enum {
+ esolNO, esolSPC, esolTIP4P, esolNR
+};
+//! String corresponding to solvent type
+extern const char *esol_names[esolNR+1];
+//! Macro lest we print the wrong solvent model string
+#define ESOLTYPE(e) enum_name(e, esolNR, esol_names)
+
+//! Dispersion correction.
+enum {
+ edispcNO, edispcEnerPres, edispcEner, edispcAllEnerPres, edispcAllEner, edispcNR
+};
+//! String corresponding to dispersion corrections
+extern const char *edispc_names[edispcNR+1];
+//! Macro for dispcorr string
+#define EDISPCORR(e) enum_name(e, edispcNR, edispc_names)
+
+//! Center of mass motion removal algorithm.
+enum {
+ ecmLINEAR, ecmANGULAR, ecmNO, ecmNR
+};
+//! String corresponding to COM removal
+extern const char *ecm_names[ecmNR+1];
+//! Macro for COM removal string
+#define ECOM(e) enum_name(e, ecmNR, ecm_names)
+
+//! Algorithm for simulated annealing.
+enum {
+ eannNO, eannSINGLE, eannPERIODIC, eannNR
+};
+//! String for simulated annealing
+extern const char *eann_names[eannNR+1];
+//! And macro for simulated annealing string
+#define EANNEAL(e) enum_name(e, eannNR, eann_names)
+
+//! Implicit solvent algorithms.
+enum {
+ eisNO, eisGBSA, eisNR
+};
+//! String corresponding to implicit solvent.
+extern const char *eis_names[eisNR+1];
+//! Macro for implicit solvent string.
+#define EIMPLICITSOL(e) enum_name(e, eisNR, eis_names)
+
+//! Algorithms for calculating GB radii.
+enum {
+ egbSTILL, egbHCT, egbOBC, egbNR
+};
+//! String for GB algorithm name.
+extern const char *egb_names[egbNR+1];
+//! Macro for GB string.
+#define EGBALGORITHM(e) enum_name(e, egbNR, egb_names)
+
+//! Surface area algorithm for implicit solvent.
+enum {
+ esaAPPROX, esaNO, esaSTILL, esaNR
+};
+//! String corresponding to surface area algorithm.
+extern const char *esa_names[esaNR+1];
+//! brief Macro for SA algorithm string.
+#define ESAALGORITHM(e) enum_name(e, esaNR, esa_names)
+
+//! Wall types.
+enum {
+ ewt93, ewt104, ewtTABLE, ewt126, ewtNR
+};
+//! String corresponding to wall type
+extern const char *ewt_names[ewtNR+1];
+//! Macro for wall type string
+#define EWALLTYPE(e) enum_name(e, ewtNR, ewt_names)
+
+//! Pulling algorithm.
+enum {
+ epullUMBRELLA, epullCONSTRAINT, epullCONST_F, epullFLATBOTTOM, epullNR
+};
+//! String for pulling algorithm
+extern const char *epull_names[epullNR+1];
+//! Macro for pulling string
+#define EPULLTYPE(e) enum_name(e, epullNR, epull_names)
+
+//! Control of pull groups
+enum {
+ epullgDIST, epullgDIR, epullgCYL, epullgDIRPBC, epullgDIRRELATIVE, epullgNR
+};
+//! String for pull groups
+extern const char *epullg_names[epullgNR+1];
+//! Macro for pull group string
+#define EPULLGEOM(e) enum_name(e, epullgNR, epullg_names)
+
+//! Enforced rotation groups.
+enum {
+ erotgISO, erotgISOPF,
+ erotgPM, erotgPMPF,
+ erotgRM, erotgRMPF,
+ erotgRM2, erotgRM2PF,
+ erotgFLEX, erotgFLEXT,
+ erotgFLEX2, erotgFLEX2T,
+ erotgNR
+};
+//! Rotation group names
+extern const char *erotg_names[erotgNR+1];
+//! Macro for rot group names
+#define EROTGEOM(e) enum_name(e, erotgNR, erotg_names)
+//! String for rotation group origin names
+extern const char *erotg_originnames[erotgNR+1];
+//! Macro for rot group origin names
+#define EROTORIGIN(e) enum_name(e, erotgOriginNR, erotg_originnames)
+
+//! Rotation group fitting type
+enum {
+ erotgFitRMSD, erotgFitNORM, erotgFitPOT, erotgFitNR
+};
+//! String corresponding to rotation group fitting
+extern const char *erotg_fitnames[erotgFitNR+1];
+//! Macro for rot group fit names
+#define EROTFIT(e) enum_name(e, erotgFitNR, erotg_fitnames)
+
+/*! \brief Direction along which ion/water swaps happen
+ *
+ * Part of "Computational Electrophysiology" (CompEL) setups
+ */
+enum eSwaptype {
+ eswapNO, eswapX, eswapY, eswapZ, eSwapTypesNR
+};
+//! Names for swapping
+extern const char *eSwapTypes_names[eSwapTypesNR+1];
+//! Macro for swapping string
+#define ESWAPTYPE(e) enum_name(e, eSwapTypesNR, eSwapTypes_names)
+
+/*! \brief Swap group splitting type
+ *
+ * These are just the fixed groups we need for any setup. In t_swap's grp
+ * entry after that follows the variable number of swap groups.
+ */
+enum {
+ eGrpSplit0, eGrpSplit1, eGrpSolvent, eSwapFixedGrpNR
+};
+//! String for swap group splitting
+extern const char *eSwapFixedGrp_names[eSwapFixedGrpNR+1];
+
+//! QMMM methods.
+enum {
+ eQMmethodAM1, eQMmethodPM3, eQMmethodRHF,
+ eQMmethodUHF, eQMmethodDFT, eQMmethodB3LYP, eQMmethodMP2, eQMmethodCASSCF, eQMmethodB3LYPLAN,
+ eQMmethodDIRECT, eQMmethodNR
+};
+//! String corresponding to QMMM methods
+extern const char *eQMmethod_names[eQMmethodNR+1];
+//! Macro to pick QMMM method name
+#define EQMMETHOD(e) enum_name(e, eQMmethodNR, eQMmethod_names)
+
+//! QMMM basis function for QM part
+enum {
+ eQMbasisSTO3G, eQMbasisSTO3G2, eQMbasis321G,
+ eQMbasis321Gp, eQMbasis321dGp, eQMbasis621G,
+ eQMbasis631G, eQMbasis631Gp, eQMbasis631dGp,
+ eQMbasis6311G, eQMbasisNR
+};
+//! Name for QMMM basis function
+extern const char *eQMbasis_names[eQMbasisNR+1];
+//! Macro to pick right basis function string
+#define EQMBASIS(e) enum_name(e, eQMbasisNR, eQMbasis_names)
+
+//! QMMM scheme
+enum {
+ eQMMMschemenormal, eQMMMschemeoniom, eQMMMschemeNR
+};
+//! QMMMM scheme names
+extern const char *eQMMMscheme_names[eQMMMschemeNR+1];
+//! Macro to pick QMMMM scheme name
+#define EQMMMSCHEME(e) enum_name(e, eQMMMschemeNR, eQMMMscheme_names)
+
+//! Internal stuff for multiple value options in mdp files
+enum {
+ eMultentOptName, eMultentOptNo, eMultentOptLast, eMultentOptNR
+};
+//! Multiple value option names
+extern const char *eMultentOpt_names[eMultentOptNR+1];
+
+/*! \brief Neighborlist geometry type.
+ *
+ * Kernels will compute interactions between two particles,
+ * 3-center water, 4-center water or coarse-grained beads.
+ */
+enum gmx_nblist_kernel_geometry
+{
+ GMX_NBLIST_GEOMETRY_PARTICLE_PARTICLE,
+ GMX_NBLIST_GEOMETRY_WATER3_PARTICLE,
+ GMX_NBLIST_GEOMETRY_WATER3_WATER3,
+ GMX_NBLIST_GEOMETRY_WATER4_PARTICLE,
+ GMX_NBLIST_GEOMETRY_WATER4_WATER4,
+ GMX_NBLIST_GEOMETRY_CG_CG,
+ GMX_NBLIST_GEOMETRY_NR
+};
+//! String corresponding to nblist geometry names
+extern const char *gmx_nblist_geometry_names[GMX_NBLIST_GEOMETRY_NR+1];
+
+/*! \brief Types of electrostatics calculations
+ *
+ * Types of electrostatics calculations available inside nonbonded kernels.
+ * Note that these do NOT necessarily correspond to the user selections
+ * in the MDP file; many interactions for instance map to tabulated kernels.
+ */
+enum gmx_nbkernel_elec
+{
+ GMX_NBKERNEL_ELEC_NONE,
+ GMX_NBKERNEL_ELEC_COULOMB,
+ GMX_NBKERNEL_ELEC_REACTIONFIELD,
+ GMX_NBKERNEL_ELEC_CUBICSPLINETABLE,
+ GMX_NBKERNEL_ELEC_GENERALIZEDBORN,
+ GMX_NBKERNEL_ELEC_EWALD,
+ GMX_NBKERNEL_ELEC_NR
+};
+//! String corresponding to electrostatics kernels
+extern const char *gmx_nbkernel_elec_names[GMX_NBKERNEL_ELEC_NR+1];
+
+/*! \brief Types of vdw calculations available
+ *
+ * Types of vdw calculations available inside nonbonded kernels.
+ * Note that these do NOT necessarily correspond to the user selections
+ * in the MDP file; many interactions for instance map to tabulated kernels.
+ */
+enum gmx_nbkernel_vdw
+{
+ GMX_NBKERNEL_VDW_NONE,
+ GMX_NBKERNEL_VDW_LENNARDJONES,
+ GMX_NBKERNEL_VDW_BUCKINGHAM,
+ GMX_NBKERNEL_VDW_CUBICSPLINETABLE,
+ GMX_NBKERNEL_VDW_LJEWALD,
+ GMX_NBKERNEL_VDW_NR
+};
+//! String corresponding to VdW kernels
+extern const char *gmx_nbkernel_vdw_names[GMX_NBKERNEL_VDW_NR+1];
+
+//! \brief Types of interactions inside the neighborlist
+enum gmx_nblist_interaction_type
+{
+ GMX_NBLIST_INTERACTION_STANDARD,
+ GMX_NBLIST_INTERACTION_FREE_ENERGY,
+ GMX_NBLIST_INTERACTION_NR
+};
+//! String corresponding to interactions in neighborlist code
+extern const char *gmx_nblist_interaction_names[GMX_NBLIST_INTERACTION_NR+1];
+
+#endif /* GMX_MDTYPES_MD_ENUMS_H */
#include <algorithm>
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/df_history.h"
#include "gromacs/mdtypes/energyhistory.h"
+#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/smalloc.h"
/* The source code in this file should be thread-safe.
#ifndef GMX_MDTYPES_STATE_H
#define GMX_MDTYPES_STATE_H
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/math/vectypes.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/real.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/utility/basedefinitions.h"
void preserve_box_shape(t_inputrec *ir, matrix box_rel, matrix b)
{
- if (PRESERVE_SHAPE(*ir))
+ if (inputrecPreserveShape(ir))
{
do_box_rel(ir, box_rel, b, FALSE);
}
clear_mat(state->box_rel);
- if (PRESERVE_SHAPE(*ir))
+ if (inputrecPreserveShape(ir))
{
do_box_rel(ir, state->box_rel, state->box, TRUE);
}
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull_internal.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/exceptions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/linearalgebra/nrjac.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/cyclecounter.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/domdec/ga2la.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/fileio/gmxfio.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/groupcoord.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <algorithm>
#include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/fileio/xtcio.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/tools/compare.h"
#include "gromacs/topology/atomprop.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/index.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/trx.h"
#include "gromacs/fileio/trxio.h"
#include "gromacs/fileio/txtdump.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/tpxio.h"
#include "gromacs/fileio/trrio.h"
#include "gromacs/gmxpreprocess/readir.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/random/random.h"
#include "gromacs/topology/index.h"
#include "gromacs/fileio/txtdump.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/gmxpreprocess/gmxcpp.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/linearalgebra/sparsematrix.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/arraysize.h"
+#include "gromacs/utility/basedefinitions.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/topology/symtab.h"
#include "gromacs/utility/smalloc.h"
+const char *ptype_str[eptNR+1] = {
+ "Atom", "Nucleus", "Shell", "Bond", "VSite", NULL
+};
+
void init_atom(t_atoms *at)
{
at->nr = 0;
struct t_symtab;
+/* The particle type */
enum {
eptAtom, eptNucleus, eptShell, eptBond, eptVSite, eptNR
};
-/* The particle type */
+
+/* The particle type names */
+extern const char *ptype_str[eptNR+1];
typedef struct t_atom
{
#include <stdlib.h>
#include <string.h>
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/topology/atoms.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/idef.h"
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015, 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.
#include "gromacs/topology/symtab.h"
#include "gromacs/utility/smalloc.h"
+const char *gtypes[egcNR+1] = {
+ "T-Coupling", "Energy Mon.", "Acceleration", "Freeze",
+ "User1", "User2", "VCM", "Compressed X", "Or. Res. Fit", "QMMM", NULL
+};
+
static void init_groups(gmx_groups_t *groups)
{
groups->ngrpname = 0;
egcORFIT, egcQMMM,
egcNR
};
+/* Names corresponding to groups */
+extern const char *gtypes[egcNR+1];
typedef struct gmx_moltype_t
{
#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/imd/imd.h"
#include "gromacs/legacyheaders/types/commrec.h"
-#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/legacyheaders/types/force_flags.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/mdtypes/df_history.h"
#include "gromacs/mdtypes/energyhistory.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/mdatom.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/mshift.h"
/* md-vv uses averaged full step velocities for T-control
md-vv-avek uses averaged half step velocities for T-control (but full step ekin for P control)
md uses averaged half step kinetic energies to determine temperature unless defined otherwise by GMX_EKIN_AVE_VEL; */
- bTrotter = (EI_VV(ir->eI) && (IR_NPT_TROTTER(ir) || IR_NPH_TROTTER(ir) || IR_NVT_TROTTER(ir)));
+ bTrotter = (EI_VV(ir->eI) && (inputrecNptTrotter(ir) || inputrecNphTrotter(ir) || inputrecNvtTrotter(ir)));
if (bRerunMD)
{
gmx_fatal(FARGS, "Normal Mode analysis is not supported with virtual sites.\nIf you'd like to help with adding support, we have an open discussion at http://redmine.gromacs.org/issues/879\n");
}
- if (DEFORM(*ir))
+ if (inputrecDeform(ir))
{
tMPI_Thread_mutex_lock(&deform_init_box_mutex);
set_deform_reference_box(upd,
}
}
- if (IR_TWINRANGE(*ir) && repl_ex_nst % ir->nstcalclr != 0)
+ if (inputrecTwinRange(ir) && repl_ex_nst % ir->nstcalclr != 0)
{
/* We should exchange at nstcalclr steps to get correct integration */
gmx_fatal(FARGS, "The replica exchange period (%d) is not divisible by nstcalclr (%d)", repl_ex_nst, ir->nstcalclr);
nstfep = ir->fepvals->nstdhdl;
if (ir->bExpanded)
{
- if (IR_TWINRANGE(*ir) &&
+ if (inputrecTwinRange(ir) &&
ir->expandedvals->nstexpanded % ir->nstcalclr != 0)
{
gmx_fatal(FARGS, "nstexpanded should be divisible by nstcalclr");
nstfep = gmx_greatest_common_divisor(repl_ex_nst, nstfep);
}
/* We checked divisibility of repl_ex_nst and nstcalclr above */
- if (IR_TWINRANGE(*ir) && nstfep % ir->nstcalclr != 0)
+ if (inputrecTwinRange(ir) && nstfep % ir->nstcalclr != 0)
{
gmx_incons("nstfep not divisible by nstcalclr");
}
{
bMasterState = FALSE;
/* Correct the new box if it is too skewed */
- if (DYNAMIC_BOX(*ir))
+ if (inputrecDynamicBox(ir))
{
if (correct_box(fplog, step, state->box, graph))
{
/* Do we need global communication ? */
bGStat = (bCalcVir || bCalcEner || bStopCM ||
do_per_step(step, nstglobalcomm) ||
- (EI_VV(ir->eI) && IR_NVT_TROTTER(ir) && do_per_step(step-1, nstglobalcomm)));
+ (EI_VV(ir->eI) && inputrecNvtTrotter(ir) && do_per_step(step-1, nstglobalcomm)));
do_ene = (do_per_step(step, ir->nstenergy) || bLastStep);
}
force_flags = (GMX_FORCE_STATECHANGED |
- ((DYNAMIC_BOX(*ir) || bRerunMD) ? GMX_FORCE_DYNAMICBOX : 0) |
+ ((inputrecDynamicBox(ir) || bRerunMD) ? GMX_FORCE_DYNAMICBOX : 0) |
GMX_FORCE_ALLFORCES |
GMX_FORCE_SEPLRF |
(bCalcVir ? GMX_FORCE_VIRIAL : 0) |
* Think about ways around this in the future?
* For now, keep this choice in comments.
*/
- /*bPres = (ir->eI==eiVV || IR_NPT_TROTTER(ir)); */
- /*bTemp = ((ir->eI==eiVV &&(!bInitStep)) || (ir->eI==eiVVAK && IR_NPT_TROTTER(ir)));*/
+ /*bPres = (ir->eI==eiVV || inputrecNptTrotter(ir)); */
+ /*bTemp = ((ir->eI==eiVV &&(!bInitStep)) || (ir->eI==eiVVAK && inputrecNptTrotter(ir)));*/
bPres = TRUE;
bTemp = ((ir->eI == eiVV && (!bInitStep)) || (ir->eI == eiVVAK));
if (bCalcEner && ir->eI == eiVVAK)
copy_mat(shake_vir, state->svir_prev);
copy_mat(force_vir, state->fvir_prev);
- if (IR_NVT_TROTTER(ir) && ir->eI == eiVV)
+ if (inputrecNvtTrotter(ir) && ir->eI == eiVV)
{
/* update temperature and kinetic energy now that step is over - this is the v(t+dt) point */
enerd->term[F_TEMP] = sum_ekin(&(ir->opts), ekind, NULL, (ir->eI == eiVV), FALSE);
#include "gromacs/fileio/tpxio.h"
#include "gromacs/gmxlib/network.h"
#include "gromacs/gmxlib/readinp.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/index.h"
#include "gromacs/topology/mtop_util.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/fileio/copyrite.h"
#include "gromacs/gmxlib/main.h"
#include "gromacs/gmxlib/network.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/random/random.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include "gromacs/gmxlib/gmx_detect_hardware.h"
#include "gromacs/gmxlib/gmx_omp_nthreads.h"
#include "gromacs/gmxlib/md_logging.h"
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/legacyheaders/gmx_cpuid.h"
#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/legacyheaders/types/hw_info.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
+#include "gromacs/topology/topology.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/gmxassert.h"
#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/gmxlib/thread_affinity.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/calculate-ewald-splitting-coefficient.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/mdlib/tpi.h"
#include "gromacs/mdtypes/inputrec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/mdtypes/state.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
init_orires(fplog, mtop, state->x, inputrec, cr, &(fcd->orires),
state);
- if (DEFORM(*inputrec))
+ if (inputrecDeform(inputrec))
{
/* Store the deform reference box before reading the checkpoint */
if (SIMMASTER(cr))
#include <unistd.h> // for fork()
#endif
-#include "gromacs/legacyheaders/names.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/utility/arraysize.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/dir_separator.h"
#endif
#include "gromacs/fileio/tpxio.h"
-#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/types/ifunc.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdtypes/md_enums.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/atomprop.h"
#include "gromacs/utility/coolstuff.h"