include_directories(${TNG_IO_INCLUDE_DIRS})
endif()
if(NOT GMX_EXTERNAL_TNG)
- # TNG wants zlib if it is available
- find_package(ZLIB QUIET)
- include(gmxTestZLib)
- gmx_test_zlib(HAVE_ZLIB)
-
include(${CMAKE_SOURCE_DIR}/src/external/tng_io/BuildTNG.cmake)
tng_get_source_list(TNG_SOURCES TNG_IO_DEFINITIONS)
list(APPEND LIBGROMACS_SOURCES ${TNG_SOURCES})
add_subdirectory(gmxlib)
add_subdirectory(mdlib)
add_subdirectory(gmxpreprocess)
+add_subdirectory(bonded)
add_subdirectory(commandline)
add_subdirectory(fft)
add_subdirectory(linearalgebra)
# apply gcc 4.4.x bug workaround
if(GMX_USE_GCC44_BUG_WORKAROUND)
include(gmxGCC44O3BugWorkaround)
- gmx_apply_gcc44_bug_workaround("gmxlib/bondfree.c")
+ gmx_apply_gcc44_bug_workaround("bonded/bonded.cpp")
gmx_apply_gcc44_bug_workaround("mdlib/force.c")
gmx_apply_gcc44_bug_workaround("mdlib/constr.c")
endif()
#include <stdlib.h>
#include <assert.h>
+#include "gromacs/bonded/bonded.h"
#include "gromacs/legacyheaders/typedefs.h"
#include "gromacs/legacyheaders/network.h"
#include "gromacs/math/vec.h"
#include "gromacs/legacyheaders/gmx_ga2la.h"
#include "gromacs/legacyheaders/macros.h"
#include "nbnxn_search.h"
-#include "gromacs/legacyheaders/bondf.h"
+#include "gromacs/legacyheaders/bonded-threading.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/gpu_utils.h"
if (vsite != NULL)
{
/* Now we have updated mdatoms, we can do the last vsite bookkeeping */
- split_vsites_over_threads(top_local->idef.il, mdatoms, FALSE, vsite);
+ split_vsites_over_threads(top_local->idef.il, top_local->idef.iparams,
+ mdatoms, FALSE, vsite);
}
if (shellfc)
#include "gromacs/legacyheaders/ns.h"
#include "gromacs/topology/mtop_util.h"
#include "gromacs/legacyheaders/pme.h"
-#include "gromacs/legacyheaders/bondf.h"
+#include "gromacs/legacyheaders/bonded-threading.h"
#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
#include "gromacs/legacyheaders/md_logging.h"
gmx_vsite_t *vsite, gmx_constr_t constr,
int nfile, const t_filenm fnm[],
gmx_mdoutf_t *outf, t_mdebin **mdebin,
- int imdport, unsigned long gmx_unused Flags)
+ int imdport, unsigned long gmx_unused Flags,
+ gmx_wallcycle_t wcycle)
{
int i;
real dvdl_constr;
*gstat = global_stat_init(ir);
}
- *outf = init_mdoutf(fplog, nfile, fnm, 0, cr, ir, top_global, NULL);
+ *outf = init_mdoutf(fplog, nfile, fnm, 0, cr, ir, top_global, NULL, wcycle);
snew(*enerd, 1);
init_enerdata(top_global->groups.grps[egcENER].nr, ir->fepvals->n_lambda,
init_em(fplog, CG, cr, inputrec,
state_global, top_global, s_min, &top, &f, &f_global,
nrnb, mu_tot, fr, &enerd, &graph, mdatoms, &gstat, vsite, constr,
- nfile, fnm, &outf, &mdebin, imdport, Flags);
+ nfile, fnm, &outf, &mdebin, imdport, Flags, wcycle);
/* Print to log file */
print_em_start(fplog, cr, walltime_accounting, wcycle, CG);
init_em(fplog, LBFGS, cr, inputrec,
state, top_global, &ems, &top, &f, &f_global,
nrnb, mu_tot, fr, &enerd, &graph, mdatoms, &gstat, vsite, constr,
- nfile, fnm, &outf, &mdebin, imdport, Flags);
+ nfile, fnm, &outf, &mdebin, imdport, Flags, wcycle);
/* Do_lbfgs is not completely updated like do_steep and do_cg,
* so we free some memory again.
*/
init_em(fplog, SD, cr, inputrec,
state_global, top_global, s_try, &top, &f, &f_global,
nrnb, mu_tot, fr, &enerd, &graph, mdatoms, &gstat, vsite, constr,
- nfile, fnm, &outf, &mdebin, imdport, Flags);
+ nfile, fnm, &outf, &mdebin, imdport, Flags, wcycle);
/* Print to log file */
print_em_start(fplog, cr, walltime_accounting, wcycle, SD);
state_global, top_global, state_work, &top,
&f, &f_global,
nrnb, mu_tot, fr, &enerd, &graph, mdatoms, &gstat, vsite, constr,
- nfile, fnm, &outf, NULL, imdport, Flags);
+ nfile, fnm, &outf, NULL, imdport, Flags, wcycle);
natoms = top_global->natoms;
snew(fneg, natoms);
#include "gromacs/math/units.h"
#include "gromacs/legacyheaders/mdatoms.h"
#include "gromacs/legacyheaders/force.h"
-#include "gromacs/legacyheaders/bondf.h"
#include "gromacs/legacyheaders/pme.h"
#include "gromacs/legacyheaders/disre.h"
#include "gromacs/legacyheaders/orires.h"
#include "../gmxlib/nonbonded/nb_kernel.h"
#include "../gmxlib/nonbonded/nb_free_energy.h"
+#include "gromacs/bonded/bonded.h"
#include "gromacs/legacyheaders/types/commrec.h"
#include "gromacs/mdlib/nbnxn_cuda/nbnxn_cuda_data_mgmt.h"
#include "gromacs/pbcutil/ishift.h"
do_force_lowlevel(fr, inputrec, &(top->idef),
cr, nrnb, wcycle, mdatoms,
x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
- &(top->atomtypes), bBornRadii, box,
+ bBornRadii, box,
inputrec->fepvals, lambda, graph, &(top->excls), fr->mu_tot,
flags, &cycles_pme);
do_force_lowlevel(fr, inputrec, &(top->idef),
cr, nrnb, wcycle, mdatoms,
x, hist, f, bSepLRF ? fr->f_twin : f, enerd, fcd, top, fr->born,
- &(top->atomtypes), bBornRadii, box,
+ bBornRadii, box,
inputrec->fepvals, lambda,
graph, &(top->excls), fr->mu_tot,
flags,
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, unsigned long Flags)
+ gmx_bool *bSimAnn, t_vcm **vcm, unsigned long Flags,
+ gmx_wallcycle_t wcycle)
{
int i, j, n;
real tmpt, mod;
if (nfile != -1)
{
- *outf = init_mdoutf(fplog, nfile, fnm, Flags, cr, ir, mtop, oenv);
+ *outf = init_mdoutf(fplog, nfile, fnm, Flags, cr, ir, mtop, oenv, wcycle);
*mdebin = init_mdebin((Flags & MD_APPENDFILES) ? NULL : mdoutf_get_fp_ene(*outf),
mtop, ir, mdoutf_get_fp_dhdl(*outf));
#include "gromacs/legacyheaders/txtdump.h"
#include "gromacs/utility/cstringutil.h"
#include "pme_loadbal.h"
-#include "gromacs/legacyheaders/bondf.h"
+#include "gromacs/legacyheaders/bonded-threading.h"
#include "membed.h"
#include "gromacs/legacyheaders/types/nlistheuristics.h"
#include "gromacs/legacyheaders/types/iteratedconstraints.h"
&(state_global->fep_state), lam0,
nrnb, top_global, &upd,
nfile, fnm, &outf, &mdebin,
- force_vir, shake_vir, mu_tot, &bSimAnn, &vcm, Flags);
+ force_vir, shake_vir, mu_tot, &bSimAnn, &vcm, Flags, wcycle);
clear_mat(total_vir);
clear_mat(pres);
do_md_trajectory_writing(fplog, cr, nfile, fnm, step, step_rel, t,
ir, state, state_global, top_global, fr,
outf, mdebin, ekind, f, f_global,
- wcycle, &nchkpt,
+ &nchkpt,
bCPT, bRerunMD, bLastStep, (Flags & MD_CONFOUT),
bSumEkinhOld);
/* Check if IMD step and do IMD communication, if bIMD is TRUE. */
/* End of main MD loop */
debug_gmx();
+ /* Closing TNG files can include compressing data. Therefore it is good to do that
+ * before stopping the time measurements. */
+ mdoutf_tng_close(outf);
+
/* Stop measuring walltime */
walltime_accounting_end(walltime_accounting);