#include "gromacs/gmxlib/df_history.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/genborn.h"
#include "gromacs/legacyheaders/gmx_ga2la.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/nsgrid.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/math/vec.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_grid.h"
#include "gromacs/mdlib/shellfc.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include <stdio.h>
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/legacyheaders/types/hw_info.h"
#include "gromacs/legacyheaders/types/inputrec.h"
#include "gromacs/legacyheaders/types/state.h"
#include "gromacs/math/vectypes.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/topology/block.h"
#include "gromacs/topology/idef.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/domdec/domdec_network.h"
#include "gromacs/gmxlib/chargegroup.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_ga2la.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.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/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/gmxana/gstat.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/main.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/types/nrnb.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/pbcutil/ishift.h"
#include "gromacs/commandline/pargs.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxana/gmx_ana.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/random/random.h"
#include "gromacs/gmxlib/nonbonded/nb_generic_adress.h"
#include "gromacs/gmxlib/nonbonded/nb_generic_cg.h"
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/listed-forces/bonded.h"
#include "gromacs/listed-forces/position-restraints.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/simd/simd.h"
#include <algorithm>
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/math/vectypes.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/gmxlib/chargegroup.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calcmu.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/random/random.h"
*/
#include "gmxpre.h"
-#include "gromacs/legacyheaders/force.h"
+#include "force.h"
#include "config.h"
* 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 _force_h
-#define _force_h
+#ifndef GMX_MDLIB_FORCE_H
+#define GMX_MDLIB_FORCE_H
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/legacyheaders/types/force_flags.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/timing/wallcycle.h"
+struct gmx_edsam;
+struct gmx_vsite_t;
+struct nonbonded_verlet_t;
struct t_commrec;
struct t_fcdata;
struct t_graph;
struct t_mdatoms;
struct t_nrnb;
struct t_pbc;
-struct gmx_edsam;
-
-#ifdef __cplusplus
-extern "C" {
-#endif
void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
gmx_bool bScrewPBC, matrix box);
/* Calculate virial for nxf atoms, and add it to vir */
void f_calc_vir(int i0, int i1, rvec x[], rvec f[], tensor vir,
- struct t_graph *g, rvec shift_vec[]);
+ t_graph *g, rvec shift_vec[]);
/* Calculate virial taking periodicity into account */
-real RF_excl_correction(const t_forcerec *fr, struct t_graph *g,
- const struct t_mdatoms *mdatoms, const t_blocka *excl,
- rvec x[], rvec f[], rvec *fshift, const struct t_pbc *pbc,
+real RF_excl_correction(const t_forcerec *fr, t_graph *g,
+ const t_mdatoms *mdatoms, const t_blocka *excl,
+ rvec x[], rvec f[], rvec *fshift, const t_pbc *pbc,
real lambda, real *dvdlambda);
/* Calculate the reaction-field energy correction for this node:
* epsfac q_i q_j (k_rf r_ij^2 - c_rf)
/* Determine the reaction-field constants */
void init_generalized_rf(FILE *fplog,
- const gmx_mtop_t *mtop, const struct t_inputrec *ir,
+ const gmx_mtop_t *mtop, const t_inputrec *ir,
t_forcerec *fr);
/* Initialize the generalized reaction field parameters */
/* In wall.c */
void make_wall_tables(FILE *fplog,
- const struct t_inputrec *ir, const char *tabfn,
+ const t_inputrec *ir, const char *tabfn,
const gmx_groups_t *groups,
t_forcerec *fr);
-real do_walls(struct t_inputrec *ir, t_forcerec *fr, matrix box, struct t_mdatoms *md,
- rvec x[], rvec f[], real lambda, real Vlj[], struct t_nrnb *nrnb);
-
-#define GMX_MAKETABLES_FORCEUSER (1<<0)
-#define GMX_MAKETABLES_14ONLY (1<<1)
+real do_walls(t_inputrec *ir, t_forcerec *fr, matrix box, t_mdatoms *md,
+ rvec x[], rvec f[], real lambda, real Vlj[], t_nrnb *nrnb);
-gmx_bool can_use_allvsall(const struct t_inputrec *ir,
- gmx_bool bPrintNote, struct t_commrec *cr, FILE *fp);
+gmx_bool can_use_allvsall(const t_inputrec *ir,
+ gmx_bool bPrintNote, t_commrec *cr, FILE *fp);
/* Returns if we can use all-vs-all loops.
* If bPrintNote==TRUE, prints a note, if necessary, to stderr
* and fp (if !=NULL) on the master node.
*/
-gmx_bool nbnxn_gpu_acceleration_supported(FILE *fplog,
- const struct t_commrec *cr,
- const struct t_inputrec *ir,
- gmx_bool bRerunMD);
+gmx_bool nbnxn_gpu_acceleration_supported(FILE *fplog,
+ const t_commrec *cr,
+ const t_inputrec *ir,
+ gmx_bool bRerunMD);
/* Return if GPU acceleration is supported with the given settings.
*
* If the return value is FALSE and fplog/cr != NULL, prints a fallback
* message to fplog/stderr.
*/
-gmx_bool nbnxn_simd_supported(FILE *fplog,
- const struct t_commrec *cr,
- const struct t_inputrec *ir);
+gmx_bool nbnxn_simd_supported(FILE *fplog,
+ const t_commrec *cr,
+ const t_inputrec *ir);
/* Return if CPU SIMD support exists for the given inputrec
* If the return value is FALSE and fplog/cr != NULL, prints a fallback
* message to fplog/stderr.
*/
-gmx_bool uses_simple_tables(int cutoff_scheme,
- struct nonbonded_verlet_t *nbv,
- int group);
+gmx_bool uses_simple_tables(int cutoff_scheme,
+ nonbonded_verlet_t *nbv,
+ int group);
/* Returns whether simple tables (i.e. not for use with GPUs) are used
* with the type of kernel indicated.
*/
void sum_epot(gmx_grppairener_t *grpp, real *epot);
/* Locally sum the non-bonded potential energy terms */
-void sum_dhdl(gmx_enerdata_t *enerd, real *lambda, struct t_lambda *fepvals);
+void sum_dhdl(gmx_enerdata_t *enerd, real *lambda, t_lambda *fepvals);
/* Sum the free energy contributions */
/* Compute the average C6 and C12 params for LJ corrections */
void set_avcsixtwelve(FILE *fplog, t_forcerec *fr,
const gmx_mtop_t *mtop);
-extern void do_force(FILE *log, struct t_commrec *cr,
- struct t_inputrec *inputrec,
- gmx_int64_t step, struct t_nrnb *nrnb, gmx_wallcycle_t wcycle,
- gmx_localtop_t *top,
- gmx_groups_t *groups,
- matrix box, rvec x[], history_t *hist,
- rvec f[],
- tensor vir_force,
- struct t_mdatoms *mdatoms,
- gmx_enerdata_t *enerd, struct t_fcdata *fcd,
- real *lambda, struct t_graph *graph,
- t_forcerec *fr,
- gmx_vsite_t *vsite, rvec mu_tot,
- double t, FILE *field, struct gmx_edsam *ed,
- gmx_bool bBornRadii,
- int flags);
+void do_force(FILE *log, t_commrec *cr,
+ t_inputrec *inputrec,
+ gmx_int64_t step, struct t_nrnb *nrnb, gmx_wallcycle_t wcycle,
+ gmx_localtop_t *top,
+ gmx_groups_t *groups,
+ matrix box, rvec x[], history_t *hist,
+ rvec f[],
+ tensor vir_force,
+ t_mdatoms *mdatoms,
+ gmx_enerdata_t *enerd, t_fcdata *fcd,
+ real *lambda, struct t_graph *graph,
+ t_forcerec *fr,
+ gmx_vsite_t *vsite, rvec mu_tot,
+ double t, FILE *field, struct gmx_edsam *ed,
+ gmx_bool bBornRadii,
+ int flags);
/* Communicate coordinates (if parallel).
* Do neighbor searching (if necessary).
* f is always required.
*/
-void ns(FILE *fplog,
- t_forcerec *fr,
- matrix box,
- gmx_groups_t *groups,
- gmx_localtop_t *top,
- struct t_mdatoms *md,
- struct t_commrec *cr,
- struct t_nrnb *nrnb,
- gmx_bool bFillGrid,
- gmx_bool bDoLongRangeNS);
+void ns(FILE *fplog,
+ t_forcerec *fr,
+ matrix box,
+ gmx_groups_t *groups,
+ gmx_localtop_t *top,
+ t_mdatoms *md,
+ t_commrec *cr,
+ t_nrnb *nrnb,
+ gmx_bool bFillGrid,
+ gmx_bool bDoLongRangeNS);
/* Call the neighborsearcher */
-extern void do_force_lowlevel(t_forcerec *fr,
- struct t_inputrec *ir,
- t_idef *idef,
- struct t_commrec *cr,
- struct t_nrnb *nrnb,
- gmx_wallcycle_t wcycle,
- struct t_mdatoms *md,
- rvec x[],
- history_t *hist,
- rvec f_shortrange[],
- rvec f_longrange[],
- gmx_enerdata_t *enerd,
- struct t_fcdata *fcd,
- gmx_localtop_t *top,
- gmx_genborn_t *born,
- gmx_bool bBornRadii,
- matrix box,
- struct t_lambda *fepvals,
- real *lambda,
- struct t_graph *graph,
- t_blocka *excl,
- rvec mu_tot[2],
- int flags,
- float *cycles_pme);
+void do_force_lowlevel(t_forcerec *fr,
+ t_inputrec *ir,
+ t_idef *idef,
+ t_commrec *cr,
+ t_nrnb *nrnb,
+ gmx_wallcycle_t wcycle,
+ t_mdatoms *md,
+ rvec x[],
+ history_t *hist,
+ rvec f_shortrange[],
+ rvec f_longrange[],
+ gmx_enerdata_t *enerd,
+ t_fcdata *fcd,
+ gmx_localtop_t *top,
+ gmx_genborn_t *born,
+ gmx_bool bBornRadii,
+ matrix box,
+ t_lambda *fepvals,
+ real *lambda,
+ t_graph *graph,
+ t_blocka *excl,
+ rvec mu_tot[2],
+ int flags,
+ float *cycles_pme);
/* Call all the force routines */
-void free_gpu_resources(const t_forcerec *fr,
- const struct t_commrec *cr,
- const struct gmx_gpu_info_t *gpu_info,
- const gmx_gpu_opt_t *gpu_opt);
+void free_gpu_resources(const t_forcerec *fr,
+ const t_commrec *cr,
+ const gmx_gpu_info_t *gpu_info,
+ const gmx_gpu_opt_t *gpu_opt);
-#ifdef __cplusplus
-}
#endif
-
-#endif /* _force_h */
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_detect_hardware.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/inputrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec-threading.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/legacyheaders/genborn.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/force_flags.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/mdlib/tgroup.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/timing/wallcycle.h"
struct t_fcdata;
#include <cstdio>
#include "gromacs/fileio/filenm.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/legacyheaders/types/forcerec.h"
#include "gromacs/legacyheaders/types/inputrec.h"
#include "gromacs/legacyheaders/types/nrnb.h"
#include "gromacs/legacyheaders/types/state.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/utility/basedefinitions.h"
#include "gromacs/fileio/mtxio.h"
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/inputrec.h"
#include "gromacs/linearalgebra/sparsematrix.h"
#include "gromacs/listed-forces/manage-threading.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdlib/trajectory_writing.h"
#include "gromacs/mdlib/update.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/timing/wallcycle.h"
#include <cmath>
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
#include <cmath>
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/mdlib/nbnxn_consts.h"
#include "gromacs/mdlib/nbnxn_kernels/nbnxn_kernel_common.h"
#include <algorithm>
#include "gromacs/domdec/domdec.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nonbonded.h"
#include "gromacs/legacyheaders/types/nrnb.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#include <string.h>
#include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.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/qmmm.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <string.h>
#include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include <string.h>
#include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <string.h>
#include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/qmmm.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/smalloc.h"
#include <algorithm>
#include "gromacs/fileio/confio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/types/mdatom.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#include <cmath>
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/types/mdatom.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/pbcutil/ishift.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/gmxlib/chargegroup.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/topology/mtop_util.h"
#define GMX_MDLIB_SHELLFC_H
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/timing/wallcycle.h"
struct gmx_constr;
#include "gromacs/gmxlib/nonbonded/nb_kernel.h"
#include "gromacs/imd/imd.h"
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/genborn.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calcmu.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/nb_verlet.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/xtcio.h"
#include "gromacs/legacyheaders/checkpoint.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/rbin.h"
#include "gromacs/fileio/xvgr.h"
#include "gromacs/gmxlib/chargegroup.h"
#include "gromacs/gmxlib/conformation-utilities.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/group.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/mdebin.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
#include "gromacs/mdlib/update.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/random/random.h"
#include "gromacs/timing/wallcycle.h"
#include "gromacs/timing/walltime_accounting.h"
#include "gromacs/fileio/confio.h"
#include "gromacs/gmxlib/disre.h"
#include "gromacs/gmxlib/orires.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/math/units.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/mdrun.h"
#include "gromacs/mdlib/sim_util.h"
#include "gromacs/mdlib/tgroup.h"
*/
#include "gmxpre.h"
-#include "gromacs/legacyheaders/vsite.h"
+#include "vsite.h"
#include <stdio.h>
* 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 _vsite_h
-#define _vsite_h
-
-#include <stdio.h>
+#ifndef GMX_MDLIB_VSITE_H
+#define GMX_MDLIB_VSITE_H
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/pbcutil/ishift.h"
struct t_commrec;
+struct t_graph;
struct t_mdatoms;
struct t_nrnb;
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-typedef struct {
+typedef struct gmx_vsite_thread_t {
t_ilist ilist[F_NRE]; /* vsite ilists for this thread */
rvec fshift[SHIFTS]; /* fshift accumulation buffer */
matrix dxdf; /* virial dx*df accumulation buffer */
} gmx_vsite_thread_t;
-typedef struct {
+typedef struct gmx_vsite_t {
gmx_bool bHaveChargeGroups; /* Do we have charge groups? */
int n_intercg_vsite; /* The number of inter charge group vsites */
int nvsite_pbc_molt; /* The array size of vsite_pbc_molt */
int th_ind_nalloc; /* Size of th_ind */
} gmx_vsite_t;
-struct t_graph;
-
void construct_vsites(const gmx_vsite_t *vsite,
rvec x[],
real dt, rvec v[],
const t_iparams ip[], const t_ilist ilist[],
int ePBC, gmx_bool bMolPBC,
- struct t_commrec *cr, matrix box);
+ t_commrec *cr, matrix box);
/* Create positions of vsite atoms based on surrounding atoms
* for the local system.
* If v is passed, the velocities of the vsites will be calculated
void spread_vsite_f(gmx_vsite_t *vsite,
rvec x[], rvec f[], rvec *fshift,
gmx_bool VirCorr, matrix vir,
- struct t_nrnb *nrnb, t_idef *idef,
- int ePBC, gmx_bool bMolPBC, struct t_graph *g, matrix box,
- struct t_commrec *cr);
+ t_nrnb *nrnb, t_idef *idef,
+ int ePBC, gmx_bool bMolPBC, t_graph *g, matrix box,
+ t_commrec *cr);
/* Spread the force operating on the vsite atoms on the surrounding atoms.
* If fshift!=NULL also update the shift forces.
* If VirCorr=TRUE add the virial correction for non-linear vsite constructs
* as for instance for the PME mesh contribution.
*/
-gmx_vsite_t *init_vsite(const gmx_mtop_t *mtop, struct t_commrec *cr,
+gmx_vsite_t *init_vsite(const gmx_mtop_t *mtop, t_commrec *cr,
gmx_bool bSerial_NoPBC);
/* Initialize the virtual site struct,
* returns NULL when there are no virtual sites.
* this is useful for correction vsites of the initial configuration.
*/
-void split_vsites_over_threads(const t_ilist *ilist,
- const t_iparams *ip,
- const struct t_mdatoms *mdatoms,
- gmx_bool bLimitRange,
- gmx_vsite_t *vsite);
+void split_vsites_over_threads(const t_ilist *ilist,
+ const t_iparams *ip,
+ const t_mdatoms *mdatoms,
+ gmx_bool bLimitRange,
+ gmx_vsite_t *vsite);
/* Divide the vsite work-load over the threads.
* Should be called at the end of the domain decomposition.
*/
-void set_vsite_top(gmx_vsite_t *vsite, gmx_localtop_t *top, struct t_mdatoms *md,
- struct t_commrec *cr);
+void set_vsite_top(gmx_vsite_t *vsite, gmx_localtop_t *top, t_mdatoms *md,
+ t_commrec *cr);
/* Set some vsite data for runs without domain decomposition.
* Should be called once after init_vsite, before calling other routines.
*/
-#ifdef __cplusplus
-}
-#endif
-
#endif
#include <algorithm>
#include "gromacs/fileio/filenm.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/types/inputrec.h"
#include "gromacs/legacyheaders/types/mdatom.h"
#include "gromacs/legacyheaders/types/nrnb.h"
#include "gromacs/math/utilities.h"
#include "gromacs/math/vec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/tables/forcetable.h"
#include "gromacs/utility/cstringutil.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/domdec/domdec.h"
#include "gromacs/fileio/gmxfio.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/legacyheaders/types/commrec.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/utility/fatalerror.h"
#include "gromacs/utility/futil.h"
#include "gromacs/utility/smalloc.h"
#include <algorithm>
#include "gromacs/fileio/xvgr.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/names.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/types/interaction_const.h"
#include "gromacs/utility/real.h"
+#define GMX_MAKETABLES_FORCEUSER (1<<0)
+#define GMX_MAKETABLES_14ONLY (1<<1)
+
/* Index in the tables that says which function to use */
enum {
etiCOUL, etiLJ6, etiLJ12, etiNR
#include "gromacs/gmxlib/md_logging.h"
#include "gromacs/gmxlib/sighandler.h"
#include "gromacs/imd/imd.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/legacyheaders/nrnb.h"
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/legacyheaders/typedefs.h"
-#include "gromacs/legacyheaders/vsite.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/legacyheaders/types/enums.h"
#include "gromacs/legacyheaders/types/fcdata.h"
#include "gromacs/mdlib/compute_io.h"
#include "gromacs/mdlib/constr.h"
#include "gromacs/mdlib/ebin.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/md_support.h"
#include "gromacs/mdlib/mdatoms.h"
#include "gromacs/mdlib/trajectory_writing.h"
#include "gromacs/mdlib/update.h"
#include "gromacs/mdlib/vcm.h"
+#include "gromacs/mdlib/vsite.h"
#include "gromacs/pbcutil/mshift.h"
#include "gromacs/pbcutil/pbc.h"
#include "gromacs/pulling/pull.h"
#include "gromacs/gmxlib/gpu_utils/gpu_utils.h"
#include "gromacs/legacyheaders/checkpoint.h"
#include "gromacs/legacyheaders/copyrite.h"
-#include "gromacs/legacyheaders/force.h"
#include "gromacs/legacyheaders/gmx_detect_hardware.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/gmx_thread_affinity.h"
#include "gromacs/math/vec.h"
#include "gromacs/mdlib/calc_verletbuf.h"
#include "gromacs/mdlib/constr.h"
+#include "gromacs/mdlib/force.h"
#include "gromacs/mdlib/forcerec.h"
#include "gromacs/mdlib/integrator.h"
#include "gromacs/mdlib/md_support.h"