/* create free energy data to avoid NULLs */
snew(ir->fepvals, 1);
printf("Neighborsearching with a cut-off of %g\n", rlong);
- init_forcerec(stdout, oenv, fr, NULL, ir, mtop, cr, box, FALSE,
+ init_forcerec(stdout, oenv, fr, NULL, ir, mtop, cr, box,
NULL, NULL, NULL, NULL, NULL, TRUE, -1);
if (debug)
{
- pr_forcerec(debug, fr, cr);
+ pr_forcerec(debug, fr);
}
/* Calculate new stuff dependent on coords and box */
snew(lambda, efptNR);
snew(dvdl, efptNR);
init_neighbor_list(fp, fr, md->homenr);
- search_neighbours(fp, fr, x, box, top,
- &mtop->groups, cr, &nrnb, md, lambda, dvdl, NULL, TRUE, FALSE, FALSE);
+ search_neighbours(fp, fr, box, top,
+ &mtop->groups, cr, &nrnb, md, TRUE, FALSE);
if (debug)
{
update_mdatoms(mdatoms, ir.fepvals->init_lambda);
fr = mk_forcerec();
fprintf(fplog, "Made forcerec\n");
- init_forcerec(fplog, oenv, fr, NULL, &ir, &mtop, cr, box, FALSE,
+ init_forcerec(fplog, oenv, fr, NULL, &ir, &mtop, cr, box,
NULL, NULL, NULL, NULL, NULL, FALSE, -1);
init_nrnb(&nrnb);
if (ir.ePBC != epbcNONE)
void
-gmx_nonbonded_setup(FILE * fplog,
- t_forcerec * fr,
+gmx_nonbonded_setup(t_forcerec * fr,
gmx_bool bGenericKernelOnly)
{
#ifdef GMX_THREAD_MPI
nb_kernel_list_add_kernels(kernellist_avx_256_double, kernellist_avx_256_double_size);
#endif
#if (defined GMX_CPU_ACCELERATION_SPARC64_HPC_ACE && defined GMX_DOUBLE)
- nb_kernel_list_add_kernels(kernellist_sparc64_hpc_ace_double,kernellist_sparc64_hpc_ace_double_size);
+ nb_kernel_list_add_kernels(kernellist_sparc64_hpc_ace_double, kernellist_sparc64_hpc_ace_double_size);
#endif
; /* empty statement to avoid a completely empty block */
}
/* We typically call this setup routine before starting timers,
* but if that has not been done for whatever reason we do it now.
*/
- gmx_nonbonded_setup(NULL, NULL, FALSE);
+ gmx_nonbonded_setup(NULL, FALSE);
}
/* Not used yet */
return;
}
-void do_nonbonded(t_commrec *cr, t_forcerec *fr,
+void do_nonbonded(t_forcerec *fr,
rvec x[], rvec f_shortrange[], rvec f_longrange[], t_mdatoms *mdatoms, t_blocka *excl,
- gmx_grppairener_t *grppener, rvec box_size,
+ gmx_grppairener_t *grppener,
t_nrnb *nrnb, real *lambda, real *dvdl,
int nls, int eNL, int flags)
{
/* Initializes and return the SHAKE data structure */
gmx_bool bshakef(FILE *log, /* Log file */
- gmx_shakedata_t shaked, /* SHAKE data */
- int natoms, /* Total number of atoms */
+ gmx_shakedata_t shaked, /* Total number of atoms */
real invmass[], /* Atomic masses */
int nblocks, /* The number of shake blocks */
int sblock[], /* The shake blocks */
t_vetavars *vetavar /* variables for pressure control */
);
-void settle_proj(FILE *fp,
- gmx_settledata_t settled, int econq,
+void settle_proj(gmx_settledata_t settled, int econq,
int nsettle, t_iatom iatoms[],
const t_pbc *pbc, /* PBC data pointer, can be NULL */
rvec x[],
real
-do_ewald(FILE *log, gmx_bool bVerbose,
- t_inputrec *ir,
+do_ewald(t_inputrec *ir,
rvec x[], rvec f[],
real chargeA[], real chargeB[],
rvec box,
void dd_init_bondeds(FILE *fplog,
gmx_domdec_t *dd, gmx_mtop_t *mtop,
- gmx_vsite_t *vsite, gmx_constr_t constr,
+ gmx_vsite_t *vsite,
t_inputrec *ir, gmx_bool bBCheck, cginfo_mb_t *cginfo_mb);
/* Initialize data structures for bonded interactions */
/* Returns if we need to do pbc for calculating bonded interactions */
void set_dd_parameters(FILE *fplog, gmx_domdec_t *dd, real dlb_scale,
- t_inputrec *ir, t_forcerec *fr,
+ t_inputrec *ir,
gmx_ddbox_t *ddbox);
/* Set DD grid dimensions and limits,
* should be called after calling dd_init_bondeds.
t_ilist *il_local);
void init_domdec_constraints(gmx_domdec_t *dd,
- gmx_mtop_t *mtop,
- gmx_constr_t constr);
+ gmx_mtop_t *mtop);
void init_domdec_vsites(gmx_domdec_t *dd, int n_intercg_vsite);
void dd_make_reverse_top(FILE *fplog,
gmx_domdec_t *dd, gmx_mtop_t *mtop,
- gmx_vsite_t *vsite, gmx_constr_t constr,
+ gmx_vsite_t *vsite,
t_inputrec *ir, gmx_bool bBCheck);
void dd_make_local_cgs(gmx_domdec_t *dd, t_block *lcgs);
-void dd_make_local_top(FILE *fplog,
- gmx_domdec_t *dd, gmx_domdec_zones_t *zones,
+void dd_make_local_top(gmx_domdec_t *dd, gmx_domdec_zones_t *zones,
int npbcdim, matrix box,
rvec cellsize_min, ivec npulse,
t_forcerec *fr,
t_blocka *make_charge_group_links(gmx_mtop_t *mtop, gmx_domdec_t *dd,
cginfo_mb_t *cginfo_mb);
-void dd_bonded_cg_distance(FILE *fplog,
- gmx_domdec_t *dd, gmx_mtop_t *mtop,
+void dd_bonded_cg_distance(FILE *fplog, gmx_mtop_t *mtop,
t_inputrec *ir, rvec *x, matrix box,
gmx_bool bBCheck,
real *r_2b, real *r_mb);
gmx_mtop_t *mtop, matrix box, gmx_ddbox_t *ddbox,
gmx_bool bDynLoadBal, real dlb_scale,
real cellsize_limit, real cutoff_dd,
- gmx_bool bInterCGBondeds, gmx_bool bInterCGMultiBody);
+ gmx_bool bInterCGBondeds);
/* Determines the optimal DD cell setup dd->nc and possibly npmenodes
* for the system.
* On the master node returns the actual cellsize limit used.
void gmx_print_sepdvdl(FILE *fplog, const char *s, real v, real dvdlambda);
-void calc_vir(FILE *fplog, int nxf, rvec x[], rvec f[], tensor vir,
+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(FILE *fplog, int i0, int i1, rvec x[], rvec f[], tensor vir,
+void f_calc_vir(int i0, int i1, rvec x[], rvec f[], tensor vir,
t_graph *g, rvec shift_vec[]);
/* Calculate virial taking periodicity into account */
-real RF_excl_correction(FILE *fplog,
- const t_forcerec *fr, t_graph *g,
+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);
*/
/* Return a table for GB calculations */
-t_forcetable make_gb_table(FILE *out, const output_env_t oenv,
- const t_forcerec *fr,
- const char *fn,
- real rtab);
+t_forcetable make_gb_table(const output_env_t oenv,
+ const t_forcerec *fr);
/* Read a table for AdResS Thermo Force calculations */
extern t_forcetable make_atf_table(FILE *out, const output_env_t oenv,
const char *fn,
matrix box);
-void pr_forcerec(FILE *fplog, t_forcerec *fr, t_commrec *cr);
+void pr_forcerec(FILE *fplog, t_forcerec *fr);
void
forcerec_set_ranges(t_forcerec *fr,
int natoms_force_constr, int natoms_f_novirsum);
/* Set the number of cg's and atoms for the force calculation */
-gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
+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
const gmx_mtop_t *mtop,
const t_commrec *cr,
matrix box,
- gmx_bool bMolEpot,
const char *tabfn,
const char *tabafn,
const char *tabpfn,
void reset_foreign_enerdata(gmx_enerdata_t *enerd);
/* Resets only the foreign energy data */
-void reset_enerdata(t_grpopts *opts,
- t_forcerec *fr, gmx_bool bNS,
+void reset_enerdata(t_forcerec *fr, gmx_bool bNS,
gmx_enerdata_t *enerd,
gmx_bool bMaster);
/* Resets the energy data, if bNS=TRUE also zeros the long-range part */
-void sum_epot(t_grpopts *opts, gmx_grppairener_t *grpp, real *epot);
+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, t_lambda *fepvals);
/* Sum the free energy contributions */
-void update_forcerec(FILE *fplog, t_forcerec *fr, matrix box);
+void update_forcerec(t_forcerec *fr, matrix box);
/* Updates parameters in the forcerec that are time dependent */
/* Compute the average C6 and C12 params for LJ corrections */
t_inputrec *inputrec,
gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
gmx_localtop_t *top,
- gmx_mtop_t *mtop,
gmx_groups_t *groups,
matrix box, rvec x[], history_t *hist,
rvec f[],
void ns(FILE *fplog,
t_forcerec *fr,
- rvec x[],
matrix box,
gmx_groups_t *groups,
- t_grpopts *opts,
gmx_localtop_t *top,
t_mdatoms *md,
t_commrec *cr,
t_nrnb *nrnb,
- real *lambda,
- real *dvdlambda,
- gmx_grppairener_t *grppener,
gmx_bool bFillGrid,
gmx_bool bDoLongRangeNS);
/* Call the neighborsearcher */
t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
t_mdatoms *md,
- t_grpopts *opts,
rvec x[],
history_t *hist,
rvec f_shortrange[],
rvec f_longrange[],
gmx_enerdata_t *enerd,
t_fcdata *fcd,
- gmx_mtop_t *mtop,
gmx_localtop_t *top,
gmx_genborn_t *born,
t_atomtypes *atype,
/* Initialise GB stuff */
int init_gb(gmx_genborn_t **p_born,
const t_commrec *cr, t_forcerec *fr, const t_inputrec *ir,
- const gmx_mtop_t *mtop, real rgbradii, int gb_algorithm);
+ const gmx_mtop_t *mtop, int gb_algorithm);
/* Born radii calculations, both with and without SSE acceleration */
-int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir, gmx_localtop_t *top,
- const t_atomtypes *atype, rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, t_nrnb *nrnb);
+int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir, gmx_localtop_t *top, rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, t_nrnb *nrnb);
/* Functions for calculating adjustments due to ie chain rule terms */
void
-calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype,
- rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, int sa_algorithm, t_nrnb *nrnb, gmx_bool bRad,
+calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top,
+ rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, int sa_algorithm, t_nrnb *nrnb,
const t_pbc *pbc, const t_graph *graph, gmx_enerdata_t *enerd);
int
-make_gb_nblist(t_commrec *cr, int gb_algorithm, real gbcut,
+make_gb_nblist(t_commrec *cr, int gb_algorithm,
rvec x[], matrix box,
t_forcerec *fr, t_idef *idef, t_graph *graph, gmx_genborn_t *born);
gmx_enerdata_t *enerd, tensor force_vir, tensor shake_vir, tensor total_vir,
tensor pres, rvec mu_tot, gmx_constr_t constr,
globsig_t *gs, gmx_bool bInterSimGS,
- matrix box, gmx_mtop_t *top_global, real *pcurr,
- int natoms, gmx_bool *bSumEkinhOld, int flags);
+ matrix box, gmx_mtop_t *top_global, real *pcurr, gmx_bool *bSumEkinhOld, int flags);
/* Compute global variables during integration */
#ifdef __cplusplus
/* Broadcast the data for a simulation, and allocate node-specific settings
such as rng generators. */
-void init_parallel(FILE *log, t_commrec *cr, t_inputrec *inputrec,
+void init_parallel(t_commrec *cr, t_inputrec *inputrec,
gmx_mtop_t *mtop);
int mdrunner(gmx_hw_opt_t *hw_opt,
void move_cgcm(FILE *log, const t_commrec *cr, rvec cg_cm[]);
-void move_rvecs(const t_commrec *cr, gmx_bool bForward, gmx_bool bSum,
- int left, int right, rvec vecs[], rvec buf[],
+void move_rvecs(const t_commrec *cr, gmx_bool bForward, gmx_bool bSum, rvec vecs[], rvec buf[],
int shift, t_nrnb *nrnb);
-void move_reals(const t_commrec *cr, gmx_bool bForward, gmx_bool bSum,
- int left, int right, real reals[], real buf[],
- int shift, t_nrnb *nrnb);
-
-void move_x(FILE *log, const t_commrec *cr,
- int left, int right, rvec x[], t_nrnb *nrnb);
+void move_x(const t_commrec *cr, rvec x[], t_nrnb *nrnb);
-void move_rborn(FILE *log, const t_commrec *cr,
- int left, int right, real rborn[], t_nrnb *nrnb);
-
-void move_f(FILE *log, const t_commrec *cr,
- int left, int right, rvec f[], rvec fadd[],
+void move_f(const t_commrec *cr, rvec f[], rvec fadd[],
t_nrnb *nrnb);
-void move_gpol(FILE *log, const t_commrec *cr,
- int left, int right, real gpol[], real gpol_add[],
- t_nrnb *nrnb);
-
#ifdef __cplusplus
}
#endif
/*! Initializes the data structures related to CUDA nonbonded calculations. */
FUNC_QUALIFIER
-void nbnxn_cuda_init(FILE *fplog,
- nbnxn_cuda_ptr_t *p_cu_nb,
- const gmx_gpu_info_t *gpu_info, int my_gpu_index,
+void nbnxn_cuda_init(FILE gmx_unused *fplog,
+ nbnxn_cuda_ptr_t gmx_unused *p_cu_nb,
+ const gmx_gpu_info_t gmx_unused *gpu_info, int gmx_unused my_gpu_index,
/* true of both local and non-local are don on GPU */
- gmx_bool bLocalAndNonlocal) FUNC_TERM
+ gmx_bool gmx_unused bLocalAndNonlocal) FUNC_TERM
/*! Initializes simulation constant data. */
FUNC_QUALIFIER
-void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t cu_nb,
- const interaction_const_t *ic,
- const nonbonded_verlet_group_t *nbv_group) FUNC_TERM
+void nbnxn_cuda_init_const(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const interaction_const_t gmx_unused *ic,
+ const nonbonded_verlet_group_t gmx_unused *nbv_group) FUNC_TERM
/*! Initializes pair-list data for GPU, called at every pair search step. */
FUNC_QUALIFIER
-void nbnxn_cuda_init_pairlist(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_pairlist_t *h_nblist,
- int iloc) FUNC_TERM
+void nbnxn_cuda_init_pairlist(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_pairlist_t gmx_unused *h_nblist,
+ int gmx_unused iloc) FUNC_TERM
/*! Initializes atom-data on the GPU, called at every pair search step. */
FUNC_QUALIFIER
-void nbnxn_cuda_init_atomdata(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_atomdata_t *atomdata) FUNC_TERM
+void nbnxn_cuda_init_atomdata(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_atomdata_t gmx_unused *atomdata) FUNC_TERM
/*! \brief Update parameters during PP-PME load balancing. */
FUNC_QUALIFIER
-void nbnxn_cuda_pme_loadbal_update_param(nbnxn_cuda_ptr_t cu_nb,
- const interaction_const_t *ic) FUNC_TERM
+void nbnxn_cuda_pme_loadbal_update_param(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const interaction_const_t gmx_unused *ic) FUNC_TERM
/*! Uploads shift vector to the GPU if the box is dynamic (otherwise just returns). */
FUNC_QUALIFIER
-void nbnxn_cuda_upload_shiftvec(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_atomdata_t *nbatom) FUNC_TERM
+void nbnxn_cuda_upload_shiftvec(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_atomdata_t gmx_unused *nbatom) FUNC_TERM
/*! Clears GPU outputs: nonbonded force, shift force and energy. */
FUNC_QUALIFIER
-void nbnxn_cuda_clear_outputs(nbnxn_cuda_ptr_t cu_nb,
- int flags) FUNC_TERM
+void nbnxn_cuda_clear_outputs(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ int gmx_unused flags) FUNC_TERM
/*! Frees all GPU resources used for the nonbonded calculations. */
FUNC_QUALIFIER
-void nbnxn_cuda_free(FILE *fplog,
- nbnxn_cuda_ptr_t cu_nb) FUNC_TERM
+void nbnxn_cuda_free(FILE gmx_unused *fplog,
+ nbnxn_cuda_ptr_t gmx_unused cu_nb) FUNC_TERM
/*! Returns the GPU timings structure or NULL if GPU is not used or timing is off. */
FUNC_QUALIFIER
-wallclock_gpu_t * nbnxn_cuda_get_timings(nbnxn_cuda_ptr_t cu_nb)
+wallclock_gpu_t * nbnxn_cuda_get_timings(nbnxn_cuda_ptr_t gmx_unused cu_nb)
#ifdef GMX_GPU
;
#else
/*! Resets nonbonded GPU timings. */
FUNC_QUALIFIER
-void nbnxn_cuda_reset_timings(nbnxn_cuda_ptr_t cu_nb) FUNC_TERM
+void nbnxn_cuda_reset_timings(nbnxn_cuda_ptr_t gmx_unused cu_nb) FUNC_TERM
/*! Calculates the minimum size of proximity lists to improve SM load balance
with CUDA non-bonded kernels. */
FUNC_QUALIFIER
-int nbnxn_cuda_min_ci_balanced(nbnxn_cuda_ptr_t cu_nb)
+int nbnxn_cuda_min_ci_balanced(nbnxn_cuda_ptr_t gmx_unused cu_nb)
#ifdef GMX_GPU
;
#else
/*! Returns if analytical Ewald CUDA kernels are used. */
FUNC_QUALIFIER
-gmx_bool nbnxn_cuda_is_kernel_ewald_analytical(const nbnxn_cuda_ptr_t cu_nb)
+gmx_bool nbnxn_cuda_is_kernel_ewald_analytical(const nbnxn_cuda_ptr_t gmx_unused cu_nb)
#ifdef GMX_GPU
;
#else
void
-gmx_nonbonded_setup(FILE * fplog,
- t_forcerec * fr,
+gmx_nonbonded_setup(t_forcerec * fr,
gmx_bool bGenericKernelOnly);
#define GMX_NONBONDED_DO_SR (1<<4)
void
-do_nonbonded(t_commrec *cr, t_forcerec *fr,
+do_nonbonded(t_forcerec *fr,
rvec x[], rvec f_shortrange[], rvec f_longrange[], t_mdatoms *md, t_blocka *excl,
- gmx_grppairener_t *grppener, rvec box_size,
+ gmx_grppairener_t *grppener,
t_nrnb *nrnb, real *lambda, real dvdlambda[],
int nls, int eNL, int flags);
****************************************************/
void init_ns(FILE *fplog, const t_commrec *cr,
gmx_ns_t *ns, t_forcerec *fr,
- const gmx_mtop_t *mtop,
- matrix box);
+ const gmx_mtop_t *mtop);
-int search_neighbours(FILE *log, t_forcerec *fr,
- rvec x[], matrix box,
+int search_neighbours(FILE *log, t_forcerec *fr, matrix box,
gmx_localtop_t *top,
gmx_groups_t *groups,
t_commrec *cr,
t_nrnb *nrnb, t_mdatoms *md,
- real *lambda, real *dvdlambda,
- gmx_grppairener_t *grppener,
gmx_bool bFillGrid,
- gmx_bool bDoLongRangeNS,
- gmx_bool bPadListsForKernels);
+ gmx_bool bDoLongRangeNS);
/* Debugging routines from wnblist.c */
*/
void grid_first(FILE *log, t_grid *grid,
- gmx_domdec_t *dd, const gmx_ddbox_t *ddbox,
- int ePBC, matrix box, rvec izones_x0, rvec izones_x1,
+ gmx_domdec_t *dd, const gmx_ddbox_t *ddbox, matrix box, rvec izones_x0, rvec izones_x1,
real rlong, real grid_density);
-void fill_grid(FILE *log,
- gmx_domdec_zones_t *dd_zones,
+void fill_grid(gmx_domdec_zones_t *dd_zones,
t_grid *grid, int ncg_tot,
int cg0, int cg1, rvec cg_cm[]);
/* Allocates space on the grid for ncg_tot cg's.
* When cg0 is -1, contiues filling from grid->nr to cg1.
*/
-void calc_elemnr(FILE *log, t_grid *grid, int cg0, int cg1, int ncg);
+void calc_elemnr(t_grid *grid, int cg0, int cg1, int ncg);
void calc_ptrs(t_grid *grid);
-void grid_last(FILE *log, t_grid *grid, int cg0, int cg1, int ncg);
+void grid_last(t_grid *grid, int cg0, int cg1, int ncg);
int xyz2ci_(int nry, int nrz, int x, int y, int z);
#define xyz2ci(nry, nrz, x, y, z) ((nry)*(nrz)*(x)+(nrz)*(y)+(z))
void ci2xyz(t_grid *grid, int i, int *x, int *y, int *z);
-void check_grid(FILE *log, t_grid *grid);
+void check_grid(t_grid *grid);
void print_grid(FILE *log, t_grid *grid);
* available after a successful call of gmx_tx_wait(dir).
*/
-void gmx_tx_wait(const t_commrec *cr, int dir);
+void gmx_tx_wait(const t_commrec *cr);
/*
* Waits until the asynchronous send operation associated with chan has
* succeeded. This makes the buffer of the send operation available to
* available after a successful call of gmx_rx_wait(chan).
*/
-void gmx_rx_wait(const t_commrec *cr, int dir);
+void gmx_rx_wait(const t_commrec *cr);
/*
* Waits until the asynchronous receive operation, associated with chan,
* has succeeded. This makes the buffer of the receive operation
int recv_dir, real *recv_buf, int recv_bufsize);
/* Communicate simultaneously left and right, reals only */
-void gmx_wait(const t_commrec *cr, int dir_send, int dir_recv);
+void gmx_wait(const t_commrec *cr);
/* Wait for communication to finish */
void pd_move_f(const t_commrec *cr, rvec f[], t_nrnb *nrnb);
#ifndef PMALLOC_CUDA_H
#define PMALLOC_CUDA_H
+#include "types/simple.h"
+
#ifdef GMX_GPU
#define FUNC_TERM ;
#else
#endif
/*! Allocates nbytes of page-locked memory. */
-void pmalloc(void **h_ptr, size_t nbytes) FUNC_TERM
+void pmalloc(void gmx_unused **h_ptr, size_t gmx_unused nbytes) FUNC_TERM
/*! Allocates nbytes of page-locked memory with write-combining. */
-void pmalloc_wc(void **h_ptr, size_t nbytes) FUNC_TERM
+void pmalloc_wc(void gmx_unused **h_ptr, size_t gmx_unused nbytes) FUNC_TERM
/*! Frees page locked memory allocated with pmalloc. */
-void pfree(void *h_ptr) FUNC_TERM
+void pfree(void gmx_unused *h_ptr) FUNC_TERM
#ifdef __cplusplus
}
int gmx_pmeonly(gmx_pme_t pme,
t_commrec *cr, t_nrnb *mynrnb,
gmx_wallcycle_t wcycle,
- real ewaldcoeff, gmx_bool bGatherOnly,
+ real ewaldcoeff,
t_inputrec *ir);
/* Called on the nodes that do PME exclusively (as slaves)
*/
unsigned long Flags);
/* Close the pull output files */
-void finish_pull(FILE *fplog, t_pull *pull);
+void finish_pull(t_pull *pull);
/* Print the pull output (x and/or f) */
void pull_print_output(t_pull *pull, gmx_large_int_t step, double time);
/* allocates memory for QMMMrec */
void init_QMMMrec(t_commrec *cr,
- matrix box,
gmx_mtop_t *mtop,
t_inputrec *ir,
t_forcerec *fr);
real calculate_QMMM(t_commrec *cr,
rvec x[], rvec f[],
- t_forcerec *fr,
- t_mdatoms *md);
+ t_forcerec *fr);
/* QMMM computes the QM forces. This routine makes either function
* calls to gmx QM routines (derived from MOPAC7 (semi-emp.) and MPQC
int relax_shell_flexcon(FILE *log, t_commrec *cr, gmx_bool bVerbose,
gmx_large_int_t mdstep, t_inputrec *inputrec,
gmx_bool bDoNS, int force_flags,
- gmx_bool bStopCM,
gmx_localtop_t *top,
- gmx_mtop_t *mtop,
gmx_constr_t constr,
gmx_enerdata_t *enerd, t_fcdata *fcd,
t_state *state, rvec f[],
t_forcerec *fr,
gmx_bool bBornRadii,
double t, rvec mu_tot,
- int natoms, gmx_bool *bConverged,
+ gmx_bool *bConverged,
gmx_vsite_t *vsite,
FILE *fp_field);
void print_date_and_time(FILE *log, int pid, const char *title,
const gmx_runtime_t *runtime);
-void finish_run(FILE *log, t_commrec *cr, const char *confout,
+void finish_run(FILE *log, t_commrec *cr,
t_inputrec *inputrec,
t_nrnb nrnb[], gmx_wallcycle_t wcycle,
gmx_runtime_t *runtime,
wallclock_gpu_t *gputimes,
- int omp_nth_pp,
gmx_bool bWriteStat);
void calc_enervirdiff(FILE *fplog, int eDispCorr, t_forcerec *fr);
void do_constrain_first(FILE *log, gmx_constr_t constr,
t_inputrec *inputrec, t_mdatoms *md,
- t_state *state, rvec *f,
- t_graph *graph, t_commrec *cr, t_nrnb *nrnb,
- t_forcerec *fr, gmx_localtop_t *top, tensor shake_vir);
+ t_state *state, t_commrec *cr, t_nrnb *nrnb,
+ t_forcerec *fr, gmx_localtop_t *top);
void init_md(FILE *fplog,
t_commrec *cr, t_inputrec *ir, const output_env_t oenv,
gmx_mdoutf_t **outf, t_mdebin **mdebin,
tensor force_vir, tensor shake_vir,
rvec mu_tot,
- gmx_bool *bSimAnn, t_vcm **vcm,
- t_state *state, unsigned long Flags);
+ gmx_bool *bSimAnn, t_vcm **vcm, unsigned long Flags);
/* Routine in sim_util.c */
#ifdef __cplusplus
*/
real sum_ekin(t_grpopts *opts, gmx_ekindata_t *ekind, real *dekindlambda,
- gmx_bool bEkinFullStep, gmx_bool bSaveEkinOld, gmx_bool bScaleEkin);
+ gmx_bool bEkinFullStep, gmx_bool bScaleEkin);
/* Sum the group ekins into total ekin and calc temp per group,
* return total temperature.
*/
typedef struct gmx_update *gmx_update_t;
/* Initialize the stochastic dynamics struct */
-gmx_update_t init_update(FILE *fplog, t_inputrec *ir);
+gmx_update_t init_update(t_inputrec *ir);
/* Store the random state from sd in state */
void get_stochd_state(gmx_update_t sd, t_state *state);
void set_deform_reference_box(gmx_update_t upd,
gmx_large_int_t step, matrix box);
-void update_tcouple(FILE *fplog,
- gmx_large_int_t step,
+void update_tcouple(gmx_large_int_t step,
t_inputrec *inputrec,
t_state *state,
gmx_ekindata_t *ekind,
- gmx_wallcycle_t wcycle,
gmx_update_t upd,
t_extmass *MassQ,
t_mdatoms *md
t_state *state,
matrix pcoupl_mu,
matrix M,
- gmx_wallcycle_t wcycle,
- gmx_update_t upd,
gmx_bool bInitStep);
void update_coords(FILE *fplog,
t_fcdata *fcd,
gmx_ekindata_t *ekind,
matrix M,
- gmx_wallcycle_t wcycle,
gmx_update_t upd,
gmx_bool bInitStep,
int bUpdatePart,
rvec force[], /* forces on home particles */
t_idef *idef,
tensor vir_part,
- tensor vir,
t_commrec *cr,
t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
gmx_update_t upd,
gmx_constr_t constr,
- gmx_bool bInitStep,
gmx_bool bFirstHalf,
gmx_bool bCalcVir,
real vetanew);
t_inputrec *inputrec, /* input record and box stuff */
t_mdatoms *md,
t_state *state,
- t_graph *graph,
rvec force[], /* forces on home particles */
matrix *scale_tot,
matrix pcoupl_mu,
t_nrnb *nrnb,
- gmx_wallcycle_t wcycle,
- gmx_update_t upd,
- gmx_bool bInitStep,
- gmx_bool bFirstHalf);
+ gmx_update_t upd);
/* Return TRUE if OK, FALSE in case of Shake Error */
void calc_ke_part(t_state *state, t_grpopts *opts, t_mdatoms *md,
t_vcm *init_vcm(FILE *fp, gmx_groups_t *groups, t_inputrec *ir);
/* Do a per group center of mass things */
-void calc_vcm_grp(FILE *fp, int start, int homenr, t_mdatoms *md,
+void calc_vcm_grp(int start, int homenr, t_mdatoms *md,
rvec x[], rvec v[], t_vcm *vcm);
-void do_stopcm_grp(FILE *fp, int start, int homenr,
+void do_stopcm_grp(int start, int homenr,
unsigned short *group_id,
rvec x[], rvec v[], t_vcm *vcm);
int th_ind_nalloc; /* Size of th_ind */
} gmx_vsite_t;
-void construct_vsites(FILE *log, gmx_vsite_t *vsite,
- rvec x[], t_nrnb *nrnb,
+void construct_vsites(gmx_vsite_t *vsite,
+ rvec x[],
real dt, rvec v[],
t_iparams ip[], t_ilist ilist[],
int ePBC, gmx_bool bMolPBC, t_graph *graph,
* for the integration, they are only useful for analysis.
*/
-void construct_vsites_mtop(FILE *log, gmx_vsite_t *vsite,
+void construct_vsites_mtop(gmx_vsite_t *vsite,
gmx_mtop_t *mtop, rvec x[]);
/* Create positions of vsite atoms based on surrounding atoms
* for the whole system.
* This function assumes that all molecules are whole.
*/
-void spread_vsite_f(FILE *log, gmx_vsite_t *vsite,
+void spread_vsite_f(gmx_vsite_t *vsite,
rvec x[], rvec f[], rvec *fshift,
gmx_bool VirCorr, matrix vir,
t_nrnb *nrnb, t_idef *idef,
}
void
-update_adress_weights_com(FILE * fplog,
+update_adress_weights_com(FILE gmx_unused * fplog,
int cg0,
int cg1,
t_block * cgs,
vir[ZZ] -= 0.5*dvz;
}
-void calc_vir(FILE *log, int nxf, rvec x[], rvec f[], tensor vir,
+void calc_vir(int nxf, rvec x[], rvec f[], tensor vir,
gmx_bool bScrewPBC, matrix box)
{
int i, isx;
upd_vir(vir[ZZ], dvzx, dvzy, dvzz);
}
-void f_calc_vir(FILE *log, int i0, int i1, rvec x[], rvec f[], tensor vir,
+void f_calc_vir(int i0, int i1, rvec x[], rvec f[], tensor vir,
t_graph *g, matrix box)
{
int start, end;
*/
if (start > i0)
{
- calc_vir(log, start-i0, x + i0, f + i0, vir, FALSE, box);
+ calc_vir(start-i0, x + i0, f + i0, vir, FALSE, box);
}
if (end < i1)
{
- calc_vir(log, i1-end, x + end, f + end, vir, FALSE, box);
+ calc_vir(i1-end, x + end, f + end, vir, FALSE, box);
}
}
else
{
- calc_vir(log, i1-i0, x + i0, f + i0, vir, FALSE, box);
+ calc_vir(i1-i0, x + i0, f + i0, vir, FALSE, box);
}
}
*imax = im;
}
-static void dump_conf(gmx_domdec_t *dd, struct gmx_lincsdata *li,
- t_blocka *at2con,
- char *name, gmx_bool bAll, rvec *x, matrix box)
-{
- char str[STRLEN];
- FILE *fp;
- int ac0, ac1, i;
-
- dd_get_constraint_range(dd, &ac0, &ac1);
-
- sprintf(str, "%s_%d_%d_%d.pdb", name, dd->ci[XX], dd->ci[YY], dd->ci[ZZ]);
- fp = gmx_fio_fopen(str, "w");
- fprintf(fp, "CRYST1%9.3f%9.3f%9.3f%7.2f%7.2f%7.2f P 1 1\n",
- 10*norm(box[XX]), 10*norm(box[YY]), 10*norm(box[ZZ]),
- 90.0, 90.0, 90.0);
- for (i = 0; i < ac1; i++)
- {
- if (i < dd->nat_home || (bAll && i >= ac0 && i < ac1))
- {
- fprintf(fp, "%-6s%5u %-4.4s%3.3s %c%4d %8.3f%8.3f%8.3f%6.2f%6.2f\n",
- "ATOM", ddglatnr(dd, i), "C", "ALA", ' ', i+1,
- 10*x[i][XX], 10*x[i][YY], 10*x[i][ZZ],
- 1.0, i < dd->nat_tot ? 0.0 : 1.0);
- }
- }
- if (bAll)
- {
- for (i = 0; i < li->nc; i++)
- {
- fprintf(fp, "CONECT%5d%5d\n",
- ddglatnr(dd, li->bla[2*i]),
- ddglatnr(dd, li->bla[2*i+1]));
- }
- }
- gmx_fio_fclose(fp);
-}
-
gmx_bool constrain_lincs(FILE *fplog, gmx_bool bLog, gmx_bool bEner,
t_inputrec *ir,
gmx_large_int_t step,
{
case (econqCoord):
bOK = bshakef(fplog, constr->shaked,
- homenr, md->invmass, constr->nblocks, constr->sblock,
+ md->invmass, constr->nblocks, constr->sblock,
idef, ir, x, xprime, nrnb,
constr->lagr, lambda, dvdlambda,
invdt, v, vir != NULL, vir_r_m_dr,
break;
case (econqVeloc):
bOK = bshakef(fplog, constr->shaked,
- homenr, md->invmass, constr->nblocks, constr->sblock,
+ md->invmass, constr->nblocks, constr->sblock,
idef, ir, x, min_proj, nrnb,
constr->lagr, lambda, dvdlambda,
invdt, NULL, vir != NULL, vir_r_m_dr,
if (start_th >= 0 && end_th - start_th > 0)
{
- settle_proj(fplog, constr->settled, econq,
+ settle_proj(constr->settled, econq,
end_th-start_th,
settle->iatoms+start_th*(1+NRAL(F_SETTLE)),
pbc_null,
}
}
-static real constr_r_max_moltype(FILE *fplog,
- gmx_moltype_t *molt, t_iparams *iparams,
+static real constr_r_max_moltype(gmx_moltype_t *molt, t_iparams *iparams,
t_inputrec *ir)
{
int natoms, nflexcon, *path, at, count;
for (mt = 0; mt < mtop->nmoltype; mt++)
{
rmax = max(rmax,
- constr_r_max_moltype(fplog, &mtop->moltype[mt],
+ constr_r_max_moltype(&mtop->moltype[mt],
mtop->ffparams.iparams, ir));
}
#endif
-void settle_proj(FILE *fp,
- gmx_settledata_t settled, int econq,
+void settle_proj(gmx_settledata_t settled, int econq,
int nsettle, t_iatom iatoms[],
const t_pbc *pbc,
rvec x[],
static void dd_redistribute_cg(FILE *fplog, gmx_large_int_t step,
gmx_domdec_t *dd, ivec tric_dir,
t_state *state, rvec **f,
- t_forcerec *fr, t_mdatoms *md,
+ t_forcerec *fr,
gmx_bool bCompact,
t_nrnb *nrnb,
int *ncg_stay_home,
{
if (MASTER(cr))
{
- dd_bonded_cg_distance(fplog, dd, mtop, ir, x, box,
+ dd_bonded_cg_distance(fplog, mtop, ir, x, box,
Flags & MD_DDBONDCHECK, &r_2b, &r_mb);
}
gmx_bcast(sizeof(r_2b), &r_2b, cr);
limit = dd_choose_grid(fplog, cr, dd, ir, mtop, box, ddbox,
comm->eDLB != edlbNO, dlb_scale,
comm->cellsize_limit, comm->cutoff,
- comm->bInterCGBondeds, comm->bInterCGMultiBody);
+ comm->bInterCGBondeds);
if (dd->nc[XX] == 0)
{
void dd_init_bondeds(FILE *fplog,
gmx_domdec_t *dd, gmx_mtop_t *mtop,
- gmx_vsite_t *vsite, gmx_constr_t constr,
+ gmx_vsite_t *vsite,
t_inputrec *ir, gmx_bool bBCheck, cginfo_mb_t *cginfo_mb)
{
gmx_domdec_comm_t *comm;
gmx_bool bBondComm;
int d;
- dd_make_reverse_top(fplog, dd, mtop, vsite, constr, ir, bBCheck);
+ dd_make_reverse_top(fplog, dd, mtop, vsite, ir, bBCheck);
comm = dd->comm;
}
void set_dd_parameters(FILE *fplog, gmx_domdec_t *dd, real dlb_scale,
- t_inputrec *ir, t_forcerec *fr,
- gmx_ddbox_t *ddbox)
+ t_inputrec *ir, gmx_ddbox_t *ddbox)
{
gmx_domdec_comm_t *comm;
int natoms_tot;
return ncg_new;
}
-static void dd_sort_state(gmx_domdec_t *dd, int ePBC,
- rvec *cgcm, t_forcerec *fr, t_state *state,
+static void dd_sort_state(gmx_domdec_t *dd, rvec *cgcm, t_forcerec *fr, t_state *state,
int ncg_home_old)
{
gmx_domdec_sort_t *sort;
wallcycle_sub_start(wcycle, ewcsDD_REDIST);
dd_redistribute_cg(fplog, step, dd, ddbox.tric_dir,
- state_local, f, fr, mdatoms,
+ state_local, f, fr,
!bSortCG, nrnb, &ncgindex_set, &ncg_moved);
wallcycle_sub_stop(wcycle, ewcsDD_REDIST);
{
case ecutsGROUP:
copy_ivec(fr->ns.grid->n, ncells_old);
- grid_first(fplog, fr->ns.grid, dd, &ddbox, fr->ePBC,
+ grid_first(fplog, fr->ns.grid, dd, &ddbox,
state_local->box, cell_ns_x0, cell_ns_x1,
fr->rlistlong, grid_density);
break;
nbnxn_get_ncells(fr->nbv->nbs, &ncells_new[XX], &ncells_new[YY]);
break;
case ecutsGROUP:
- fill_grid(fplog, &comm->zones, fr->ns.grid, dd->ncg_home,
+ fill_grid(&comm->zones, fr->ns.grid, dd->ncg_home,
0, dd->ncg_home, fr->cg_cm);
copy_ivec(fr->ns.grid->n, ncells_new);
fprintf(debug, "Step %s, sorting the %d home charge groups\n",
gmx_step_str(step, sbuf), dd->ncg_home);
}
- dd_sort_state(dd, ir->ePBC, fr->cg_cm, fr, state_local,
+ dd_sort_state(dd, fr->cg_cm, fr, state_local,
bResortAll ? -1 : ncg_home_old);
/* Rebuild all the indices */
ga2la_clear(dd->ga2la);
{
np[dd->dim[i]] = comm->cd[i].np;
}
- dd_make_local_top(fplog, dd, &comm->zones, dd->npbcdim, state_local->box,
+ dd_make_local_top(dd, &comm->zones, dd->npbcdim, state_local->box,
comm->cellsize_min, np,
fr,
fr->cutoff_scheme == ecutsGROUP ? fr->cg_cm : state_local->x,
}
void init_domdec_constraints(gmx_domdec_t *dd,
- gmx_mtop_t *mtop,
- gmx_constr_t constr)
+ gmx_mtop_t *mtop)
{
gmx_domdec_constraints_t *dc;
gmx_molblock_t *molb;
return ((double)npme/(double)nnodes > 0.95*ratio);
}
-static gmx_bool fits_pp_pme_perf(FILE *fplog,
- t_inputrec *ir, matrix box, gmx_mtop_t *mtop,
- int nnodes, int npme, float ratio)
+static gmx_bool fits_pp_pme_perf(int nnodes, int npme, float ratio)
{
int ndiv, *div, *mdiv, ldiv;
int npp_root3, npme_root2;
/* Note that fits_perf might change the PME grid,
* in the current implementation it does not.
*/
- if (fits_pp_pme_perf(fplog, ir, box, mtop, nnodes, npme, ratio))
+ if (fits_pp_pme_perf(nnodes, npme, ratio))
{
break;
}
while (npme <= nnodes/2)
{
/* Note that fits_perf may change the PME grid */
- if (fits_pp_pme_perf(fplog, ir, box, mtop, nnodes, npme, ratio))
+ if (fits_pp_pme_perf(nnodes, npme, ratio))
{
break;
}
return comm_vol;
}
-static float comm_cost_est(gmx_domdec_t *dd, real limit, real cutoff,
+static float comm_cost_est(real limit, real cutoff,
matrix box, gmx_ddbox_t *ddbox,
int natoms, t_inputrec *ir,
float pbcdxr,
if (ndiv == 0)
{
- ce = comm_cost_est(dd, limit, cutoff, box, ddbox,
+ ce = comm_cost_est(limit, cutoff, box, ddbox,
natoms, ir, pbcdxr, npme, ir_try);
if (ce >= 0 && (opt[XX] == 0 ||
- ce < comm_cost_est(dd, limit, cutoff, box, ddbox,
+ ce < comm_cost_est(limit, cutoff, box, ddbox,
natoms, ir, pbcdxr,
npme, opt)))
{
t_inputrec *ir,
gmx_domdec_t *dd,
real cellsize_limit, real cutoff,
- gmx_bool bInterCGBondeds, gmx_bool bInterCGMultiBody,
+ gmx_bool bInterCGBondeds,
ivec nc)
{
int npp, npme, ndiv, *div, *mdiv, d, nmax;
gmx_mtop_t *mtop, matrix box, gmx_ddbox_t *ddbox,
gmx_bool bDynLoadBal, real dlb_scale,
real cellsize_limit, real cutoff_dd,
- gmx_bool bInterCGBondeds, gmx_bool bInterCGMultiBody)
+ gmx_bool bInterCGBondeds)
{
gmx_large_int_t nnodes_div, ldiv;
real limit;
bDynLoadBal, dlb_scale,
mtop, box, ddbox, ir, dd,
cellsize_limit, cutoff_dd,
- bInterCGBondeds, bInterCGMultiBody,
+ bInterCGBondeds,
dd->nc);
}
else
void dd_make_reverse_top(FILE *fplog,
gmx_domdec_t *dd, gmx_mtop_t *mtop,
- gmx_vsite_t *vsite, gmx_constr_t constr,
+ gmx_vsite_t *vsite,
t_inputrec *ir, gmx_bool bBCheck)
{
int mb, n_recursive_vsite, nexcl, nexcl_icg, a;
if (dd->bInterCGcons || dd->bInterCGsettles)
{
- init_domdec_constraints(dd, mtop, constr);
+ init_domdec_constraints(dd, mtop);
}
if (fplog)
{
real rc2,
int *la2lc, t_pbc *pbc_null, rvec *cg_cm,
const t_iparams *ip_in,
- t_idef *idef, gmx_vsite_t *vsite,
+ t_idef *idef,
int **vsite_pbc,
int *vsite_pbc_nalloc,
int iz, int nzone,
bRCheckMB, rcheck, bRCheck2B, rc2,
la2lc, pbc_null, cg_cm, idef->iparams,
idef_t,
- vsite, vsite_pbc, vsite_pbc_nalloc,
+ vsite_pbc, vsite_pbc_nalloc,
iz, zones->n,
dd->cgindex[cg0t], dd->cgindex[cg1t]);
lcgs->index = dd->cgindex;
}
-void dd_make_local_top(FILE *fplog,
- gmx_domdec_t *dd, gmx_domdec_zones_t *zones,
+void dd_make_local_top(gmx_domdec_t *dd, gmx_domdec_zones_t *zones,
int npbcdim, matrix box,
rvec cellsize_min, ivec npulse,
t_forcerec *fr,
if (vsite)
{
- construct_vsites(NULL, vsite, xs, NULL, 0.0, NULL,
+ construct_vsites(vsite, xs, 0.0, NULL,
ffparams->iparams, molt->ilist,
epbcNONE, TRUE, NULL, NULL, NULL);
}
}
void dd_bonded_cg_distance(FILE *fplog,
- gmx_domdec_t *dd, gmx_mtop_t *mtop,
+ gmx_mtop_t *mtop,
t_inputrec *ir, rvec *x, matrix box,
gmx_bool bBCheck,
real *r_2b, real *r_mb)
-real do_ewald(FILE *log, gmx_bool bVerbose,
- t_inputrec *ir,
+real do_ewald(t_inputrec *ir,
rvec x[], rvec f[],
real chargeA[], real chargeB[],
rvec box,
return FALSE;
}
-static int ChooseNewLambda(FILE *log, int nlim, t_expanded *expand, df_history_t *dfhist, int fep_state, real *weighted_lamee, real *p_k, gmx_rng_t rng)
+static int ChooseNewLambda(int nlim, t_expanded *expand, df_history_t *dfhist, int fep_state, real *weighted_lamee, real *p_k, gmx_rng_t rng)
{
/* Choose new lambda value, and update transition matrix */
}
}
- lamnew = ChooseNewLambda(log, nlim, expand, dfhist, nlam, weighted_lamee, p_k, mcrng);
+ lamnew = ChooseNewLambda(nlim, expand, dfhist, nlam, weighted_lamee, p_k, mcrng);
/* if using simulated tempering, we need to adjust the temperatures */
if (ir->bSimTemp && (lamnew != nlam)) /* only need to change the temperatures if we change the state */
{
void ns(FILE *fp,
t_forcerec *fr,
- rvec x[],
matrix box,
gmx_groups_t *groups,
- t_grpopts *opts,
gmx_localtop_t *top,
t_mdatoms *md,
t_commrec *cr,
t_nrnb *nrnb,
- real *lambda,
- real *dvdlambda,
- gmx_grppairener_t *grppener,
gmx_bool bFillGrid,
gmx_bool bDoLongRangeNS)
{
fr->nlr = 0;
}
- nsearch = search_neighbours(fp, fr, x, box, top, groups, cr, nrnb, md,
- lambda, dvdlambda, grppener,
- bFillGrid, bDoLongRangeNS, TRUE);
+ nsearch = search_neighbours(fp, fr, box, top, groups, cr, nrnb, md,
+ bFillGrid, bDoLongRangeNS);
if (debug)
{
fprintf(debug, "nsearch = %d\n", nsearch);
t_idef *idef, t_commrec *cr,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
t_mdatoms *md,
- t_grpopts *opts,
rvec x[], history_t *hist,
rvec f[],
rvec f_longrange[],
gmx_enerdata_t *enerd,
t_fcdata *fcd,
- gmx_mtop_t *mtop,
gmx_localtop_t *top,
gmx_genborn_t *born,
t_atomtypes *atype,
/* do QMMM first if requested */
if (fr->bQMMM)
{
- enerd->term[F_EQM] = calculate_QMMM(cr, x, f, fr, md);
+ enerd->term[F_EQM] = calculate_QMMM(cr, x, f, fr);
}
if (bSepDVDL)
if (bBornRadii)
{
- calc_gb_rad(cr, fr, ir, top, atype, x, &(fr->gblist), born, md, nrnb);
+ calc_gb_rad(cr, fr, ir, top, x, &(fr->gblist), born, md, nrnb);
}
wallcycle_sub_stop(wcycle, ewcsNONBONDED);
}
wallcycle_sub_start(wcycle, ewcsNONBONDED);
- do_nonbonded(cr, fr, x, f, f_longrange, md, excl,
- &enerd->grpp, box_size, nrnb,
+ do_nonbonded(fr, x, f, f_longrange, md, excl,
+ &enerd->grpp, nrnb,
lambda, dvdl_nb, -1, -1, donb_flags);
/* If we do foreign lambda and we have soft-core interactions
lam_i[j] = (i == 0 ? lambda[j] : fepvals->all_lambda[j][i-1]);
}
reset_foreign_enerdata(enerd);
- do_nonbonded(cr, fr, x, f, f_longrange, md, excl,
- &(enerd->foreign_grpp), box_size, nrnb,
+ do_nonbonded(fr, x, f, f_longrange, md, excl,
+ &(enerd->foreign_grpp), nrnb,
lam_i, dvdl_dum, -1, -1,
(donb_flags & ~GMX_NONBONDED_DO_FORCE) | GMX_NONBONDED_DO_FOREIGNLAMBDA);
- sum_epot(&ir->opts, &(enerd->foreign_grpp), enerd->foreign_term);
+ sum_epot(&(enerd->foreign_grpp), enerd->foreign_term);
enerd->enerpart_lambda[i] += enerd->foreign_term[F_EPOT];
}
}
if (ir->implicit_solvent)
{
wallcycle_sub_start(wcycle, ewcsBONDED);
- calc_gb_forces(cr, md, born, top, atype, x, f, fr, idef,
- ir->gb_algorithm, ir->sa_algorithm, nrnb, bBornRadii, &pbc, graph, enerd);
+ calc_gb_forces(cr, md, born, top, x, f, fr, idef,
+ ir->gb_algorithm, ir->sa_algorithm, nrnb, &pbc, graph, enerd);
wallcycle_sub_stop(wcycle, ewcsBONDED);
}
}
calc_bonds_lambda(fplog, idef, x, fr, &pbc, graph, &(enerd->foreign_grpp), enerd->foreign_term, nrnb, lam_i, md,
fcd, DOMAINDECOMP(cr) ? cr->dd->gatindex : NULL);
- sum_epot(&ir->opts, &(enerd->foreign_grpp), enerd->foreign_term);
+ sum_epot(&(enerd->foreign_grpp), enerd->foreign_term);
enerd->enerpart_lambda[i] += enerd->foreign_term[F_EPOT];
}
}
}
break;
case eelEWALD:
- Vlr = do_ewald(fplog, FALSE, ir, x, fr->f_novirsum,
+ Vlr = do_ewald(ir, x, fr->f_novirsum,
md->chargeA, md->chargeB,
box_size, cr, md->homenr,
fr->vir_el_recip, fr->ewaldcoeff,
{
dvdl = 0;
enerd->term[F_RF_EXCL] =
- RF_excl_correction(fplog, fr, graph, md, excl, x, f,
+ RF_excl_correction(fr, graph, md, excl, x, f,
fr->fshift, &pbc, lambda[efptCOUL], &dvdl);
}
return t;
}
-void sum_epot(t_grpopts *opts, gmx_grppairener_t *grpp, real *epot)
+void sum_epot(gmx_grppairener_t *grpp, real *epot)
{
int i;
enerd->term[F_DVDL_CONSTR] = 0;
for (i = 0; i < fepvals->n_lambda; i++)
- { /* note we are iterating over fepvals here!
- For the current lam, dlam = 0 automatically,
- so we don't need to add anything to the
- enerd->enerpart_lambda[0] */
+ {
+ /* note we are iterating over fepvals here!
+ For the current lam, dlam = 0 automatically,
+ so we don't need to add anything to the
+ enerd->enerpart_lambda[0] */
/* we don't need to worry about dvdl_lin contributions to dE at
current lambda, because the contributions to the current
}
}
-void reset_enerdata(t_grpopts *opts,
- t_forcerec *fr, gmx_bool bNS,
+void reset_enerdata(t_forcerec *fr, gmx_bool bNS,
gmx_enerdata_t *enerd,
gmx_bool bMaster)
{
}
}
-void update_forcerec(FILE *log, t_forcerec *fr, matrix box)
+void update_forcerec(t_forcerec *fr, matrix box)
{
if (fr->eeltype == eelGRF)
{
}
-gmx_bool can_use_allvsall(const t_inputrec *ir, const gmx_mtop_t *mtop,
- gmx_bool bPrintNote, t_commrec *cr, FILE *fp)
+gmx_bool can_use_allvsall(const t_inputrec *ir, gmx_bool bPrintNote, t_commrec *cr, FILE *fp)
{
gmx_bool bAllvsAll;
}
-static void pick_nbnxn_kernel_cpu(FILE *fp,
- const t_commrec *cr,
- const gmx_cpuid_t cpuid_info,
- const t_inputrec *ir,
- int *kernel_type,
- int *ewald_excl)
+static void pick_nbnxn_kernel_cpu(const t_inputrec gmx_unused *ir,
+ int *kernel_type,
+ int *ewald_excl)
{
*kernel_type = nbnxnk4x4_PlainC;
*ewald_excl = ewaldexclTable;
static void pick_nbnxn_kernel(FILE *fp,
const t_commrec *cr,
- const gmx_hw_info_t *hwinfo,
gmx_bool use_cpu_acceleration,
gmx_bool bUseGPU,
gmx_bool bEmulateGPU,
{
if (use_cpu_acceleration)
{
- pick_nbnxn_kernel_cpu(fp, cr, hwinfo->cpuid_info, ir,
- kernel_type, ewald_excl);
+ pick_nbnxn_kernel_cpu(ir, kernel_type, ewald_excl);
}
else
{
}
}
-static void pick_nbnxn_resources(FILE *fp,
- const t_commrec *cr,
+static void pick_nbnxn_resources(const t_commrec *cr,
const gmx_hw_info_t *hwinfo,
gmx_bool bDoNonbonded,
gmx_bool *bUseGPU,
snew(nbv, 1);
- pick_nbnxn_resources(fp, cr, fr->hwinfo,
+ pick_nbnxn_resources(cr, fr->hwinfo,
fr->bNonbonded,
&nbv->bUseGPU,
&bEmulateGPU);
if (i == 0) /* local */
{
- pick_nbnxn_kernel(fp, cr, fr->hwinfo, fr->use_cpu_acceleration,
- nbv->bUseGPU, bEmulateGPU,
- ir,
+ pick_nbnxn_kernel(fp, cr, fr->use_cpu_acceleration,
+ nbv->bUseGPU, bEmulateGPU, ir,
&nbv->grp[i].kernel_type,
&nbv->grp[i].ewald_excl,
fr->bNonbonded);
if (nbpu_opt != NULL && strcmp(nbpu_opt, "gpu_cpu") == 0)
{
/* Use GPU for local, select a CPU kernel for non-local */
- pick_nbnxn_kernel(fp, cr, fr->hwinfo, fr->use_cpu_acceleration,
- FALSE, FALSE,
- ir,
+ pick_nbnxn_kernel(fp, cr, fr->use_cpu_acceleration,
+ FALSE, FALSE, ir,
&nbv->grp[i].kernel_type,
&nbv->grp[i].ewald_excl,
fr->bNonbonded);
const gmx_mtop_t *mtop,
const t_commrec *cr,
matrix box,
- gmx_bool bMolEpot,
const char *tabfn,
const char *tabafn,
const char *tabpfn,
fr->bBHAM = (mtop->ffparams.functype[0] == F_BHAM);
/* Check if we can/should do all-vs-all kernels */
- fr->bAllvsAll = can_use_allvsall(ir, mtop, FALSE, NULL, NULL);
+ fr->bAllvsAll = can_use_allvsall(ir, FALSE, NULL, NULL);
fr->AllvsAll_work = NULL;
fr->AllvsAll_workgb = NULL;
#endif
fr->gbtabr = 100;
- fr->gbtab = make_gb_table(fp, oenv, fr, tabpfn, fr->gbtabscale);
+ fr->gbtab = make_gb_table(oenv, fr);
- init_gb(&fr->born, cr, fr, ir, mtop, ir->rgbradii, ir->gb_algorithm);
+ init_gb(&fr->born, cr, fr, ir, mtop, ir->gb_algorithm);
/* Copy local gb data (for dd, this is done in dd_partition_system) */
if (!DOMAINDECOMP(cr))
fr->timesteps = 0;
/* Initialize neighbor search */
- init_ns(fp, cr, &fr->ns, fr, mtop, box);
+ init_ns(fp, cr, &fr->ns, fr, mtop);
if (cr->duty & DUTY_PP)
{
- gmx_nonbonded_setup(fp, fr, bGenericKernelOnly);
+ gmx_nonbonded_setup(fr, bGenericKernelOnly);
/*
if (ir->bAdress)
{
#define pr_int(fp, i) fprintf((fp), "%s: %d\n",#i, i)
#define pr_bool(fp, b) fprintf((fp), "%s: %s\n",#b, bool_names[b])
-void pr_forcerec(FILE *fp, t_forcerec *fr, t_commrec *cr)
+void pr_forcerec(FILE *fp, t_forcerec *fr)
{
int i;
-int init_gb_still(const t_commrec *cr, t_forcerec *fr,
+int init_gb_still(const t_commrec *cr,
const t_atomtypes *atype, t_idef *idef, t_atoms *atoms,
gmx_genborn_t *born, int natoms)
{
/* Initialize all GB datastructs and compute polarization energies */
int init_gb(gmx_genborn_t **p_born,
const t_commrec *cr, t_forcerec *fr, const t_inputrec *ir,
- const gmx_mtop_t *mtop, real rgbradii, int gb_algorithm)
+ const gmx_mtop_t *mtop, int gb_algorithm)
{
int i, j, m, ai, aj, jj, natoms, nalloc;
real rai, sk, p, doffset;
/* If Still model, initialise the polarisation energies */
if (gb_algorithm == egbSTILL)
{
- init_gb_still(cr, fr, &(mtop->atomtypes), &(localtop->idef), &atoms,
+ init_gb_still(cr, &(mtop->atomtypes), &(localtop->idef), &atoms,
born, natoms);
}
static int
calc_gb_rad_still(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, rvec x[], t_nblist *nl,
+ rvec x[], t_nblist *nl,
gmx_genborn_t *born, t_mdatoms *md)
{
int i, k, n, nj0, nj1, ai, aj, type;
static int
calc_gb_rad_hct(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, rvec x[], t_nblist *nl,
+ rvec x[], t_nblist *nl,
gmx_genborn_t *born, t_mdatoms *md)
{
int i, k, n, ai, aj, nj0, nj1, at0, at1;
static int
calc_gb_rad_obc(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md)
+ rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md)
{
int i, k, ai, aj, nj0, nj1, n, at0, at1;
int shift;
int calc_gb_rad(t_commrec *cr, t_forcerec *fr, t_inputrec *ir, gmx_localtop_t *top,
- const t_atomtypes *atype, rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, t_nrnb *nrnb)
+ rvec x[], t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, t_nrnb *nrnb)
{
real *p;
int cnt;
switch (ir->gb_algorithm)
{
case egbSTILL:
- calc_gb_rad_still(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_still(cr, fr, born->nr, top, x, nl, born, md);
break;
case egbHCT:
- calc_gb_rad_hct(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_hct(cr, fr, born->nr, top, x, nl, born, md);
break;
case egbOBC:
- calc_gb_rad_obc(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_obc(cr, fr, born->nr, top, x, nl, born, md);
break;
default:
case egbSTILL:
if (fr->use_acceleration)
{
- calc_gb_rad_still_sse2_single(cr, fr, born->nr, top, atype, x[0], nl, born);
+ calc_gb_rad_still_sse2_single(cr, fr, born->nr, top, x[0], nl, born);
}
else
{
- calc_gb_rad_still(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_still(cr, fr, born->nr, top, x, nl, born, md);
}
break;
case egbHCT:
if (fr->use_acceleration)
{
- calc_gb_rad_hct_obc_sse2_single(cr, fr, born->nr, top, atype, x[0], nl, born, md, ir->gb_algorithm);
+ calc_gb_rad_hct_obc_sse2_single(cr, fr, born->nr, top, x[0], nl, born, md, ir->gb_algorithm);
}
else
{
- calc_gb_rad_hct(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_hct(cr, fr, born->nr, top, x, nl, born, md);
}
break;
case egbOBC:
if (fr->use_acceleration)
{
- calc_gb_rad_hct_obc_sse2_single(cr, fr, born->nr, top, atype, x[0], nl, born, md, ir->gb_algorithm);
+ calc_gb_rad_hct_obc_sse2_single(cr, fr, born->nr, top, x[0], nl, born, md, ir->gb_algorithm);
}
else
{
- calc_gb_rad_obc(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_obc(cr, fr, born->nr, top, x, nl, born, md);
}
break;
switch (ir->gb_algorithm)
{
case egbSTILL:
- calc_gb_rad_still(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_still(cr, fr, born->nr, top, x, nl, born, md);
break;
case egbHCT:
- calc_gb_rad_hct(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_hct(cr, fr, born->nr, top, x, nl, born, md);
break;
case egbOBC:
- calc_gb_rad_obc(cr, fr, born->nr, top, atype, x, nl, born, md);
+ calc_gb_rad_obc(cr, fr, born->nr, top, x, nl, born, md);
break;
default:
}
real calc_gb_selfcorrections(t_commrec *cr, int natoms,
- real *charge, gmx_genborn_t *born, real *dvda, t_mdatoms *md, double facel)
+ real *charge, gmx_genborn_t *born, real *dvda, double facel)
{
int i, ai, at0, at1;
real rai, e, derb, q, q2, fi, rai_inv, vtot;
}
real calc_gb_nonpolar(t_commrec *cr, t_forcerec *fr, int natoms, gmx_genborn_t *born, gmx_localtop_t *top,
- const t_atomtypes *atype, real *dvda, int gb_algorithm, t_mdatoms *md)
+ real *dvda, t_mdatoms *md)
{
int ai, i, at0, at1;
real e, es, rai, rbi, term, probe, tmp, factor;
real calc_gb_chainrule(int natoms, t_nblist *nl, real *dadx, real *dvda, rvec x[], rvec t[], rvec fshift[],
- rvec shift_vec[], int gb_algorithm, gmx_genborn_t *born, t_mdatoms *md)
+ rvec shift_vec[], int gb_algorithm, gmx_genborn_t *born)
{
int i, k, n, ai, aj, nj0, nj1, n0, n1;
int shift;
void
-calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top, const t_atomtypes *atype,
- rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, int sa_algorithm, t_nrnb *nrnb, gmx_bool bRad,
+calc_gb_forces(t_commrec *cr, t_mdatoms *md, gmx_genborn_t *born, gmx_localtop_t *top,
+ rvec x[], rvec f[], t_forcerec *fr, t_idef *idef, int gb_algorithm, int sa_algorithm, t_nrnb *nrnb,
const t_pbc *pbc, const t_graph *graph, gmx_enerdata_t *enerd)
{
real v = 0;
if (sa_algorithm == esaAPPROX)
{
/* Do a simple ACE type approximation for the non-polar solvation */
- enerd->term[F_NPSOLVATION] += calc_gb_nonpolar(cr, fr, born->nr, born, top, atype, fr->dvda, gb_algorithm, md);
+ enerd->term[F_NPSOLVATION] += calc_gb_nonpolar(cr, fr, born->nr, born, top, fr->dvda, md);
}
/* Calculate the bonded GB-interactions using either table or analytical formula */
fr->invsqrta, fr->dvda, fr->gbtab.data, idef, born->epsilon_r, born->gb_epsilon_solvent, fr->epsfac, pbc_null, graph);
/* Calculate self corrections to the GB energies - currently only A state used! (FIXME) */
- enerd->term[F_GBPOL] += calc_gb_selfcorrections(cr, born->nr, md->chargeA, born, fr->dvda, md, fr->epsfac);
+ enerd->term[F_GBPOL] += calc_gb_selfcorrections(cr, born->nr, md->chargeA, born, fr->dvda,fr->epsfac);
/* If parallel, sum the derivative of the potential w.r.t the born radii */
if (PARTDECOMP(cr))
}
#else
calc_gb_chainrule(fr->natoms_force, &(fr->gblist), fr->dadx, fr->dvda,
- x, f, fr->fshift, fr->shift_vec, gb_algorithm, born, md);
+ x, f, fr->fshift, fr->shift_vec, gb_algorithm, born);
#endif
if (!fr->bAllvsAll)
-int make_gb_nblist(t_commrec *cr, int gb_algorithm, real gbcut,
+int make_gb_nblist(t_commrec *cr, int gb_algorithm,
rvec x[], matrix box,
t_forcerec *fr, t_idef *idef, t_graph *graph, gmx_genborn_t *born)
{
int
calc_gb_rad_still_sse2_double(t_commrec *cr, t_forcerec *fr,
int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, double *x, t_nblist *nl,
+ double *x, t_nblist *nl,
gmx_genborn_t *born)
{
int i, k, n, ii, is3, ii3, nj0, nj1, offset;
int
calc_gb_rad_hct_obc_sse2_double(t_commrec *cr, t_forcerec * fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, double *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm)
+ double *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm)
{
int i, ai, k, n, ii, ii3, is3, nj0, nj1, at0, at1, offset;
int jnrA, jnrB;
int
calc_gb_rad_still_sse2_double(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, double *x, t_nblist *nl, gmx_genborn_t *born);
+ double *x, t_nblist *nl, gmx_genborn_t *born);
int
calc_gb_chainrule_sse2_double(int natoms, t_nblist *nl, double *dadx, double *dvda, double *xd, double *f,
int
calc_gb_rad_hct_obc_sse2_double(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, double *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
+ double *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
int
calc_gb_rad_still_sse2_single(t_commrec *cr, t_forcerec *fr,
int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, float *x, t_nblist *nl,
+ float *x, t_nblist *nl,
gmx_genborn_t *born)
{
int i, k, n, ii, is3, ii3, nj0, nj1, offset;
int
calc_gb_rad_hct_obc_sse2_single(t_commrec *cr, t_forcerec * fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, float *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm)
+ float *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm)
{
int i, ai, k, n, ii, ii3, is3, nj0, nj1, at0, at1, offset;
int jnrA, jnrB, jnrC, jnrD;
int
calc_gb_rad_still_sse2_single(t_commrec *cr, t_forcerec *fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, float *x, t_nblist *nl, gmx_genborn_t *born);
+ float *x, t_nblist *nl, gmx_genborn_t *born);
int
calc_gb_rad_hct_obc_sse2_single(t_commrec *cr, t_forcerec * fr, int natoms, gmx_localtop_t *top,
- const t_atomtypes *atype, float *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
+ float *x, t_nblist *nl, gmx_genborn_t *born, t_mdatoms *md, int gb_algorithm);
#endif /* _genborn_sse_h */
#define NOT_FINISHED(l1, l2) \
printf("not finished yet: lines %d .. %d in %s\n", l1, l2, __FILE__)
-static char *int_title(const char *title, int nodeid, char buf[], int size)
-{
- sprintf(buf, "%s (%d)", title, nodeid);
-
- return buf;
-}
-
void set_state_entries(t_state *state, const t_inputrec *ir, int nnodes)
{
int nnhpres;
}
-void init_parallel(FILE *log, t_commrec *cr, t_inputrec *inputrec,
+void init_parallel(t_commrec *cr, t_inputrec *inputrec,
gmx_mtop_t *mtop)
{
bcast_ir_mtop(cr, inputrec, mtop);
tensor pres, rvec mu_tot, gmx_constr_t constr,
globsig_t *gs, gmx_bool bInterSimGS,
matrix box, gmx_mtop_t *top_global, real *pcurr,
- int natoms, gmx_bool *bSumEkinhOld, int flags)
+ gmx_bool *bSumEkinhOld, int flags)
{
int i, gsi;
real gs_buf[eglsNR];
/* Calculate center of mass velocity if necessary, also parallellized */
if (bStopCM)
{
- calc_vcm_grp(fplog, mdatoms->start, mdatoms->homenr, mdatoms,
+ calc_vcm_grp(mdatoms->start, mdatoms->homenr, mdatoms,
state->x, state->v, vcm);
}
if (bStopCM)
{
check_cm_grp(fplog, vcm, ir, 1);
- do_stopcm_grp(fplog, mdatoms->start, mdatoms->homenr, mdatoms->cVCM,
+ do_stopcm_grp(mdatoms->start, mdatoms->homenr, mdatoms->cVCM,
state->x, state->v, vcm);
inc_nrnb(nrnb, eNR_STOPCM, mdatoms->homenr);
}
If FALSE, we go ahead and erase over it.
*/
enerd->term[F_TEMP] = sum_ekin(&(ir->opts), ekind, &dvdl_ekin,
- bEkinAveVel, bIterate, bScaleEkin);
+ bEkinAveVel, bScaleEkin);
enerd->dvdl_lin[efptMASS] = (double) dvdl_ekin;
enerd->term[F_EKIN] = trace(ekind->ekin);
}
/* Add a value to the delta_h list */
-static void mde_delta_h_add_dh(t_mde_delta_h *dh, double delta_h, double time)
+static void mde_delta_h_add_dh(t_mde_delta_h *dh, double delta_h)
{
if (dh->ndh >= dh->ndhmax)
{
for (i = 0; i < dhc->ndhdl; i++)
{
- mde_delta_h_add_dh(dhc->dh_dhdl+i, dhdl[i], time);
+ mde_delta_h_add_dh(dhc->dh_dhdl+i, dhdl[i]);
}
for (i = 0; i < dhc->nlambda; i++)
{
- mde_delta_h_add_dh(dhc->dh_du+i, foreign_dU[i], time);
+ mde_delta_h_add_dh(dhc->dh_du+i, foreign_dU[i]);
}
if (dhc->dh_pv != NULL)
{
- mde_delta_h_add_dh(dhc->dh_pv, pV, time);
+ mde_delta_h_add_dh(dhc->dh_pv, pV);
}
if (dhc->dh_energy != NULL)
{
- mde_delta_h_add_dh(dhc->dh_energy, energy, time);
+ mde_delta_h_add_dh(dhc->dh_energy, energy);
}
if (dhc->dh_expanded != NULL)
{
- mde_delta_h_add_dh(dhc->dh_expanded, fep_state, time);
+ mde_delta_h_add_dh(dhc->dh_expanded, fep_state);
}
}
wallcycle_start(wcycle, ewcRUN);
}
-static void em_time_end(FILE *fplog, t_commrec *cr, gmx_runtime_t *runtime,
+static void em_time_end(gmx_runtime_t *runtime,
gmx_wallcycle_t wcycle)
{
wallcycle_stop(wcycle, ewcRUN);
calc_shifts(ems->s.box, fr->shift_vec);
}
-static void finish_em(FILE *fplog, t_commrec *cr, gmx_mdoutf_t *outf,
+static void finish_em(t_commrec *cr, gmx_mdoutf_t *outf,
gmx_runtime_t *runtime, gmx_wallcycle_t wcycle)
{
if (!(cr->duty & DUTY_PME))
done_mdoutf(outf);
- em_time_end(fplog, cr, runtime, wcycle);
+ em_time_end(runtime, wcycle);
}
static void swap_em_state(em_state_t *ems1, em_state_t *ems2)
wallcycle_stop(wcycle, ewcDOMDEC);
}
-static void evaluate_energy(FILE *fplog, gmx_bool bVerbose, t_commrec *cr,
- t_state *state_global, gmx_mtop_t *top_global,
+static void evaluate_energy(FILE *fplog, t_commrec *cr,
+ gmx_mtop_t *top_global,
em_state_t *ems, gmx_localtop_t *top,
t_inputrec *inputrec,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
if (vsite)
{
- construct_vsites(fplog, vsite, ems->s.x, nrnb, 1, NULL,
+ construct_vsites(vsite, ems->s.x, 1, NULL,
top->idef.iparams, top->idef.il,
fr->ePBC, fr->bMolPBC, graph, cr, ems->s.box);
}
* We do not unshift, so molecules are always whole in congrad.c
*/
do_force(fplog, cr, inputrec,
- count, nrnb, wcycle, top, top_global, &top_global->groups,
+ count, nrnb, wcycle, top, &top_global->groups,
ems->s.box, ems->s.x, &ems->s.hist,
ems->f, force_vir, mdatoms, enerd, fcd,
ems->s.lambda, graph, fr, vsite, mu_tot, t, NULL, NULL, TRUE,
double do_cg(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact,
- int nstglobalcomm,
+ const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
- int stepout,
+ int gmx_unused stepout,
t_inputrec *inputrec,
gmx_mtop_t *top_global, t_fcdata *fcd,
t_state *state_global,
t_mdatoms *mdatoms,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
- gmx_edsam_t ed,
+ gmx_edsam_t gmx_unused ed,
t_forcerec *fr,
- int repl_ex_nst, int repl_ex_nex, int repl_ex_seed,
- gmx_membed_t membed,
- real cpt_period, real max_hours,
- const char *deviceOptions,
- unsigned long Flags,
+ int gmx_unused repl_ex_nst, int gmx_unused repl_ex_nex, int gmx_unused repl_ex_seed,
+ gmx_membed_t gmx_unused membed,
+ real gmx_unused cpt_period, real gmx_unused max_hours,
+ const char gmx_unused *deviceOptions,
+ unsigned long gmx_unused Flags,
gmx_runtime_t *runtime)
{
const char *CG = "Polak-Ribiere Conjugate Gradients";
/* do_force always puts the charge groups in the box and shifts again
* We do not unshift, so molecules are always whole in congrad.c
*/
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, s_min, top,
+ evaluate_energy(fplog, cr,
+ top_global, s_min, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, -1, TRUE);
neval++;
/* Calculate energy for the trial step */
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, s_c, top,
+ evaluate_energy(fplog, cr,
+ top_global, s_c, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, -1, FALSE);
neval++;
/* Calculate energy for the trial step */
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, s_b, top,
+ evaluate_energy(fplog, cr,
+ top_global, s_b, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, -1, FALSE);
fprintf(fplog, "\nPerformed %d energy evaluations in total.\n", neval);
}
- finish_em(fplog, cr, outf, runtime, wcycle);
+ finish_em(cr, outf, runtime, wcycle);
/* To print the actual number of steps we needed somewhere */
runtime->nsteps_done = step;
double do_lbfgs(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact,
- int nstglobalcomm,
+ const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
- int stepout,
+ int gmx_unused stepout,
t_inputrec *inputrec,
gmx_mtop_t *top_global, t_fcdata *fcd,
t_state *state,
t_mdatoms *mdatoms,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
- gmx_edsam_t ed,
+ gmx_edsam_t gmx_unused ed,
t_forcerec *fr,
- int repl_ex_nst, int repl_ex_nex, int repl_ex_seed,
- gmx_membed_t membed,
- real cpt_period, real max_hours,
- const char *deviceOptions,
- unsigned long Flags,
+ int gmx_unused repl_ex_nst, int gmx_unused repl_ex_nex, int gmx_unused repl_ex_seed,
+ gmx_membed_t gmx_unused membed,
+ real gmx_unused cpt_period, real gmx_unused max_hours,
+ const char gmx_unused *deviceOptions,
+ unsigned long gmx_unused Flags,
gmx_runtime_t *runtime)
{
static const char *LBFGS = "Low-Memory BFGS Minimizer";
if (vsite)
{
- construct_vsites(fplog, vsite, state->x, nrnb, 1, NULL,
+ construct_vsites(vsite, state->x, 1, NULL,
top->idef.iparams, top->idef.il,
fr->ePBC, fr->bMolPBC, graph, cr, state->box);
}
neval++;
ems.s.x = state->x;
ems.f = f;
- evaluate_energy(fplog, bVerbose, cr,
- state, top_global, &ems, top,
+ evaluate_energy(fplog, cr,
+ top_global, &ems, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, -1, TRUE);
/* Calculate energy for the trial step */
ems.s.x = (rvec *)xc;
ems.f = (rvec *)fc;
- evaluate_energy(fplog, bVerbose, cr,
- state, top_global, &ems, top,
+ evaluate_energy(fplog, cr,
+ top_global, &ems, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, step, FALSE);
/* Calculate energy for the trial step */
ems.s.x = (rvec *)xb;
ems.f = (rvec *)fb;
- evaluate_energy(fplog, bVerbose, cr,
- state, top_global, &ems, top,
+ evaluate_energy(fplog, cr,
+ top_global, &ems, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, step, FALSE);
fprintf(fplog, "\nPerformed %d energy evaluations in total.\n", neval);
}
- finish_em(fplog, cr, outf, runtime, wcycle);
+ finish_em(cr, outf, runtime, wcycle);
/* To print the actual number of steps we needed somewhere */
runtime->nsteps_done = step;
double do_steep(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact,
- int nstglobalcomm,
+ const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
- int stepout,
+ int gmx_unused stepout,
t_inputrec *inputrec,
gmx_mtop_t *top_global, t_fcdata *fcd,
t_state *state_global,
t_mdatoms *mdatoms,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
- gmx_edsam_t ed,
+ gmx_edsam_t gmx_unused ed,
t_forcerec *fr,
- int repl_ex_nst, int repl_ex_nex, int repl_ex_seed,
- gmx_membed_t membed,
- real cpt_period, real max_hours,
- const char *deviceOptions,
- unsigned long Flags,
+ int gmx_unused repl_ex_nst, int gmx_unused repl_ex_nex, int gmx_unused repl_ex_seed,
+ gmx_membed_t gmx_unused membed,
+ real gmx_unused cpt_period, real gmx_unused max_hours,
+ const char gmx_unused *deviceOptions,
+ unsigned long gmx_unused Flags,
gmx_runtime_t *runtime)
{
const char *SD = "Steepest Descents";
constr, top, nrnb, wcycle, count);
}
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, s_try, top,
+ evaluate_energy(fplog, cr,
+ top_global, s_try, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, count, count == 0);
s_min->epot, s_min->fmax, s_min->a_fmax, fnormn);
}
- finish_em(fplog, cr, outf, runtime, wcycle);
+ finish_em(cr, outf, runtime, wcycle);
/* To print the actual number of steps we needed somewhere */
inputrec->nsteps = count;
double do_nm(FILE *fplog, t_commrec *cr,
int nfile, const t_filenm fnm[],
- const output_env_t oenv, gmx_bool bVerbose, gmx_bool bCompact,
- int nstglobalcomm,
+ const output_env_t gmx_unused oenv, gmx_bool bVerbose, gmx_bool gmx_unused bCompact,
+ int gmx_unused nstglobalcomm,
gmx_vsite_t *vsite, gmx_constr_t constr,
- int stepout,
+ int gmx_unused stepout,
t_inputrec *inputrec,
gmx_mtop_t *top_global, t_fcdata *fcd,
t_state *state_global,
t_mdatoms *mdatoms,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
- gmx_edsam_t ed,
+ gmx_edsam_t gmx_unused ed,
t_forcerec *fr,
- int repl_ex_nst, int repl_ex_nex, int repl_ex_seed,
- gmx_membed_t membed,
- real cpt_period, real max_hours,
- const char *deviceOptions,
- unsigned long Flags,
+ int gmx_unused repl_ex_nst, int gmx_unused repl_ex_nex, int gmx_unused repl_ex_seed,
+ gmx_membed_t gmx_unused membed,
+ real gmx_unused cpt_period, real gmx_unused max_hours,
+ const char gmx_unused *deviceOptions,
+ unsigned long gmx_unused Flags,
gmx_runtime_t *runtime)
{
const char *NM = "Normal Mode Analysis";
/* Make evaluate_energy do a single node force calculation */
cr->nnodes = 1;
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, state_work, top,
+ evaluate_energy(fplog, cr,
+ top_global, state_work, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, -1, TRUE);
/* Make evaluate_energy do a single node force calculation */
cr->nnodes = 1;
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, state_work, top,
+ evaluate_energy(fplog, cr,
+ top_global, state_work, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, atom*2, FALSE);
state_work->s.x[atom][d] = x_min + der_range;
- evaluate_energy(fplog, bVerbose, cr,
- state_global, top_global, state_work, top,
+ evaluate_energy(fplog, cr,
+ top_global, state_work, top,
inputrec, nrnb, wcycle, gstat,
vsite, constr, fcd, graph, mdatoms, fr,
mu_tot, enerd, vir, pres, atom*2+1, FALSE);
gmx_mtxio_write(ftp2fn(efMTX, nfile, fnm), sz, sz, full_matrix, sparse_matrix);
}
- finish_em(fplog, cr, outf, runtime, wcycle);
+ finish_em(cr, outf, runtime, wcycle);
runtime->nsteps_done = natoms*2;
#include "partdec.h"
void move_rvecs(const t_commrec *cr, gmx_bool bForward, gmx_bool bSum,
- int left, int right, rvec vecs[], rvec buf[],
+ rvec vecs[], rvec buf[],
int shift, t_nrnb *nrnb)
{
int i, j, j0 = 137, j1 = 391;
GMX_LEFT, vecs[index[prev]], HOMENRI(index, prev)*DIM);
}
/* Wait for communication to end */
- gmx_wait(cr, right, left);
+ gmx_wait(cr);
}
/* Backward pulse around the ring, to decreasing NODE number */
GMX_RIGHT, vecs[index[next]], HOMENRI(index, next)*DIM);
}
/* Wait for communication to end */
- gmx_wait(cr, left, right);
+ gmx_wait(cr);
}
/* Actual summation */
}
-void move_reals(const t_commrec *cr, gmx_bool bForward, gmx_bool bSum,
- int left, int right, real reals[], real buf[],
- int shift, t_nrnb *nrnb)
+void move_x(const t_commrec *cr,
+ rvec x[], t_nrnb *nrnb)
{
- int i, j, j0 = 137, j1 = 391;
- int cur, nsum;
- int *index;
-#define next ((cur + 1) % cr->nnodes)
-#define prev ((cur - 1 + cr->nnodes) % cr->nnodes)
-
-#define HOMENRI(ind, i) ((ind)[(i)+1] - (ind)[(i)])
-
- index = pd_index(cr);
-
- if (bSum)
- {
- cur = (cr->nodeid + pd_shift(cr)) % cr->nnodes;
- }
- else
- {
- cur = cr->nodeid;
- }
-
- nsum = 0;
- for (i = 0; (i < shift); i++)
- {
- if (bSum)
- {
- if (bForward)
- {
- j0 = index[prev];
- j1 = index[prev+1];
- }
- else
- {
- j0 = index[next];
- j1 = index[next+1];
- }
- for (j = j0; (j < j1); j++)
- {
- buf[j] = 0.0;
- }
- }
- /* Forward pulse around the ring, to increasing NODE number */
- if (bForward)
- {
- if (bSum)
- {
- gmx_tx_rx_real(cr,
- GMX_RIGHT, reals+index[cur ], HOMENRI(index, cur ),
- GMX_LEFT, buf+index[prev], HOMENRI(index, prev));
- }
- else
- {
- gmx_tx_rx_real(cr,
- GMX_RIGHT, reals+index[cur ], HOMENRI(index, cur ),
- GMX_LEFT, reals+index[prev], HOMENRI(index, prev));
- }
- /* Wait for communication to end */
- gmx_wait(cr, right, left);
- }
- else
- {
- /* Backward pulse around the ring, to decreasing NODE number */
- if (bSum)
- {
- gmx_tx_rx_real(cr,
- GMX_LEFT, reals+index[cur ], HOMENRI(index, cur ),
- GMX_RIGHT, buf+index[next], HOMENRI(index, next));
- }
- else
- {
- gmx_tx_rx_real(cr,
- GMX_LEFT, reals+index[cur ], HOMENRI(index, cur ),
- GMX_RIGHT, reals+index[next], HOMENRI(index, next));
- /* Wait for communication to end */
- }
- gmx_wait(cr, left, right);
- }
-
- /* Actual summation */
- if (bSum)
- {
- for (j = j0; (j < j1); j++)
- {
- reals[j] += buf[j];
- }
- nsum += (j1-j0);
- }
- if (bForward)
- {
- cur = prev;
- }
- else
- {
- cur = next;
- }
- }
-
- if (nsum > 0)
- {
- inc_nrnb(nrnb, eNR_FSUM, nsum/3);
- }
-#undef next
-#undef prev
-}
-
-void move_x(FILE *log, const t_commrec *cr,
- int left, int right, rvec x[],
- t_nrnb *nrnb)
-{
- move_rvecs(cr, FALSE, FALSE, left, right, x, NULL, pd_shift(cr), nrnb);
- move_rvecs(cr, TRUE, FALSE, left, right, x, NULL, pd_bshift(cr), nrnb);
+ move_rvecs(cr, FALSE, FALSE, x, NULL, pd_shift(cr), nrnb);
+ move_rvecs(cr, TRUE, FALSE, x, NULL, pd_bshift(cr), nrnb);
where();
}
-void move_rborn(FILE *log, const t_commrec *cr,
- int left, int right, real rborn[],
- t_nrnb *nrnb)
-{
- move_reals(cr, FALSE, FALSE, left, right, rborn, NULL, pd_shift(cr), nrnb);
- move_reals(cr, TRUE, FALSE, left, right, rborn, NULL, pd_bshift(cr), nrnb);
-
- where();
-}
-void move_f(FILE *log, const t_commrec *cr,
- int left, int right, rvec f[], rvec fadd[],
+void move_f(const t_commrec *cr,
+ rvec f[], rvec fadd[],
t_nrnb *nrnb)
{
- move_rvecs(cr, TRUE, TRUE, left, right, f, fadd, pd_shift(cr), nrnb);
- move_rvecs(cr, FALSE, TRUE, left, right, f, fadd, pd_bshift(cr), nrnb);
+ move_rvecs(cr, TRUE, TRUE, f, fadd, pd_shift(cr), nrnb);
+ move_rvecs(cr, FALSE, TRUE, f, fadd, pd_bshift(cr), nrnb);
where();
}
-void move_gpol(FILE *log, const t_commrec *cr,
- int left, int right, real gpol[], real gpol_add[],
- t_nrnb *nrnb)
-{
- move_reals(cr, TRUE, TRUE, left, right, gpol, gpol_add, pd_shift(cr), nrnb);
- move_reals(cr, FALSE, TRUE, left, right, gpol, gpol_add, pd_bshift(cr), nrnb);
-
- where();
-}
-
-
-void move_cgcm(FILE *log, const t_commrec *cr, rvec cg_cm[])
+void move_cgcm(FILE gmx_unused *log, const t_commrec *cr, rvec cg_cm[])
{
int i, start, nr;
int cur = cr->nodeid;
#ifdef DEBUG
fprintf(log, "move_cgcm: RX start=%d, nr=%d\n", start, nr);
#endif
- gmx_tx_wait(cr, GMX_LEFT);
- gmx_rx_wait(cr, GMX_RIGHT);
+ gmx_tx_wait(cr);
+ gmx_rx_wait(cr);
if (debug)
{
#define NBNXN_CUDA_H
#include "types/nbnxn_cuda_types_ext.h"
+#include "types/simple.h"
#ifdef GMX_GPU
#define FUNC_TERM ;
* The local and non-local interaction calculations are launched in two
* separate streams.
*/
-void nbnxn_cuda_launch_kernel(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_atomdata_t *nbdata,
- int flags,
- int iloc) FUNC_TERM
+void nbnxn_cuda_launch_kernel(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_atomdata_t gmx_unused *nbdata,
+ int gmx_unused flags,
+ int gmx_unused iloc) FUNC_TERM
/*! Launch asynchronously the download of nonbonded forces from the GPU
* (and energies/shift forces if required).
*/
-void nbnxn_cuda_launch_cpyback(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_atomdata_t *nbatom,
- int flags,
- int aloc) FUNC_TERM
+void nbnxn_cuda_launch_cpyback(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_atomdata_t gmx_unused *nbatom,
+ int gmx_unused flags,
+ int gmx_unused aloc) FUNC_TERM
/*! Wait for the asynchronously launched nonbonded calculations and data
* transfers to finish.
*/
-void nbnxn_cuda_wait_gpu(nbnxn_cuda_ptr_t cu_nb,
- const nbnxn_atomdata_t * nbatom,
- int flags, int aloc,
- real *e_lj, real *e_el,
- rvec *fshift) FUNC_TERM
+void nbnxn_cuda_wait_gpu(nbnxn_cuda_ptr_t gmx_unused cu_nb,
+ const nbnxn_atomdata_t gmx_unused *nbatom,
+ int gmx_unused flags,
+ int gmx_unused aloc,
+ real gmx_unused *e_lj,
+ real gmx_unused *e_el,
+ rvec gmx_unused *fshift) FUNC_TERM
#ifdef __cplusplus
}
#endif /* GMX_NBNXN_SIMD_2XNN */
void
-nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t *nbl_list,
- const nbnxn_atomdata_t *nbat,
- const interaction_const_t *ic,
- int ewald_excl,
- rvec *shift_vec,
- int force_flags,
- int clearF,
- real *fshift,
- real *Vc,
- real *Vvdw)
+nbnxn_kernel_simd_2xnn(nbnxn_pairlist_set_t gmx_unused *nbl_list,
+ const nbnxn_atomdata_t gmx_unused *nbat,
+ const interaction_const_t gmx_unused *ic,
+ int gmx_unused ewald_excl,
+ rvec gmx_unused *shift_vec,
+ int gmx_unused force_flags,
+ int gmx_unused clearF,
+ real gmx_unused *fshift,
+ real gmx_unused *Vc,
+ real gmx_unused *Vvdw)
#ifdef GMX_NBNXN_SIMD_2XNN
{
int nnbl;
nbnxn_grid_t *grid,
int dd_zone,
int n, rvec corner0, rvec corner1,
- real atom_density,
- int XFormat)
+ real atom_density)
{
rvec size;
int na_c;
/* Potentially sorts atoms on LJ coefficients !=0 and ==0.
* Also sets interaction flags.
*/
-void sort_on_lj(nbnxn_atomdata_t *nbat, int na_c,
+void sort_on_lj(int na_c,
int a0, int a1, const int *atinfo,
int *order,
int *flags)
if (grid->bSimple)
{
- sort_on_lj(nbat, grid->na_c, a0, a1, atinfo, nbs->a,
+ sort_on_lj(grid->na_c, a0, a1, atinfo, nbs->a,
grid->flags+(a0>>grid->na_c_2log)-grid->cell0);
}
nc_max_grid = set_grid_size_xy(nbs, grid,
dd_zone, n-nmoved, corner0, corner1,
- nbs->grid[0].atom_density,
- nbat->XFormat);
+ nbs->grid[0].atom_density);
nc_max = grid->cell0 + nc_max_grid;
#ifdef NBNXN_SEARCH_BB_SSE
/* SSE code for bb distance for bb format xyz0 */
-static float subc_bb_dist2_sse(int na_c,
- int si, const float *bb_i_ci,
+static float subc_bb_dist2_sse(int si, const float *bb_i_ci,
int csj, const float *bb_j_all)
{
const float *bb_i, *bb_j;
/* Plain C or SSE code for making a pair list of super-cell sci vs scj.
* Checks bounding box distances and possibly atom pair distances.
*/
-static void make_cluster_list_supersub(const nbnxn_search_t nbs,
- const nbnxn_grid_t *gridi,
+static void make_cluster_list_supersub(const nbnxn_grid_t *gridi,
const nbnxn_grid_t *gridj,
nbnxn_pairlist_t *nbl,
int sci, int scj,
}
/* Make a new ci entry at index nbl->nci */
-static void new_ci_entry(nbnxn_pairlist_t *nbl, int ci, int shift, int flags,
- nbnxn_list_work_t *work)
+static void new_ci_entry(nbnxn_pairlist_t *nbl, int ci, int shift, int flags)
{
if (nbl->nci + 1 > nbl->ci_nalloc)
{
}
/* Make a new sci entry at index nbl->nsci */
-static void new_sci_entry(nbnxn_pairlist_t *nbl, int sci, int shift, int flags,
- nbnxn_list_work_t *work)
+static void new_sci_entry(nbnxn_pairlist_t *nbl, int sci, int shift)
{
if (nbl->nsci + 1 > nbl->sci_nalloc)
{
/* Copies PBC shifted i-cell atom coordinates x,y,z to working array */
static void icell_set_x_simple(int ci,
real shx, real shy, real shz,
- int na_c,
+ int gmx_unused na_c,
int stride, const real *x,
nbnxn_list_work_t *work)
{
if (nbl->bSimple)
{
- new_ci_entry(nbl, cell0_i+ci, shift, flags_i[ci],
- nbl->work);
+ new_ci_entry(nbl, cell0_i+ci, shift, flags_i[ci]);
}
else
{
- new_sci_entry(nbl, cell0_i+ci, shift, flags_i[ci],
- nbl->work);
+ new_sci_entry(nbl, cell0_i+ci, shift);
}
#ifndef NBNXN_SHIFT_BACKWARD
check_subcell_list_space_supersub(nbl, cl-cf+1);
for (cj = cf; cj <= cl; cj++)
{
- make_cluster_list_supersub(nbs, gridi, gridj,
+ make_cluster_list_supersub(gridi, gridj,
nbl, ci, cj,
(gridi == gridj && shift == CENTRAL && ci == cj),
nbat->xstride, nbat->x,
static gmx_inline void
icell_set_x_simd_2xnn(int ci,
real shx, real shy, real shz,
- int na_c,
- int stride, const real *x,
+ int gmx_unused na_c,
+ int gmx_unused stride, const real *x,
nbnxn_list_work_t *work)
{
int ia;
InRange = FALSE;
while (!InRange && cjf <= cjl)
{
- d2 = subc_bb_dist2_sse(4, 0, bb_ci, cjf, gridj->bbj);
+ d2 = subc_bb_dist2_sse(0, bb_ci, cjf, gridj->bbj);
*ndistc += 2;
/* Check if the distance is within the distance where
InRange = FALSE;
while (!InRange && cjl > cjf)
{
- d2 = subc_bb_dist2_sse(4, 0, bb_ci, cjl, gridj->bbj);
+ d2 = subc_bb_dist2_sse(0, bb_ci, cjl, gridj->bbj);
*ndistc += 2;
/* Check if the distance is within the distance where
static gmx_inline void
icell_set_x_simd_4xn(int ci,
real shx, real shy, real shz,
- int na_c,
- int stride, const real *x,
+ int gmx_unused na_c,
+ int gmx_unused stride, const real *x,
nbnxn_list_work_t *work)
{
int ia;
InRange = FALSE;
while (!InRange && cjf <= cjl)
{
- d2 = subc_bb_dist2_sse(4, 0, bb_ci, cjf, gridj->bbj);
+ d2 = subc_bb_dist2_sse(0, bb_ci, cjf, gridj->bbj);
*ndistc += 2;
/* Check if the distance is within the distance where
InRange = FALSE;
while (!InRange && cjl > cjf)
{
- d2 = subc_bb_dist2_sse(4, 0, bb_ci, cjl, gridj->bbj);
+ d2 = subc_bb_dist2_sse(0, bb_ci, cjl, gridj->bbj);
*ndistc += 2;
/* Check if the distance is within the distance where
-static inline void new_i_nblist(t_nblist *nlist,
- gmx_bool bLR, atom_id i_atom, int shift, int gid)
+static inline void new_i_nblist(t_nblist *nlist, atom_id i_atom, int shift, int gid)
{
int i, k, nri, nshift;
/* Create new i_atom for each energy group */
if (bDoCoul && bDoVdW)
{
- new_i_nblist(vdwc, bLR, i_atom, shift, gid);
+ new_i_nblist(vdwc, i_atom, shift, gid);
#ifndef DISABLE_WATERWATER_NLIST
- new_i_nblist(vdwc_ww, bLR, i_atom, shift, gid);
+ new_i_nblist(vdwc_ww, i_atom, shift, gid);
#endif
}
if (bDoVdW)
{
- new_i_nblist(vdw, bLR, i_atom, shift, gid);
+ new_i_nblist(vdw, i_atom, shift, gid);
}
if (bDoCoul)
{
- new_i_nblist(coul, bLR, i_atom, shift, gid);
+ new_i_nblist(coul, i_atom, shift, gid);
#ifndef DISABLE_WATERWATER_NLIST
- new_i_nblist(coul_ww, bLR, i_atom, shift, gid);
+ new_i_nblist(coul_ww, i_atom, shift, gid);
#endif
}
/* Loop over the j charge groups */
/* Create new i_atom for each energy group */
if (bDoVdW && bDoCoul)
{
- new_i_nblist(vdwc, bLR, i_atom, shift, gid);
+ new_i_nblist(vdwc, i_atom, shift, gid);
}
if (bDoVdW)
{
- new_i_nblist(vdw, bLR, i_atom, shift, gid);
+ new_i_nblist(vdw, i_atom, shift, gid);
}
if (bDoCoul)
{
- new_i_nblist(coul, bLR, i_atom, shift, gid);
+ new_i_nblist(coul, i_atom, shift, gid);
}
bDoVdW_i = (bDoVdW && bHaveVdW[type[i_atom]]);
bDoCoul_i = (bDoCoul && qi != 0);
/* Create new i_atom for each energy group */
if (bDoVdW && bDoCoul)
{
- new_i_nblist(vdwc, bLR, i_atom, shift, gid);
+ new_i_nblist(vdwc, i_atom, shift, gid);
}
if (bDoVdW)
{
- new_i_nblist(vdw, bLR, i_atom, shift, gid);
+ new_i_nblist(vdw, i_atom, shift, gid);
}
if (bDoCoul)
{
- new_i_nblist(coul, bLR, i_atom, shift, gid);
+ new_i_nblist(coul, i_atom, shift, gid);
}
- new_i_nblist(vdw_free, bLR, i_atom, shift, gid);
- new_i_nblist(coul_free, bLR, i_atom, shift, gid);
- new_i_nblist(vdwc_free, bLR, i_atom, shift, gid);
+ new_i_nblist(vdw_free, i_atom, shift, gid);
+ new_i_nblist(coul_free, i_atom, shift, gid);
+ new_i_nblist(vdwc_free, i_atom, shift, gid);
bDoVdW_i = (bDoVdW &&
(bHaveVdW[type[i_atom]] || bHaveVdW[typeB[i_atom]]));
/* Create new i_atom for each energy group */
if (bDoVdW && bDoCoul)
{
- new_i_nblist(vdwc, bLR, i_atom, shift, gid);
- new_i_nblist(vdwc_adress, bLR, i_atom, shift, gid);
+ new_i_nblist(vdwc, i_atom, shift, gid);
+ new_i_nblist(vdwc_adress, i_atom, shift, gid);
}
if (bDoVdW)
{
- new_i_nblist(vdw, bLR, i_atom, shift, gid);
- new_i_nblist(vdw_adress, bLR, i_atom, shift, gid);
+ new_i_nblist(vdw, i_atom, shift, gid);
+ new_i_nblist(vdw_adress, i_atom, shift, gid);
}
if (bDoCoul)
{
- new_i_nblist(coul, bLR, i_atom, shift, gid);
- new_i_nblist(coul_adress, bLR, i_atom, shift, gid);
+ new_i_nblist(coul, i_atom, shift, gid);
+ new_i_nblist(coul_adress, i_atom, shift, gid);
}
bDoVdW_i = (bDoVdW && bHaveVdW[type[i_atom]]);
bDoCoul_i = (bDoCoul && qi != 0);
}
static void
-put_in_list_qmmm(gmx_bool bHaveVdW[],
- int ngid,
- t_mdatoms * md,
- int icg,
- int jgid,
- int nj,
- atom_id jjcg[],
- atom_id index[],
- t_excl bExcl[],
- int shift,
- t_forcerec * fr,
- gmx_bool bLR,
- gmx_bool bDoVdW,
- gmx_bool bDoCoul,
- int solvent_opt)
+put_in_list_qmmm(gmx_bool gmx_unused bHaveVdW[],
+ int ngid,
+ t_mdatoms gmx_unused * md,
+ int icg,
+ int jgid,
+ int nj,
+ atom_id jjcg[],
+ atom_id index[],
+ t_excl bExcl[],
+ int shift,
+ t_forcerec * fr,
+ gmx_bool bLR,
+ gmx_bool gmx_unused bDoVdW,
+ gmx_bool gmx_unused bDoCoul,
+ int gmx_unused solvent_opt)
{
t_nblist * coul;
int i, j, jcg, igid, gid;
i_atom = i0+i;
gid = GID(igid, jgid, ngid);
/* Create new i_atom for each energy group */
- new_i_nblist(coul, bLR, i_atom, shift, gid);
+ new_i_nblist(coul, i_atom, shift, gid);
/* Loop over the j charge groups */
for (j = 0; j < nj; j++)
}
static void
-put_in_list_cg(gmx_bool bHaveVdW[],
- int ngid,
- t_mdatoms * md,
- int icg,
- int jgid,
- int nj,
- atom_id jjcg[],
- atom_id index[],
- t_excl bExcl[],
- int shift,
- t_forcerec * fr,
- gmx_bool bLR,
- gmx_bool bDoVdW,
- gmx_bool bDoCoul,
- int solvent_opt)
+put_in_list_cg(gmx_bool gmx_unused bHaveVdW[],
+ int ngid,
+ t_mdatoms gmx_unused * md,
+ int icg,
+ int jgid,
+ int nj,
+ atom_id jjcg[],
+ atom_id index[],
+ t_excl bExcl[],
+ int shift,
+ t_forcerec * fr,
+ gmx_bool bLR,
+ gmx_bool gmx_unused bDoVdW,
+ gmx_bool gmx_unused bDoCoul,
+ int gmx_unused solvent_opt)
{
int cginfo;
int igid, gid, nbl_ind;
* If required, zero interactions could be removed here
* or in the force loop.
*/
- new_i_nblist(vdwc, bLR, index[icg], shift, gid);
+ new_i_nblist(vdwc, index[icg], shift, gid);
vdwc->iinr_end[vdwc->nri] = index[icg+1];
for (j = 0; (j < nj); j++)
}
}
-static int nsgrid_core(FILE *log, t_commrec *cr, t_forcerec *fr,
- matrix box, rvec box_size, int ngid,
+static int nsgrid_core(t_commrec *cr, t_forcerec *fr,
+ matrix box, int ngid,
gmx_localtop_t *top,
- t_grid *grid, rvec x[],
+ t_grid *grid,
t_excl bexcl[], gmx_bool *bExcludeAlleg,
- t_nrnb *nrnb, t_mdatoms *md,
- real *lambda, real *dvdlambda,
- gmx_grppairener_t *grppener,
+ t_mdatoms *md,
put_in_list_t *put_in_list,
gmx_bool bHaveVdW[],
gmx_bool bDoLongRange, gmx_bool bMakeQMMMnblist)
void init_ns(FILE *fplog, const t_commrec *cr,
gmx_ns_t *ns, t_forcerec *fr,
- const gmx_mtop_t *mtop,
- matrix box)
+ const gmx_mtop_t *mtop)
{
int mt, icg, nr_in_cg, maxcg, i, j, jcg, ngid, ncg;
t_block *cgs;
int search_neighbours(FILE *log, t_forcerec *fr,
- rvec x[], matrix box,
+ matrix box,
gmx_localtop_t *top,
gmx_groups_t *groups,
t_commrec *cr,
t_nrnb *nrnb, t_mdatoms *md,
- real *lambda, real *dvdlambda,
- gmx_grppairener_t *grppener,
gmx_bool bFillGrid,
- gmx_bool bDoLongRangeNS,
- gmx_bool bPadListsForKernels)
+ gmx_bool bDoLongRangeNS)
{
t_block *cgs = &(top->cgs);
rvec box_size, grid_x0, grid_x1;
get_nsgrid_boundaries(grid->nboundeddim, box, NULL, NULL, NULL, NULL,
cgs->nr, fr->cg_cm, grid_x0, grid_x1, &grid_dens);
- grid_first(log, grid, NULL, NULL, fr->ePBC, box, grid_x0, grid_x1,
+ grid_first(log, grid, NULL, NULL, box, grid_x0, grid_x1,
fr->rlistlong, grid_dens);
}
debug_gmx();
if (DOMAINDECOMP(cr))
{
end = cgs->nr;
- fill_grid(log, dd_zones, grid, end, -1, end, fr->cg_cm);
+ fill_grid(dd_zones, grid, end, -1, end, fr->cg_cm);
grid->icg0 = 0;
grid->icg1 = dd_zones->izone[dd_zones->nizone-1].cg1;
}
else
{
- fill_grid(log, NULL, grid, cgs->nr, fr->cg0, fr->hcg, fr->cg_cm);
+ fill_grid(NULL, grid, cgs->nr, fr->cg0, fr->hcg, fr->cg_cm);
grid->icg0 = fr->cg0;
grid->icg1 = fr->hcg;
debug_gmx();
debug_gmx();
}
- calc_elemnr(log, grid, start, end, cgs->nr);
+ calc_elemnr(grid, start, end, cgs->nr);
calc_ptrs(grid);
- grid_last(log, grid, start, end, cgs->nr);
+ grid_last(grid, start, end, cgs->nr);
if (gmx_debug_at)
{
- check_grid(debug, grid);
+ check_grid(grid);
print_grid(debug, grid);
}
}
/* Set the grid cell index for the test particle only.
* The cell to cg index is not corrected, but that does not matter.
*/
- fill_grid(log, NULL, ns->grid, fr->hcg, fr->hcg-1, fr->hcg, fr->cg_cm);
+ fill_grid(NULL, ns->grid, fr->hcg, fr->hcg-1, fr->hcg, fr->cg_cm);
}
debug_gmx();
if (bGrid)
{
grid = ns->grid;
- nsearch = nsgrid_core(log, cr, fr, box, box_size, ngid, top,
- grid, x, ns->bexcl, ns->bExcludeAlleg,
- nrnb, md, lambda, dvdlambda, grppener,
- put_in_list, ns->bHaveVdW,
+ nsearch = nsgrid_core(cr, fr, box, ngid, top,
+ grid, ns->bexcl, ns->bExcludeAlleg,
+ md, put_in_list, ns->bHaveVdW,
bDoLongRangeNS, FALSE);
/* neighbour searching withouth QMMM! QM atoms have zero charge in
*/
if (fr->bQMMM && fr->qr->QMMMscheme != eQMMMschemeoniom)
{
- nsearch += nsgrid_core(log, cr, fr, box, box_size, ngid, top,
- grid, x, ns->bexcl, ns->bExcludeAlleg,
- nrnb, md, lambda, dvdlambda, grppener,
- put_in_list_qmmm, ns->bHaveVdW,
+ nsearch += nsgrid_core(cr, fr, box, ngid, top,
+ grid, ns->bexcl, ns->bExcludeAlleg,
+ md, put_in_list_qmmm, ns->bHaveVdW,
bDoLongRangeNS, TRUE);
}
}
void grid_first(FILE *fplog, t_grid *grid,
gmx_domdec_t *dd, const gmx_ddbox_t *ddbox,
- int ePBC, matrix box, rvec izones_x0, rvec izones_x1,
+ matrix box, rvec izones_x0, rvec izones_x1,
real rlistlong, real grid_density)
{
int i, m;
}
-void calc_elemnr(FILE *fplog, t_grid *grid, int cg0, int cg1, int ncg)
+void calc_elemnr(t_grid *grid, int cg0, int cg1, int ncg)
{
int CG0[2], CG1[2];
int *cell_index = grid->cell_index;
}
}
-void grid_last(FILE *log, t_grid *grid, int cg0, int cg1, int ncg)
+void grid_last(t_grid *grid, int cg0, int cg1, int ncg)
{
int CG0[2], CG1[2];
int i, m;
}
}
-void fill_grid(FILE *log,
- gmx_domdec_zones_t *dd_zones,
+void fill_grid(gmx_domdec_zones_t *dd_zones,
t_grid *grid, int ncg_tot,
int cg0, int cg1, rvec cg_cm[])
{
}
-void check_grid(FILE *log, t_grid *grid)
+void check_grid(t_grid *grid)
{
int ix, iy, iz, ci, cci, nra;
nr = cgindex[next+1] - start;
gmx_rx(cr, GMX_RIGHT, &(ci[start]), nr*sizeof(*ci));
- gmx_tx_wait(cr, GMX_LEFT);
- gmx_rx_wait(cr, GMX_RIGHT);
+ gmx_tx_wait(cr);
+ gmx_rx_wait(cr);
cur = next;
}
#endif
}
-void gmx_tx_wait(const t_commrec *cr, int dir)
+void gmx_tx_wait(const t_commrec *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_tx_wait");
#endif
}
-void gmx_rx_wait(const t_commrec *cr, int nodeid)
+void gmx_rx_wait(const t_commrec *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_rx_wait");
/*void gmx_wait(int dir_send,int dir_recv)*/
-void gmx_wait(const t_commrec *cr, int dir_send, int dir_recv)
+void gmx_wait(const t_commrec *cr)
{
#ifndef GMX_MPI
gmx_call("gmx_wait");
#else
- gmx_tx_wait(cr, dir_send);
- gmx_rx_wait(cr, dir_recv);
+ gmx_tx_wait(cr);
+ gmx_rx_wait(cr);
#endif
}
void pd_move_f(const t_commrec *cr, rvec f[], t_nrnb *nrnb)
{
- move_f(NULL, cr, GMX_LEFT, GMX_RIGHT, f, cr->pd->vbuf, nrnb);
+ move_f(cr, f, cr->pd->vbuf, nrnb);
}
int *pd_cgindex(const t_commrec *cr)
}
}
-static void select_my_ilist(FILE *log, t_ilist *il, int *multinr, t_commrec *cr)
+static void select_my_ilist(t_ilist *il, int *multinr, t_commrec *cr)
{
t_iatom *ia;
int i, start, end, nr;
il->nr = nr;
}
-static void select_my_idef(FILE *log, t_idef *idef, int **multinr, t_commrec *cr)
+static void select_my_idef(t_idef *idef, int **multinr, t_commrec *cr)
{
int i;
for (i = 0; (i < F_NRE); i++)
{
- select_my_ilist(log, &idef->il[i], multinr[i], cr);
+ select_my_ilist(&idef->il[i], multinr[i], cr);
}
}
/* This should be fine */
/*split_idef(&(top->idef),cr->nnodes-cr->npmenodes);*/
- select_my_idef(log, &(top->idef), multinr_nre, cr);
+ select_my_idef(&(top->idef), multinr_nre, cr);
if (top->idef.il[F_CONSTR].nr > 0)
{
}
}
-static void clear_grid(int nx, int ny, int nz, real *grid,
- ivec fs, int *flag,
- int fx, int fy, int fz,
- int order)
-{
- int nc, ncz;
- int fsx, fsy, fsz, gx, gy, gz, g0x, g0y, x, y, z;
- int flind;
-
- nc = 2 + (order - 2)/FLBS;
- ncz = 2 + (order - 2)/FLBSZ;
-
- for (fsx = fx; fsx < fx+nc; fsx++)
- {
- for (fsy = fy; fsy < fy+nc; fsy++)
- {
- for (fsz = fz; fsz < fz+ncz; fsz++)
- {
- flind = (fsx*fs[YY] + fsy)*fs[ZZ] + fsz;
- if (flag[flind] == 0)
- {
- gx = fsx*FLBS;
- gy = fsy*FLBS;
- gz = fsz*FLBSZ;
- g0x = (gx*ny + gy)*nz + gz;
- for (x = 0; x < FLBS; x++)
- {
- g0y = g0x;
- for (y = 0; y < FLBS; y++)
- {
- for (z = 0; z < FLBSZ; z++)
- {
- grid[g0y+z] = 0;
- }
- g0y += nz;
- }
- g0x += ny*nz;
- }
-
- flag[flind] = 1;
- }
- }
- }
- }
-}
/* This has to be a macro to enable full compiler optimization with xlC (and probably others too) */
#define DO_BSPLINE(order) \
#endif
}
-static void set_gridsize_alignment(int *gridsize, int pme_order)
+static void set_gridsize_alignment(int gmx_unused *gridsize, int gmx_unused pme_order)
{
#ifdef PME_SSE
#ifndef PME_SSE_UNALIGNED
#ifdef PME_SSE
/* Calculate exponentials through SSE in float precision */
-inline static void calc_exponentials(int start, int end, real f, real *d_aligned, real *r_aligned, real *e_aligned)
+inline static void calc_exponentials(int gmx_unused start, int end, real f, real *d_aligned, real *r_aligned, real *e_aligned)
{
{
const __m128 two = _mm_set_ps(2.0f, 2.0f, 2.0f, 2.0f);
return (n1 + n2 + 3*n3)/(double)(6*pme->nkx*pme->nky*pme->nkz);
}
-static void init_atomcomm(gmx_pme_t pme, pme_atomcomm_t *atc, t_commrec *cr,
+static void init_atomcomm(gmx_pme_t pme, pme_atomcomm_t *atc,
int dimind, gmx_bool bSpread)
{
int nk, k, s, thread;
}
/* Use atc[0] for spreading */
- init_atomcomm(pme, &pme->atc[0], cr, nnodes_major > 1 ? 0 : 1, TRUE);
+ init_atomcomm(pme, &pme->atc[0], nnodes_major > 1 ? 0 : 1, TRUE);
if (pme->ndecompdim >= 2)
{
- init_atomcomm(pme, &pme->atc[1], cr, 1, FALSE);
+ init_atomcomm(pme, &pme->atc[1], 1, FALSE);
}
if (pme->nnodes == 1)
}
-static void reset_pmeonly_counters(t_commrec *cr, gmx_wallcycle_t wcycle,
+static void reset_pmeonly_counters(gmx_wallcycle_t wcycle,
t_nrnb *nrnb, t_inputrec *ir,
gmx_large_int_t step)
{
int gmx_pmeonly(gmx_pme_t pme,
t_commrec *cr, t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
- real ewaldcoeff, gmx_bool bGatherOnly,
+ real ewaldcoeff,
t_inputrec *ir)
{
int npmedata;
if (ret == pmerecvqxRESETCOUNTERS)
{
/* Reset the cycle and flop counters */
- reset_pmeonly_counters(cr, wcycle, nrnb, ir, step);
+ reset_pmeonly_counters(wcycle, nrnb, ir, step);
}
}
while (ret == pmerecvqxSWITCHGRID || ret == pmerecvqxRESETCOUNTERS);
/* Apply forces in a mass weighted fashion */
static void apply_forces_grp(t_pullgrp *pgrp, t_mdatoms * md,
- gmx_ga2la_t ga2la,
dvec f_pull, int sign, rvec *f)
{
int i, ii, m, start, end;
}
/* Apply forces in a mass weighted fashion */
-static void apply_forces(t_pull * pull, t_mdatoms * md, gmx_ga2la_t ga2la,
- rvec *f)
+static void apply_forces(t_pull * pull, t_mdatoms * md, rvec *f)
{
int i;
t_pullgrp *pgrp;
for (i = 1; i < pull->ngrp+1; i++)
{
pgrp = &(pull->grp[i]);
- apply_forces_grp(pgrp, md, ga2la, pgrp->f, 1, f);
+ apply_forces_grp(pgrp, md, pgrp->f, 1, f);
if (pull->grp[0].nat)
{
if (PULL_CYL(pull))
{
- apply_forces_grp(&(pull->dyna[i]), md, ga2la, pgrp->f, -1, f);
+ apply_forces_grp(&(pull->dyna[i]), md, pgrp->f, -1, f);
}
else
{
- apply_forces_grp(&(pull->grp[0]), md, ga2la, pgrp->f, -1, f);
+ apply_forces_grp(&(pull->grp[0]), md, pgrp->f, -1, f);
}
}
}
}
/* Apply constraint using SHAKE */
-static void do_constraint(t_pull *pull, t_mdatoms *md, t_pbc *pbc,
+static void do_constraint(t_pull *pull, t_pbc *pbc,
rvec *x, rvec *v,
gmx_bool bMaster, tensor vir,
double dt, double t)
&V, pull->bVirial && MASTER(cr) ? vir : NULL, &dVdl);
/* Distribute forces over pulled groups */
- apply_forces(pull, md, DOMAINDECOMP(cr) ? cr->dd->ga2la : NULL, f);
+ apply_forces(pull, md, f);
if (MASTER(cr))
{
{
pull_calc_coms(cr, pull, md, pbc, t, x, xp);
- do_constraint(pull, md, pbc, xp, v, pull->bVirial && MASTER(cr), vir, dt, t);
+ do_constraint(pull, pbc, xp, v, pull->bVirial && MASTER(cr), vir, dt, t);
}
static void make_local_pull_group(gmx_ga2la_t ga2la,
}
}
-void finish_pull(FILE *fplog, t_pull *pull)
+void finish_pull(t_pull *pull)
{
if (pull->out_x)
{
/* ORCA interface routines */
-void init_orca(t_commrec *cr, t_QMrec *qm, t_MMrec *mm)
+void init_orca(t_QMrec *qm)
{
char *buf;
snew(buf, 200);
}
-void write_orca_input(int step, t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
+void write_orca_input(t_forcerec *fr, t_QMrec *qm, t_MMrec *mm)
{
int i;
t_QMMMrec *QMMMrec;
fclose(out);
} /* write_orca_input */
-real read_orca_output(rvec QMgrad[], rvec MMgrad[], int step, t_forcerec *fr,
+real read_orca_output(rvec QMgrad[], rvec MMgrad[], t_forcerec *fr,
t_QMrec *qm, t_MMrec *mm)
{
int
return(QMener);
}
-void do_orca(int step, char *exe, char *orca_dir, char *basename)
+void do_orca(char *orca_dir, char *basename)
{
/* make the call to the orca binary through system()
}
}
-real call_orca(t_commrec *cr, t_forcerec *fr,
+real call_orca(t_forcerec *fr,
t_QMrec *qm, t_MMrec *mm, rvec f[], rvec fshift[])
{
/* normal orca jobs */
snew(QMgrad, qm->nrQMatoms);
snew(MMgrad, mm->nrMMatoms);
- write_orca_input(step, fr, qm, mm);
- do_orca(step, exe, qm->orca_dir, qm->orca_basename);
- QMener = read_orca_output(QMgrad, MMgrad, step, fr, qm, mm);
+ write_orca_input(fr, qm, mm);
+ do_orca(qm->orca_dir, qm->orca_basename);
+ QMener = read_orca_output(QMgrad, MMgrad, fr, qm, mm);
/* put the QMMM forces in the force array and to the fshift
*/
for (i = 0; i < qm->nrQMatoms; i++)
/* ORCA interface */
void
-init_orca(t_commrec *cr, t_QMrec *qm, t_MMrec *mm);
+init_orca(t_QMrec *qm);
real
-call_orca(t_commrec *cr, t_forcerec *fr, t_QMrec *qm,
+call_orca(t_forcerec *fr, t_QMrec *qm,
t_MMrec *mm, rvec f[], rvec fshift[]);
#endif
} /* QMlayer_comp */
-real call_QMroutine(t_commrec *cr, t_forcerec *fr, t_QMrec *qm,
- t_MMrec *mm, rvec f[], rvec fshift[])
+real call_QMroutine(t_commrec gmx_unused *cr, t_forcerec gmx_unused *fr, t_QMrec gmx_unused *qm,
+ t_MMrec gmx_unused *mm, rvec gmx_unused f[], rvec gmx_unused fshift[])
{
/* makes a call to the requested QM routine (qm->QMmethod)
* Note that f is actually the gradient, i.e. -f
return (QMener);
}
-void init_QMroutine(t_commrec *cr, t_QMrec *qm, t_MMrec *mm)
+void init_QMroutine(t_commrec gmx_unused *cr, t_QMrec gmx_unused *qm, t_MMrec gmx_unused *mm)
{
/* makes a call to the requested QM routine (qm->QMmethod)
*/
#elif defined GMX_QMMM_GAUSSIAN
init_gaussian(cr, qm, mm);
#elif defined GMX_QMMM_ORCA
- init_orca(cr, qm, mm);
+ init_orca(qm);
#else
gmx_fatal(FARGS, "Ab-initio calculation only supported with Gamess, Gaussian or ORCA.");
#endif
} /* mk_QMMMrec */
void init_QMMMrec(t_commrec *cr,
- matrix box,
gmx_mtop_t *mtop,
t_inputrec *ir,
t_forcerec *fr)
real calculate_QMMM(t_commrec *cr,
rvec x[], rvec f[],
- t_forcerec *fr,
- t_mdatoms *md)
+ t_forcerec *fr)
{
real
QMener = 0.0;
#include "copyrite.h"
#include "pbc.h"
-real RF_excl_correction(FILE *log,
- const t_forcerec *fr, t_graph *g,
+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)
}
int vec_shakef(FILE *fplog, gmx_shakedata_t shaked,
- int natoms, real invmass[], int ncon,
+ real invmass[], int ncon,
t_iparams ip[], t_iatom *iatom,
real tol, rvec x[], rvec prime[], real omega,
gmx_bool bFEP, real lambda, real lagr[],
}
gmx_bool bshakef(FILE *log, gmx_shakedata_t shaked,
- int natoms, real invmass[], int nblocks, int sblock[],
+ real invmass[], int nblocks, int sblock[],
t_idef *idef, t_inputrec *ir, rvec x_s[], rvec prime[],
t_nrnb *nrnb, real *lagr, real lambda, real *dvdlambda,
real invdt, rvec *v, gmx_bool bCalcVir, tensor vir_r_m_dr,
{
blen = (sblock[i+1]-sblock[i]);
blen /= 3;
- n0 = vec_shakef(log, shaked, natoms, invmass, blen, idef->iparams,
+ n0 = vec_shakef(log, shaked, invmass, blen, idef->iparams,
iatoms, ir->shake_tol, x_s, prime, shaked->omega,
ir->efep != efepNO, lambda, lam, invdt, v, bCalcVir, vir_r_m_dr,
econq, vetavar);
{
if (ir->efep != efepNO)
{
- real bondA,bondB;
+ real bondA, bondB;
dt_2 = 1/sqr(ir->delta_t);
dvdl = 0;
for (i = 0; i < ncons; i++)
xnew[ZZ] = zo+dz;
}
-static void directional_sd(FILE *log, rvec xold[], rvec xnew[], rvec acc_dir[],
+static void directional_sd(rvec xold[], rvec xnew[], rvec acc_dir[],
int start, int homenr, real step)
{
int i;
}
}
-static void shell_pos_sd(FILE *log, rvec xcur[], rvec xnew[], rvec f[],
+static void shell_pos_sd(rvec xcur[], rvec xnew[], rvec f[],
int ns, t_shell s[], int count)
{
const real step_scale_min = 0.8,
int relax_shell_flexcon(FILE *fplog, t_commrec *cr, gmx_bool bVerbose,
gmx_large_int_t mdstep, t_inputrec *inputrec,
gmx_bool bDoNS, int force_flags,
- gmx_bool bStopCM,
gmx_localtop_t *top,
- gmx_mtop_t* mtop,
gmx_constr_t constr,
gmx_enerdata_t *enerd, t_fcdata *fcd,
t_state *state, rvec f[],
t_forcerec *fr,
gmx_bool bBornRadii,
double t, rvec mu_tot,
- int natoms, gmx_bool *bConverged,
+ gmx_bool *bConverged,
gmx_vsite_t *vsite,
FILE *fp_field)
{
{
pr_rvecs(debug, 0, "x b4 do_force", state->x + start, homenr);
}
- do_force(fplog, cr, inputrec, mdstep, nrnb, wcycle, top, mtop, groups,
+ do_force(fplog, cr, inputrec, mdstep, nrnb, wcycle, top, groups,
state->box, state->x, &state->hist,
force[Min], force_vir, md, enerd, fcd,
state->lambda, graph,
{
if (vsite)
{
- construct_vsites(fplog, vsite, pos[Min], nrnb, inputrec->delta_t, state->v,
+ construct_vsites(vsite, pos[Min], inputrec->delta_t, state->v,
idef->iparams, idef->il,
fr->ePBC, fr->bMolPBC, graph, cr, state->box);
}
x_old-start, state->x, pos[Min], force[Min], acc_dir-start,
fr->bMolPBC, state->box, state->lambda, &dum, nrnb);
- directional_sd(fplog, pos[Min], pos[Try], acc_dir-start, start, end,
+ directional_sd(pos[Min], pos[Try], acc_dir-start, start, end,
fr->fc_stepsize);
}
/* New positions, Steepest descent */
- shell_pos_sd(fplog, pos[Min], pos[Try], force[Min], nshell, shell, count);
+ shell_pos_sd(pos[Min], pos[Try], force[Min], nshell, shell, count);
/* do_force expected the charge groups to be in the box */
if (graph)
}
/* Try the new positions */
do_force(fplog, cr, inputrec, 1, nrnb, wcycle,
- top, mtop, groups, state->box, pos[Try], &state->hist,
+ top, groups, state->box, pos[Try], &state->hist,
force[Try], force_vir,
md, enerd, fcd, state->lambda, graph,
fr, vsite, mu_tot, t, fp_field, NULL, bBornRadii,
#define difftime(end, start) ((double)(end)-(double)(start))
void print_time(FILE *out, gmx_runtime_t *runtime, gmx_large_int_t step,
- t_inputrec *ir, t_commrec *cr)
+ t_inputrec *ir, t_commrec gmx_unused *cr)
{
time_t finish;
char timebuf[STRLEN];
* Solution: implement a self-consitent electric field into PME.
*/
static void calc_f_el(FILE *fp, int start, int homenr,
- real charge[], rvec x[], rvec f[],
+ real charge[], rvec f[],
t_cosines Ex[], t_cosines Et[], double t)
{
rvec Ext;
}
}
-static void calc_virial(FILE *fplog, int start, int homenr, rvec x[], rvec f[],
+static void calc_virial(int start, int homenr, rvec x[], rvec f[],
tensor vir_part, t_graph *graph, matrix box,
t_nrnb *nrnb, const t_forcerec *fr, int ePBC)
{
/* The short-range virial from surrounding boxes */
clear_mat(vir_part);
- calc_vir(fplog, SHIFTS, fr->shift_vec, fr->fshift, vir_part, ePBC == epbcSCREW, box);
+ calc_vir(SHIFTS, fr->shift_vec, fr->fshift, vir_part, ePBC == epbcSCREW, box);
inc_nrnb(nrnb, eNR_VIRIAL, SHIFTS);
/* Calculate partial virial, for local atoms only, based on short range.
* Total virial is computed in global_stat, called from do_md
*/
- f_calc_vir(fplog, start, start+homenr, x, f, vir_part, graph, box);
+ f_calc_vir(start, start+homenr, x, f, vir_part, graph, box);
inc_nrnb(nrnb, eNR_VIRIAL, homenr);
/* Add position restraint contribution */
t_nrnb *nrnb,
gmx_localtop_t *top,
matrix box, rvec x[],
- rvec f[],
gmx_enerdata_t *enerd,
real *lambda,
t_forcerec *fr)
}
}
-static void post_process_forces(FILE *fplog,
- t_commrec *cr,
+static void post_process_forces(t_commrec *cr,
gmx_large_int_t step,
t_nrnb *nrnb, gmx_wallcycle_t wcycle,
gmx_localtop_t *top,
* if the constructing atoms aren't local.
*/
wallcycle_start(wcycle, ewcVSITESPREAD);
- spread_vsite_f(fplog, vsite, x, fr->f_novirsum, NULL,
+ spread_vsite_f(vsite, x, fr->f_novirsum, NULL,
(flags & GMX_FORCE_VIRIAL), fr->vir_el_recip,
nrnb,
&top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
gmx_enerdata_t *enerd,
int flags, int ilocality,
int clearF,
- t_nrnb *nrnb,
- gmx_wallcycle_t wcycle)
+ t_nrnb *nrnb)
{
int nnbl, kernel_type, enr_nbnxn_kernel_ljc, enr_nbnxn_kernel_lj;
char *env;
t_inputrec *inputrec,
gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
gmx_localtop_t *top,
- gmx_mtop_t *mtop,
- gmx_groups_t *groups,
+ gmx_groups_t gmx_unused *groups,
matrix box, rvec x[], history_t *hist,
rvec f[],
tensor vir_force,
if (bStateChanged)
{
- update_forcerec(fplog, fr, box);
+ update_forcerec(fr, box);
if (NEED_MUTOT(*inputrec))
{
wallcycle_start(wcycle, ewcLAUNCH_GPU_NB);
/* launch local nonbonded F on GPU */
do_nb_verlet(fr, ic, enerd, flags, eintLocal, enbvClearFNo,
- nrnb, wcycle);
+ nrnb);
wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
}
wallcycle_start(wcycle, ewcLAUNCH_GPU_NB);
/* launch non-local nonbonded F on GPU */
do_nb_verlet(fr, ic, enerd, flags, eintNonlocal, enbvClearFNo,
- nrnb, wcycle);
+ nrnb);
cycles_force += wallcycle_stop(wcycle, ewcLAUNCH_GPU_NB);
}
}
}
/* Reset energies */
- reset_enerdata(&(inputrec->opts), fr, bNS, enerd, MASTER(cr));
+ reset_enerdata(fr, bNS, enerd, MASTER(cr));
clear_rvecs(SHIFTS, fr->fshift);
if (DOMAINDECOMP(cr))
{
/* Maybe we should move this into do_force_lowlevel */
do_nb_verlet(fr, ic, enerd, flags, eintLocal, enbvClearFYes,
- nrnb, wcycle);
+ nrnb);
}
if (!bUseOrEmulGPU || bDiffKernels)
{
do_nb_verlet(fr, ic, enerd, flags, eintNonlocal,
bDiffKernels ? enbvClearFYes : enbvClearFNo,
- nrnb, wcycle);
+ nrnb);
}
if (!bUseOrEmulGPU)
if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
{
posres_wrapper(fplog, flags, bSepDVDL, inputrec, nrnb, top, box, x,
- f, enerd, lambda, fr);
+ enerd, lambda, fr);
}
/* Compute the bonded and non-bonded energies and optionally forces */
do_force_lowlevel(fplog, step, fr, inputrec, &(top->idef),
- cr, nrnb, wcycle, mdatoms, &(inputrec->opts),
- x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, mtop, top, fr->born,
+ cr, nrnb, wcycle, mdatoms,
+ x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
&(top->atomtypes), bBornRadii, box,
inputrec->fepvals, lambda, graph, &(top->excls), fr->mu_tot,
flags, &cycles_pme);
{
wallcycle_start_nocount(wcycle, ewcFORCE);
do_nb_verlet(fr, ic, enerd, flags, eintNonlocal, enbvClearFYes,
- nrnb, wcycle);
+ nrnb);
cycles_force += wallcycle_stop(wcycle, ewcFORCE);
}
wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
wallcycle_start_nocount(wcycle, ewcFORCE);
do_nb_verlet(fr, ic, enerd, flags, eintLocal,
DOMAINDECOMP(cr) ? enbvClearFNo : enbvClearFYes,
- nrnb, wcycle);
+ nrnb);
wallcycle_stop(wcycle, ewcFORCE);
}
wallcycle_start(wcycle, ewcNB_XF_BUF_OPS);
{
/* Compute forces due to electric field */
calc_f_el(MASTER(cr) ? field : NULL,
- start, homenr, mdatoms->chargeA, x, fr->f_novirsum,
+ start, homenr, mdatoms->chargeA, fr->f_novirsum,
inputrec->ex, inputrec->et, t);
}
if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
{
wallcycle_start(wcycle, ewcVSITESPREAD);
- spread_vsite_f(fplog, vsite, x, f, fr->fshift, FALSE, NULL, nrnb,
+ spread_vsite_f(vsite, x, f, fr->fshift, FALSE, NULL, nrnb,
&top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
wallcycle_stop(wcycle, ewcVSITESPREAD);
if (bSepLRF)
{
wallcycle_start(wcycle, ewcVSITESPREAD);
- spread_vsite_f(fplog, vsite, x, fr->f_twin, NULL, FALSE, NULL,
+ spread_vsite_f(vsite, x, fr->f_twin, NULL, FALSE, NULL,
nrnb,
&top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
wallcycle_stop(wcycle, ewcVSITESPREAD);
if (flags & GMX_FORCE_VIRIAL)
{
/* Calculation of the virial must be done after vsites! */
- calc_virial(fplog, mdatoms->start, mdatoms->homenr, x, f,
+ calc_virial(mdatoms->start, mdatoms->homenr, x, f,
vir_force, graph, box, nrnb, fr, inputrec->ePBC);
}
}
if (bDoForces)
{
- post_process_forces(fplog, cr, step, nrnb, wcycle,
+ post_process_forces(cr, step, nrnb, wcycle,
top, box, x, f, vir_force, mdatoms, graph, fr, vsite,
flags);
}
/* Sum the potential energy terms from group contributions */
- sum_epot(&(inputrec->opts), &(enerd->grpp), enerd->term);
+ sum_epot(&(enerd->grpp), enerd->term);
}
void do_force_cutsGROUP(FILE *fplog, t_commrec *cr,
t_inputrec *inputrec,
gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
gmx_localtop_t *top,
- gmx_mtop_t *mtop,
gmx_groups_t *groups,
matrix box, rvec x[], history_t *hist,
rvec f[],
if (bStateChanged)
{
- update_forcerec(fplog, fr, box);
+ update_forcerec(fr, box);
if (NEED_MUTOT(*inputrec))
{
}
else
{
- move_x(fplog, cr, GMX_LEFT, GMX_RIGHT, x, nrnb);
+ move_x(cr, x, nrnb);
}
wallcycle_stop(wcycle, ewcMOVEX);
}
}
/* Reset energies */
- reset_enerdata(&(inputrec->opts), fr, bNS, enerd, MASTER(cr));
+ reset_enerdata(fr, bNS, enerd, MASTER(cr));
clear_rvecs(SHIFTS, fr->fshift);
if (bNS)
{
dvdlambda[i] = 0;
}
- ns(fplog, fr, x, box,
- groups, &(inputrec->opts), top, mdatoms,
- cr, nrnb, lambda, dvdlambda, &enerd->grpp, bFillGrid,
+ ns(fplog, fr, box,
+ groups, top, mdatoms,
+ cr, nrnb, bFillGrid,
bDoLongRangeNS);
wallcycle_stop(wcycle, ewcNS);
if (inputrec->implicit_solvent && bNS)
{
- make_gb_nblist(cr, inputrec->gb_algorithm, inputrec->rlist,
+ make_gb_nblist(cr, inputrec->gb_algorithm,
x, box, fr, &top->idef, graph, fr->born);
}
if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_POSRES].nr > 0)
{
posres_wrapper(fplog, flags, bSepDVDL, inputrec, nrnb, top, box, x,
- f, enerd, lambda, fr);
+ enerd, lambda, fr);
}
if ((flags & GMX_FORCE_BONDED) && top->idef.il[F_FBPOSRES].nr > 0)
/* Compute the bonded and non-bonded energies and optionally forces */
do_force_lowlevel(fplog, step, fr, inputrec, &(top->idef),
- cr, nrnb, wcycle, mdatoms, &(inputrec->opts),
- x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, mtop, top, fr->born,
+ cr, nrnb, wcycle, mdatoms,
+ x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
&(top->atomtypes), bBornRadii, box,
inputrec->fepvals, lambda,
graph, &(top->excls), fr->mu_tot,
{
/* Compute forces due to electric field */
calc_f_el(MASTER(cr) ? field : NULL,
- start, homenr, mdatoms->chargeA, x, fr->f_novirsum,
+ start, homenr, mdatoms->chargeA, fr->f_novirsum,
inputrec->ex, inputrec->et, t);
}
if (vsite && !(fr->bF_NoVirSum && !(flags & GMX_FORCE_VIRIAL)))
{
wallcycle_start(wcycle, ewcVSITESPREAD);
- spread_vsite_f(fplog, vsite, x, f, fr->fshift, FALSE, NULL, nrnb,
+ spread_vsite_f(vsite, x, f, fr->fshift, FALSE, NULL, nrnb,
&top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
wallcycle_stop(wcycle, ewcVSITESPREAD);
if (bSepLRF)
{
wallcycle_start(wcycle, ewcVSITESPREAD);
- spread_vsite_f(fplog, vsite, x, fr->f_twin, NULL, FALSE, NULL,
+ spread_vsite_f(vsite, x, fr->f_twin, NULL, FALSE, NULL,
nrnb,
&top->idef, fr->ePBC, fr->bMolPBC, graph, box, cr);
wallcycle_stop(wcycle, ewcVSITESPREAD);
if (flags & GMX_FORCE_VIRIAL)
{
/* Calculation of the virial must be done after vsites! */
- calc_virial(fplog, mdatoms->start, mdatoms->homenr, x, f,
+ calc_virial(mdatoms->start, mdatoms->homenr, x, f,
vir_force, graph, box, nrnb, fr, inputrec->ePBC);
}
}
if (bDoForces)
{
- post_process_forces(fplog, cr, step, nrnb, wcycle,
+ post_process_forces(cr, step, nrnb, wcycle,
top, box, x, f, vir_force, mdatoms, graph, fr, vsite,
flags);
}
/* Sum the potential energy terms from group contributions */
- sum_epot(&(inputrec->opts), &(enerd->grpp), enerd->term);
+ sum_epot(&(enerd->grpp), enerd->term);
}
void do_force(FILE *fplog, t_commrec *cr,
t_inputrec *inputrec,
gmx_large_int_t step, t_nrnb *nrnb, gmx_wallcycle_t wcycle,
gmx_localtop_t *top,
- gmx_mtop_t *mtop,
gmx_groups_t *groups,
matrix box, rvec x[], history_t *hist,
rvec f[],
case ecutsVERLET:
do_force_cutsVERLET(fplog, cr, inputrec,
step, nrnb, wcycle,
- top, mtop,
+ top,
groups,
box, x, hist,
f, vir_force,
case ecutsGROUP:
do_force_cutsGROUP(fplog, cr, inputrec,
step, nrnb, wcycle,
- top, mtop,
+ top,
groups,
box, x, hist,
f, vir_force,
void do_constrain_first(FILE *fplog, gmx_constr_t constr,
t_inputrec *ir, t_mdatoms *md,
- t_state *state, rvec *f,
- t_graph *graph, t_commrec *cr, t_nrnb *nrnb,
- t_forcerec *fr, gmx_localtop_t *top, tensor shake_vir)
+ t_state *state, t_commrec *cr, t_nrnb *nrnb,
+ t_forcerec *fr, gmx_localtop_t *top)
{
int i, m, start, end;
gmx_large_int_t step;
low_do_pbc_mtop(fplog, ePBC, box, mtop, x, FALSE);
}
-void finish_run(FILE *fplog, t_commrec *cr, const char *confout,
+void finish_run(FILE *fplog, t_commrec *cr,
t_inputrec *inputrec,
t_nrnb nrnb[], gmx_wallcycle_t wcycle,
gmx_runtime_t *runtime,
wallclock_gpu_t *gputimes,
- int omp_nth_pp,
gmx_bool bWriteStat)
{
int i, j;
int nfile, const t_filenm fnm[],
gmx_mdoutf_t **outf, t_mdebin **mdebin,
tensor force_vir, tensor shake_vir, rvec mu_tot,
- gmx_bool *bSimAnn, t_vcm **vcm, t_state *state, unsigned long Flags)
+ gmx_bool *bSimAnn, t_vcm **vcm, unsigned long Flags)
{
int i, j, n;
real tmpt, mod;
if (upd)
{
- *upd = init_update(fplog, ir);
+ *upd = init_update(ir);
}
}
}
-static void moveit(t_commrec *cr,
- int left, int right, const char *s, rvec xx[])
+static void moveit(t_commrec *cr, rvec xx[])
{
if (!xx)
{
return;
}
- move_rvecs(cr, FALSE, FALSE, left, right,
- xx, NULL, (cr->nnodes-cr->npmenodes)-1, NULL);
+ move_rvecs(cr, FALSE, FALSE, xx, NULL, (cr->nnodes-cr->npmenodes)-1, NULL);
}
gmx_mdoutf_t *init_mdoutf(int nfile, const t_filenm fnm[], int mdrun_flags,
rvec *local_v;
rvec *global_v;
-#define MX(xvf) moveit(cr, GMX_LEFT, GMX_RIGHT,#xvf, xvf)
+#define MX(xvf) moveit(cr, xvf)
/* MRS -- defining these variables is to manage the difference
* between half step and full step velocities, but there must be a better way . . . */
}
}
-static void init_table(FILE *fp, int n, int nx0,
+static void init_table(int n, int nx0,
double tabscale, t_tabledata *td, gmx_bool bAlloc)
{
int i;
for (k = 0; (k < ntab); k++)
{
- init_table(fp, nx, nx0, tabscale, &(td[k]), TRUE);
+ init_table(nx, nx0, tabscale, &(td[k]), TRUE);
for (i = 0; (i < nx); i++)
{
td[k].x[i] = yy[0][i];
{
if (tabsel[k] != etabUSER)
{
- init_table(out, nx, nx0,
+ init_table(nx, nx0,
(tabsel[k] == etabEXPMIN) ? table.scale_exp : table.scale,
&(td[k]), !bReadTab);
fill_table(&(td[k]), tabsel[k], fr);
return table;
}
-t_forcetable make_gb_table(FILE *out, const output_env_t oenv,
- const t_forcerec *fr,
- const char *fn,
- real rtab)
+t_forcetable make_gb_table(const output_env_t oenv,
+ const t_forcerec *fr)
{
const char *fns[3] = { "gbctab.xvg", "gbdtab.xvg", "gbrtab.xvg" };
const char *fns14[3] = { "gbctab14.xvg", "gbdtab14.xvg", "gbrtab14.xvg" };
snew_aligned(table.data, 4*nx, 32);
- init_table(out, nx, nx0, table.scale, &(td[0]), !bReadTab);
+ init_table(nx, nx0, table.scale, &(td[0]), !bReadTab);
/* Local implementation so we don't have to use the etabGB
* enum above, which will cause problems later when
}
}
-static void init_grpstat(FILE *log,
- gmx_mtop_t *mtop, int ngacc, t_grp_acc gstat[])
+static void init_grpstat(gmx_mtop_t *mtop, int ngacc, t_grp_acc gstat[])
{
gmx_groups_t *groups;
gmx_mtop_atomloop_all_t aloop;
}
}
-void init_ekindata(FILE *log, gmx_mtop_t *mtop, t_grpopts *opts,
+void init_ekindata(FILE gmx_unused *log, gmx_mtop_t *mtop, t_grpopts *opts,
gmx_ekindata_t *ekind)
{
int i;
ekind->ngacc = opts->ngacc;
snew(ekind->grpstat, opts->ngacc);
- init_grpstat(log, mtop, opts->ngacc, ekind->grpstat);
+ init_grpstat(mtop, opts->ngacc, ekind->grpstat);
}
void accumulate_u(t_commrec *cr, t_grpopts *opts, gmx_ekindata_t *ekind)
}
real sum_ekin(t_grpopts *opts, gmx_ekindata_t *ekind, real *dekindlambda,
- gmx_bool bEkinAveVel, gmx_bool bSaveEkinOld, gmx_bool bScaleEkin)
+ gmx_bool bEkinAveVel, gmx_bool bScaleEkin)
{
int i, j, m, ngtc;
real T, ek;
/* Make do_force do a single node force calculation */
cr->nnodes = 1;
do_force(fplog, cr, inputrec,
- step, nrnb, wcycle, top, top_global, &top_global->groups,
+ step, nrnb, wcycle, top, &top_global->groups,
state->box, state->x, &state->hist,
f, force_vir, mdatoms, enerd, fcd,
state->lambda,
}
static void do_update_vv_vel(int start, int nrend, double dt,
- t_grp_tcstat *tcstat, t_grp_acc *gstat,
rvec accel[], ivec nFreeze[], real invmass[],
unsigned short ptype[], unsigned short cFREEZE[],
unsigned short cACC[], rvec v[], rvec f[],
} /* do_update_vv_vel */
static void do_update_vv_pos(int start, int nrend, double dt,
- t_grp_tcstat *tcstat, t_grp_acc *gstat,
- rvec accel[], ivec nFreeze[], real invmass[],
+ ivec nFreeze[],
unsigned short ptype[], unsigned short cFREEZE[],
rvec x[], rvec xprime[], rvec v[],
- rvec f[], gmx_bool bExtended, real veta, real alpha)
+ gmx_bool bExtended, real veta)
{
double imass, w_dt;
int gf = 0;
sfree(seed);
}
-static gmx_stochd_t *init_stochd(FILE *fplog, t_inputrec *ir, int nthreads)
+static gmx_stochd_t *init_stochd(t_inputrec *ir, int nthreads)
{
gmx_stochd_t *sd;
gmx_sd_const_t *sdc;
}
}
-gmx_update_t init_update(FILE *fplog, t_inputrec *ir)
+gmx_update_t init_update(t_inputrec *ir)
{
t_gmx_update *upd;
if (ir->eI == eiBD || EI_SD(ir->eI) || ir->etc == etcVRESCALE || ETC_ANDERSEN(ir->etc))
{
- upd->sd = init_stochd(fplog, ir, gmx_omp_nthreads_get(emntUpdate));
+ upd->sd = init_stochd(ir, gmx_omp_nthreads_get(emntUpdate));
}
upd->xp = NULL;
unsigned short cFREEZE[], unsigned short cACC[],
unsigned short cTC[],
rvec x[], rvec xprime[], rvec v[], rvec f[],
- rvec sd_X[],
int ngtc, real tau_t[], real ref_t[])
{
gmx_sd_const_t *sdc;
}
}
-static void dump_it_all(FILE *fp, const char *title,
- int natoms, rvec x[], rvec xp[], rvec v[], rvec f[])
+static void dump_it_all(FILE gmx_unused *fp, const char gmx_unused *title,
+ int gmx_unused natoms, rvec gmx_unused x[], rvec gmx_unused xp[],
+ rvec gmx_unused v[], rvec gmx_unused f[])
{
#ifdef DEBUG
if (fp)
static void calc_ke_part_visc(matrix box, rvec x[], rvec v[],
t_grpopts *opts, t_mdatoms *md,
gmx_ekindata_t *ekind,
- t_nrnb *nrnb, gmx_bool bEkinAveVel, gmx_bool bSaveEkinOld)
+ t_nrnb *nrnb, gmx_bool bEkinAveVel)
{
int start = md->start, homenr = md->homenr;
int g, d, n, m, gt = 0;
}
else
{
- calc_ke_part_visc(state->box, state->x, state->v, opts, md, ekind, nrnb, bEkinAveVel, bSaveEkinOld);
+ calc_ke_part_visc(state->box, state->x, state->v, opts, md, ekind, nrnb, bEkinAveVel);
}
}
}
}
-void update_tcouple(FILE *fplog,
- gmx_large_int_t step,
+void update_tcouple(gmx_large_int_t step,
t_inputrec *inputrec,
t_state *state,
gmx_ekindata_t *ekind,
- gmx_wallcycle_t wcycle,
gmx_update_t upd,
t_extmass *MassQ,
t_mdatoms *md)
t_state *state,
matrix pcoupl_mu,
matrix M,
- gmx_wallcycle_t wcycle,
- gmx_update_t upd,
gmx_bool bInitStep)
{
gmx_bool bPCouple = FALSE;
rvec force[], /* forces on home particles */
t_idef *idef,
tensor vir_part,
- tensor vir, /* tensors for virial and ekin, needed for computing */
t_commrec *cr,
t_nrnb *nrnb,
gmx_wallcycle_t wcycle,
gmx_update_t upd,
gmx_constr_t constr,
- gmx_bool bInitStep,
gmx_bool bFirstHalf,
gmx_bool bCalcVir,
real vetanew)
t_inputrec *inputrec, /* input record and box stuff */
t_mdatoms *md,
t_state *state,
- t_graph *graph,
rvec force[], /* forces on home particles */
matrix *scale_tot,
matrix pcoupl_mu,
t_nrnb *nrnb,
- gmx_wallcycle_t wcycle,
- gmx_update_t upd,
- gmx_bool bInitStep,
- gmx_bool bFirstHalf)
+ gmx_update_t upd)
{
gmx_bool bExtended, bLastStep, bLog = FALSE, bEner = FALSE;
double dt;
t_fcdata *fcd,
gmx_ekindata_t *ekind,
matrix M,
- gmx_wallcycle_t wcycle,
gmx_update_t upd,
gmx_bool bInitStep,
int UpdatePart,
inputrec->opts.acc, inputrec->opts.nFreeze,
md->invmass, md->ptype,
md->cFREEZE, md->cACC, md->cTC,
- state->x, xprime, state->v, force, state->sd_X,
+ state->x, xprime, state->v, force,
inputrec->opts.ngtc, inputrec->opts.tau_t, inputrec->opts.ref_t);
break;
case (eiSD2):
case etrtVELOCITY1:
case etrtVELOCITY2:
do_update_vv_vel(start_th, end_th, dt,
- ekind->tcstat, ekind->grpstat,
inputrec->opts.acc, inputrec->opts.nFreeze,
md->invmass, md->ptype,
md->cFREEZE, md->cACC,
break;
case etrtPOSITION:
do_update_vv_pos(start_th, end_th, dt,
- ekind->tcstat, ekind->grpstat,
- inputrec->opts.acc, inputrec->opts.nFreeze,
- md->invmass, md->ptype, md->cFREEZE,
- state->x, xprime, state->v, force,
- (bNH || bPR), state->veta, alpha);
+ inputrec->opts.nFreeze,
+ md->ptype, md->cFREEZE,
+ state->x, xprime, state->v,
+ (bNH || bPR), state->veta);
break;
}
break;
}
/* Center of mass code for groups */
-void calc_vcm_grp(FILE *fp, int start, int homenr, t_mdatoms *md,
+void calc_vcm_grp(int start, int homenr, t_mdatoms *md,
rvec x[], rvec v[], t_vcm *vcm)
{
int i, g, m;
}
}
-void do_stopcm_grp(FILE *fp, int start, int homenr, unsigned short *group_id,
+void do_stopcm_grp(int start, int homenr, unsigned short *group_id,
rvec x[], rvec v[], t_vcm *vcm)
{
int i, g, m;
void construct_vsites_thread(gmx_vsite_t *vsite,
- rvec x[], t_nrnb *nrnb,
+ rvec x[],
real dt, rvec *v,
t_iparams ip[], t_ilist ilist[],
t_pbc *pbc_null)
}
}
-void construct_vsites(FILE *log, gmx_vsite_t *vsite,
- rvec x[], t_nrnb *nrnb,
+void construct_vsites(gmx_vsite_t *vsite,
+ rvec x[],
real dt, rvec *v,
t_iparams ip[], t_ilist ilist[],
int ePBC, gmx_bool bMolPBC, t_graph *graph,
if (vsite->nthreads == 1)
{
construct_vsites_thread(vsite,
- x, nrnb, dt, v,
+ x, dt, v,
ip, ilist,
pbc_null);
}
#pragma omp parallel num_threads(vsite->nthreads)
{
construct_vsites_thread(vsite,
- x, nrnb, dt, v,
+ x, dt, v,
ip, vsite->tdata[gmx_omp_get_thread_num()].ilist,
pbc_null);
}
/* Now we can construct the vsites that might depend on other vsites */
construct_vsites_thread(vsite,
- x, nrnb, dt, v,
+ x, dt, v,
ip, vsite->tdata[vsite->nthreads].ilist,
pbc_null);
}
/* TOTAL: 13 flops */
}
-void construct_vsites_mtop(FILE *log, gmx_vsite_t *vsite,
+void construct_vsites_mtop(gmx_vsite_t *vsite,
gmx_mtop_t *mtop, rvec x[])
{
int as, mb, mol;
molt = &mtop->moltype[molb->type];
for (mol = 0; mol < molb->nmol; mol++)
{
- construct_vsites(log, vsite, x+as, NULL, 0.0, NULL,
+ construct_vsites(vsite, x+as, 0.0, NULL,
mtop->ffparams.iparams, molt->ilist,
epbcNONE, TRUE, NULL, NULL, NULL);
as += molt->atoms.nr;
}
}
-void spread_vsite_f(FILE *log, gmx_vsite_t *vsite,
+void spread_vsite_f(gmx_vsite_t *vsite,
rvec x[], rvec f[], rvec *fshift,
gmx_bool VirCorr, matrix vir,
t_nrnb *nrnb, t_idef *idef,
gmx_edsam_t ed, t_forcerec *fr,
int repl_ex_nst, int repl_ex_nex, int repl_ex_seed, gmx_membed_t membed,
real cpt_period, real max_hours,
- const char *deviceOptions,
+ const char gmx_unused *deviceOptions,
unsigned long Flags,
gmx_runtime_t *runtime)
{
&(state_global->fep_state), lam0,
nrnb, top_global, &upd,
nfile, fnm, &outf, &mdebin,
- force_vir, shake_vir, mu_tot, &bSimAnn, &vcm, state_global, Flags);
+ force_vir, shake_vir, mu_tot, &bSimAnn, &vcm, Flags);
clear_mat(total_vir);
clear_mat(pres);
if (constr)
{
/* Constrain the initial coordinates and velocities */
- do_constrain_first(fplog, constr, ir, mdatoms, state, f,
- graph, cr, nrnb, fr, top, shake_vir);
+ do_constrain_first(fplog, constr, ir, mdatoms, state,
+ cr, nrnb, fr, top);
}
if (vsite)
{
/* Construct the virtual sites for the initial configuration */
- construct_vsites(fplog, vsite, state->x, nrnb, ir->delta_t, NULL,
+ construct_vsites(vsite, state->x, ir->delta_t, NULL,
top->idef.iparams, top->idef.il,
fr->ePBC, fr->bMolPBC, graph, cr, state->box);
}
nstfep = ir->fepvals->nstdhdl;
if (ir->bExpanded)
{
- nstfep = gmx_greatest_common_divisor(ir->fepvals->nstdhdl,nstfep);
+ nstfep = gmx_greatest_common_divisor(ir->fepvals->nstdhdl, nstfep);
}
if (repl_ex_nst > 0)
{
- nstfep = gmx_greatest_common_divisor(repl_ex_nst,nstfep);
+ nstfep = gmx_greatest_common_divisor(repl_ex_nst, nstfep);
}
/* I'm assuming we need global communication the first time! MRS */
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
NULL, enerd, force_vir, shake_vir, total_vir, pres, mu_tot,
constr, NULL, FALSE, state->box,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld, cglo_flags);
+ top_global, &pcurr, &bSumEkinhOld, cglo_flags);
if (ir->eI == eiVVAK)
{
/* a second call to get the half step temperature initialized as well */
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
NULL, enerd, force_vir, shake_vir, total_vir, pres, mu_tot,
constr, NULL, FALSE, state->box,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
cglo_flags &~(CGLO_STOPCM | CGLO_PRESSURE));
}
mk_mshift(fplog, graph, fr->ePBC, state->box, state->x);
shift_self(graph, state->box, state->x);
}
- construct_vsites(fplog, vsite, state->x, nrnb, ir->delta_t, state->v,
+ construct_vsites(vsite, state->x, ir->delta_t, state->v,
top->idef.iparams, top->idef.il,
fr->ePBC, fr->bMolPBC, graph, cr, state->box);
if (graph)
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
wcycle, enerd, NULL, NULL, NULL, NULL, mu_tot,
constr, NULL, FALSE, state->box,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
CGLO_RERUNMD | CGLO_GSTAT | CGLO_TEMPERATURE);
}
clear_mat(force_vir);
/* Now is the time to relax the shells */
count = relax_shell_flexcon(fplog, cr, bVerbose, bFFscan ? step+1 : step,
ir, bNS, force_flags,
- bStopCM, top, top_global,
+ top,
constr, enerd, fcd,
state, f, force_vir, mdatoms,
nrnb, wcycle, graph, groups,
shellfc, fr, bBornRadii, t, mu_tot,
- state->natoms, &bConverged, vsite,
+ &bConverged, vsite,
outf->fp_field);
tcount += count;
* This is parallellized as well, and does communication too.
* Check comments in sim_util.c
*/
- do_force(fplog, cr, ir, step, nrnb, wcycle, top, top_global, groups,
+ do_force(fplog, cr, ir, step, nrnb, wcycle, top, groups,
state->box, state->x, &state->hist,
f, force_vir, mdatoms, enerd, fcd,
state->lambda, graph,
update_coords(fplog, step, ir, mdatoms, state, fr->bMolPBC,
f, bUpdateDoLR, fr->f_twin, fcd,
- ekind, M, wcycle, upd, bInitStep, etrtVELOCITY1,
+ ekind, M, upd, bInitStep, etrtVELOCITY1,
cr, nrnb, constr, &top->idef);
if (bIterativeCase && do_per_step(step-1, ir->nstpcouple) && !bInitStep)
{
update_constraints(fplog, step, NULL, ir, ekind, mdatoms,
state, fr->bMolPBC, graph, f,
- &top->idef, shake_vir, NULL,
+ &top->idef, shake_vir,
cr, nrnb, wcycle, upd, constr,
- bInitStep, TRUE, bCalcVir, vetanew);
+ TRUE, bCalcVir, vetanew);
if (!bOK && !bFFscan)
{
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
wcycle, enerd, force_vir, shake_vir, total_vir, pres, mu_tot,
constr, NULL, FALSE, state->box,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
cglo_flags
| CGLO_ENERGY
| (bTemp ? CGLO_TEMPERATURE : 0)
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
wcycle, enerd, NULL, NULL, NULL, NULL, mu_tot,
constr, NULL, FALSE, state->box,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
CGLO_RERUNMD | CGLO_GSTAT | CGLO_TEMPERATURE);
}
}
if (IR_NVT_TROTTER(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, FALSE);
+ enerd->term[F_TEMP] = sum_ekin(&(ir->opts), ekind, NULL, (ir->eI == eiVV), FALSE);
enerd->term[F_EKIN] = trace(ekind->ekin);
}
}
{
if (!bInitStep)
{
- update_tcouple(fplog, step, ir, state, ekind, wcycle, upd, &MassQ, mdatoms);
+ update_tcouple(step, ir, state, ekind, upd, &MassQ, mdatoms);
}
if (ETC_ANDERSEN(ir->etc)) /* keep this outside of update_tcouple because of the extra info required to pass */
{
{
update_constraints(fplog, step, NULL, ir, ekind, mdatoms,
state, fr->bMolPBC, graph, f,
- &top->idef, tmp_vir, NULL,
+ &top->idef, tmp_vir,
cr, nrnb, wcycle, upd, constr,
- bInitStep, TRUE, bCalcVir, vetanew);
+ TRUE, bCalcVir, vetanew);
}
}
}
*/
copy_mat(state->box, lastbox);
- bOK = TRUE;
+ bOK = TRUE;
dvdl_constr = 0;
if (!(bRerunMD && !rerun_fr.bV && !bForceUpdate))
}
else
{
- update_tcouple(fplog, step, ir, state, ekind, wcycle, upd, &MassQ, mdatoms);
- update_pcouple(fplog, step, ir, state, pcoupl_mu, M, wcycle,
- upd, bInitStep);
+ update_tcouple(step, ir, state, ekind, upd, &MassQ, mdatoms);
+ update_pcouple(fplog, step, ir, state, pcoupl_mu, M, bInitStep);
}
if (bVV)
/* velocity half-step update */
update_coords(fplog, step, ir, mdatoms, state, fr->bMolPBC, f,
bUpdateDoLR, fr->f_twin, fcd,
- ekind, M, wcycle, upd, FALSE, etrtVELOCITY2,
+ ekind, M, upd, FALSE, etrtVELOCITY2,
cr, nrnb, constr, &top->idef);
}
update_coords(fplog, step, ir, mdatoms, state, fr->bMolPBC, f,
bUpdateDoLR, fr->f_twin, fcd,
- ekind, M, wcycle, upd, bInitStep, etrtPOSITION, cr, nrnb, constr, &top->idef);
+ ekind, M, upd, bInitStep, etrtPOSITION, cr, nrnb, constr, &top->idef);
wallcycle_stop(wcycle, ewcUPDATE);
update_constraints(fplog, step, &dvdl_constr, ir, ekind, mdatoms, state,
fr->bMolPBC, graph, f,
- &top->idef, shake_vir, force_vir,
+ &top->idef, shake_vir,
cr, nrnb, wcycle, upd, constr,
- bInitStep, FALSE, bCalcVir, state->veta);
+ FALSE, bCalcVir, state->veta);
if (ir->eI == eiVVAK)
{
compute_globals(fplog, gstat, cr, ir, fr, ekind, state, state_global, mdatoms, nrnb, vcm,
wcycle, enerd, force_vir, shake_vir, total_vir, pres, mu_tot,
constr, NULL, FALSE, lastbox,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
cglo_flags | CGLO_TEMPERATURE
);
wallcycle_start(wcycle, ewcUPDATE);
update_coords(fplog, step, ir, mdatoms, state, fr->bMolPBC, f,
bUpdateDoLR, fr->f_twin, fcd,
- ekind, M, wcycle, upd, bInitStep, etrtPOSITION, cr, nrnb, constr, &top->idef);
+ ekind, M, upd, bInitStep, etrtPOSITION, cr, nrnb, constr, &top->idef);
wallcycle_stop(wcycle, ewcUPDATE);
/* do we need an extra constraint here? just need to copy out of state->v to upd->xp? */
* For now, will call without actually constraining, constr=NULL*/
update_constraints(fplog, step, NULL, ir, ekind, mdatoms,
state, fr->bMolPBC, graph, f,
- &top->idef, tmp_vir, force_vir,
+ &top->idef, tmp_vir,
cr, nrnb, wcycle, upd, NULL,
- bInitStep, FALSE, bCalcVir,
+ FALSE, bCalcVir,
state->veta);
}
if (!bOK && !bFFscan)
investigated, hopefully for 4.6.3. However,
this current solution is much better than
having it completely wrong.
- */
+ */
enerd->term[F_DVDL_CONSTR] += 2*dvdl_constr;
}
else
{
shift_self(graph, state->box, state->x);
}
- construct_vsites(fplog, vsite, state->x, nrnb, ir->delta_t, state->v,
+ construct_vsites(vsite, state->x, ir->delta_t, state->v,
top->idef.iparams, top->idef.il,
fr->ePBC, fr->bMolPBC, graph, cr, state->box);
(step_rel % gs.nstms == 0) &&
(multisim_nsteps < 0 || (step_rel < multisim_nsteps)),
lastbox,
- top_global, &pcurr, top_global->natoms, &bSumEkinhOld,
+ top_global, &pcurr, &bSumEkinhOld,
cglo_flags
| (!EI_VV(ir->eI) || bRerunMD ? CGLO_ENERGY : 0)
| (!EI_VV(ir->eI) && bStopCM ? CGLO_STOPCM : 0)
/* sum up the foreign energy and dhdl terms for md and sd. currently done every step so that dhdl is correct in the .edr */
sum_dhdl(enerd, state->lambda, ir->fepvals);
}
- update_box(fplog, step, ir, mdatoms, state, graph, f,
- ir->nstlist == -1 ? &nlh.scale_tot : NULL, pcoupl_mu, nrnb, wcycle, upd, bInitStep, FALSE);
+ update_box(fplog, step, ir, mdatoms, state, f,
+ ir->nstlist == -1 ? &nlh.scale_tot : NULL, pcoupl_mu, nrnb, upd);
/* ################# END UPDATE STEP 2 ################# */
/* #### We now have r(t+dt) and v(t+dt/2) ############# */
fprintf(debug, "Collecting state before exchange\n");
}
shift = cr->nnodes - cr->npmenodes - 1;
- move_rvecs(cr, FALSE, FALSE, GMX_LEFT, GMX_RIGHT, state->x, NULL, shift, NULL);
+ move_rvecs(cr, FALSE, FALSE, state->x, NULL, shift, NULL);
if (state->v)
{
- move_rvecs(cr, FALSE, FALSE, GMX_LEFT, GMX_RIGHT, state->v, NULL, shift, NULL);
+ move_rvecs(cr, FALSE, FALSE, state->v, NULL, shift, NULL);
}
if (state->sd_X)
{
- move_rvecs(cr, FALSE, FALSE, GMX_LEFT, GMX_RIGHT, state->sd_X, NULL, shift, NULL);
+ move_rvecs(cr, FALSE, FALSE, state->sd_X, NULL, shift, NULL);
}
}
}
}
-static void prepare_verlet_scheme(FILE *fplog,
- const gmx_hw_info_t *hwinfo,
- t_commrec *cr,
- const char *nbpu_opt,
- t_inputrec *ir,
- const gmx_mtop_t *mtop,
- matrix box,
- gmx_bool *bUseGPU)
+static void prepare_verlet_scheme(FILE *fplog,
+ const gmx_hw_info_t *hwinfo,
+ t_commrec *cr,
+ t_inputrec *ir,
+ const gmx_mtop_t *mtop,
+ matrix box,
+ gmx_bool *bUseGPU)
{
/* Here we only check for GPU usage on the MPI master process,
* as here we don't know how many GPUs we will use yet.
if (inputrec->cutoff_scheme == ecutsVERLET)
{
- prepare_verlet_scheme(fplog, hwinfo, cr, nbpu_opt,
+ prepare_verlet_scheme(fplog, hwinfo, cr,
inputrec, mtop, state->box,
&minf.bUseGPU);
}
if (PAR(cr))
{
/* now broadcast everything to the non-master nodes/threads: */
- init_parallel(fplog, cr, inputrec, mtop);
+ init_parallel(cr, inputrec, mtop);
/* This check needs to happen after get_nthreads_mpi() */
if (inputrec->cutoff_scheme == ecutsVERLET && (Flags & MD_PARTDEC))
gmx_fatal(FARGS, "The .mdp file specified an energy mininization or normal mode algorithm, and these are not compatible with mdrun -rerun");
}
- if (can_use_allvsall(inputrec, mtop, TRUE, cr, fplog) && PAR(cr))
+ if (can_use_allvsall(inputrec, TRUE, cr, fplog) && PAR(cr))
{
/* Simple neighbour searching and (also?) all-vs-all loops
* do not work with domain decomposition. */
/* Initiate forcerecord */
fr = mk_forcerec();
fr->hwinfo = hwinfo;
- init_forcerec(fplog, oenv, fr, fcd, inputrec, mtop, cr, box, FALSE,
+ init_forcerec(fplog, oenv, fr, fcd, inputrec, mtop, cr, box,
opt2fn("-table", nfile, fnm),
opt2fn("-tabletf", nfile, fnm),
opt2fn("-tablep", nfile, fnm),
/* Initialize QM-MM */
if (fr->bQMMM)
{
- init_QMMMrec(cr, box, mtop, inputrec, fr);
+ init_QMMMrec(cr, mtop, inputrec, fr);
}
/* Initialize the mdatoms structure.
* for the initial distribution in the domain decomposition
* and for the initial shell prediction.
*/
- construct_vsites_mtop(fplog, vsite, mtop, state->x);
+ construct_vsites_mtop(vsite, mtop, state->x);
}
}
if (DOMAINDECOMP(cr))
{
- dd_init_bondeds(fplog, cr->dd, mtop, vsite, constr, inputrec,
+ dd_init_bondeds(fplog, cr->dd, mtop, vsite, inputrec,
Flags & MD_DDBONDCHECK, fr->cginfo_mb);
- set_dd_parameters(fplog, cr->dd, dlb_scale, inputrec, fr, &ddbox);
+ set_dd_parameters(fplog, cr->dd, dlb_scale, inputrec, &ddbox);
setup_dd_grid(fplog, cr->dd);
}
if (inputrec->ePull != epullNO)
{
- finish_pull(fplog, inputrec->pull);
+ finish_pull(inputrec->pull);
}
if (inputrec->bRot)
else
{
/* do PME only */
- gmx_pmeonly(*pmedata, cr, nrnb, wcycle, ewaldcoeff, FALSE, inputrec);
+ gmx_pmeonly(*pmedata, cr, nrnb, wcycle, ewaldcoeff, inputrec);
}
if (EI_DYNAMICS(inputrec->eI) || EI_TPI(inputrec->eI))
/* Finish up, write some stuff
* if rerunMD, don't write last frame again
*/
- finish_run(fplog, cr, ftp2fn(efSTO, nfile, fnm),
+ finish_run(fplog, cr,
inputrec, nrnb, wcycle, &runtime,
fr != NULL && fr->nbv != NULL && fr->nbv->bUseGPU ?
nbnxn_cuda_get_timings(fr->nbv->cu_nbv) : NULL,
- nthreads_pp,
EI_DYNAMICS(inputrec->eI) && !MULTISIM(cr));
if ((cr->duty & DUTY_PP) && fr->nbv != NULL && fr->nbv->bUseGPU)