/*
+ * This file is part of the GROMACS molecular simulation package.
*
- * This source code is part of
- *
- * G R O M A C S
- *
- * GROningen MAchine for Chemical Simulations
- *
- * VERSION 3.2.0
- * Written by David van der Spoel, Erik Lindahl, Berk Hess, and others.
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
- * Copyright (c) 2001-2004, The GROMACS development team,
- * check out http://www.gromacs.org for more information.
-
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * as published by the Free Software Foundation; either version 2
+ * Copyright (c) 2001-2004, The GROMACS development team.
+ * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
+ * and including many others, as listed in the AUTHORS file in the
+ * top-level source directory and at http://www.gromacs.org.
+ *
+ * GROMACS is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public License
+ * as published by the Free Software Foundation; either version 2.1
* of the License, or (at your option) any later version.
*
- * If you want to redistribute modifications, please consider that
- * scientific software is very special. Version control is crucial -
- * bugs must be traceable. We will be happy to consider code for
- * inclusion in the official distribution, but derived work must not
- * be called official GROMACS. Details are found in the README & COPYING
- * files - if they are missing, get the official version at www.gromacs.org.
+ * GROMACS is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
*
- * To help us fund GROMACS development, we humbly ask that you cite
- * the papers on the package - you can find them in the top README file.
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with GROMACS; if not, see
+ * http://www.gnu.org/licenses, or write to the Free Software Foundation,
+ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
- * For more info, check our website at http://www.gromacs.org
+ * If you want to redistribute modifications to GROMACS, please
+ * consider that scientific software is very special. Version
+ * control is crucial - bugs must be traceable. We will be happy to
+ * consider code for inclusion in the official distribution, but
+ * derived work must not be called official GROMACS. Details are found
+ * in the README & COPYING files - if they are missing, get the
+ * official version at http://www.gromacs.org.
*
- * And Hey:
- * GRoups of Organic Molecules in ACtion for Science
+ * To help us fund GROMACS development, we humbly ask that you cite
+ * the research papers on the package. Check out http://www.gromacs.org.
*/
-#include "ns.h"
-#include "genborn.h"
-#include "qmmmrec.h"
-#include "idef.h"
-#include "nb_verlet.h"
-#include "interaction_const.h"
-#include "hw_info.h"
+#ifndef GMX_LEGACYHEADERS_TYPES_FORCEREC_H
+#define GMX_LEGACYHEADERS_TYPES_FORCEREC_H
+
+#include "gromacs/legacyheaders/types/enums.h"
+#include "gromacs/legacyheaders/types/ns.h"
+#include "gromacs/legacyheaders/types/genborn.h"
+#include "gromacs/legacyheaders/types/qmmmrec.h"
+#include "../../topology/idef.h"
+#include "gromacs/legacyheaders/types/interaction_const.h"
+#include "gromacs/legacyheaders/types/hw_info.h"
#ifdef __cplusplus
extern "C" {
/* Abstract type for PME that is defined only in the routine that use them. */
typedef struct gmx_pme *gmx_pme_t;
-
-
+struct nonbonded_verlet_t;
/* Structure describing the data in a single table */
typedef struct
t_nblist nlist_lr[eNL_NR];
} t_nblists;
-/* macros for the cginfo data in forcerec */
-/* The maximum cg size in cginfo is 63
+/* macros for the cginfo data in forcerec
+ *
+ * Since the tpx format support max 256 energy groups, we do the same here.
+ * Note that we thus have bits 8-14 still unused.
+ *
+ * The maximum cg size in cginfo is 63
* because we only have space for 6 bits in cginfo,
* this cg size entry is actually only read with domain decomposition.
* But there is a smaller limit due to the t_excl data structure
* which is defined in nblist.h.
*/
-#define SET_CGINFO_GID(cgi, gid) (cgi) = (((cgi) & ~65535) | (gid) )
-#define GET_CGINFO_GID(cgi) ( (cgi) & 65535)
+#define SET_CGINFO_GID(cgi, gid) (cgi) = (((cgi) & ~255) | (gid))
+#define GET_CGINFO_GID(cgi) ( (cgi) & 255)
+#define SET_CGINFO_FEP(cgi) (cgi) = ((cgi) | (1<<15))
+#define GET_CGINFO_FEP(cgi) ( (cgi) & (1<<15))
#define SET_CGINFO_EXCL_INTRA(cgi) (cgi) = ((cgi) | (1<<16))
#define GET_CGINFO_EXCL_INTRA(cgi) ( (cgi) & (1<<16))
#define SET_CGINFO_EXCL_INTER(cgi) (cgi) = ((cgi) | (1<<17))
#define GET_CGINFO_EXCL_INTER(cgi) ( (cgi) & (1<<17))
-#define SET_CGINFO_SOLOPT(cgi, opt) (cgi) = (((cgi) & ~(3<<18)) | ((opt)<<18))
+#define SET_CGINFO_SOLOPT(cgi, opt) (cgi) = (((cgi) & ~(3<<18)) | ((opt)<<18))
#define GET_CGINFO_SOLOPT(cgi) (((cgi)>>18) & 3)
#define SET_CGINFO_CONSTR(cgi) (cgi) = ((cgi) | (1<<20))
#define GET_CGINFO_CONSTR(cgi) ( (cgi) & (1<<20))
#define GET_CGINFO_HAS_VDW(cgi) ( (cgi) & (1<<23))
#define SET_CGINFO_HAS_Q(cgi) (cgi) = ((cgi) | (1<<24))
#define GET_CGINFO_HAS_Q(cgi) ( (cgi) & (1<<24))
-#define SET_CGINFO_NATOMS(cgi, opt) (cgi) = (((cgi) & ~(63<<25)) | ((opt)<<25))
+#define SET_CGINFO_NATOMS(cgi, opt) (cgi) = (((cgi) & ~(63<<25)) | ((opt)<<25))
#define GET_CGINFO_NATOMS(cgi) (((cgi)>>25) & 63)
rvec *fshift;
real ener[F_NRE];
gmx_grppairener_t grpp;
- real Vcorr;
+ real Vcorr_q;
+ real Vcorr_lj;
real dvdl[efptNR];
- tensor vir;
+ tensor vir_q;
+ tensor vir_lj;
} f_thread_t;
typedef struct {
rvec posres_comB;
const gmx_hw_info_t *hwinfo;
- gmx_bool use_cpu_acceleration;
+ const gmx_gpu_opt_t *gpu_opt;
+ gmx_bool use_simd_kernels;
/* Interaction for calculated in kernels. In many cases this is similar to
* the electrostatics settings in the inputrecord, but the difference is that
/* Charge sum and dipole for topology A/B ([0]/[1]) for Ewald corrections */
double qsum[2];
double q2sum[2];
+ double c6sum[2];
rvec mu_tot[2];
/* Dispersion correction stuff */
real sc_r_power;
real sc_sigma6_def;
real sc_sigma6_min;
- gmx_bool bSepDVDL;
/* NS Stuff */
int eeltype;
rvec *shift_vec;
/* The neighborlists including tables */
- int nnblists;
- int *gid2nblists;
- t_nblists *nblists;
+ int nnblists;
+ int *gid2nblists;
+ t_nblists *nblists;
- int cutoff_scheme; /* group- or Verlet-style cutoff */
- gmx_bool bNonbonded; /* true if nonbonded calculations are *not* turned off */
- nonbonded_verlet_t *nbv;
+ int cutoff_scheme; /* group- or Verlet-style cutoff */
+ gmx_bool bNonbonded; /* true if nonbonded calculations are *not* turned off */
+ struct nonbonded_verlet_t *nbv;
/* The wall tables (if used) */
int nwall;
gmx_bool bTwinRange;
int nlr;
rvec *f_twin;
+ /* Constraint virial correction for multiple time stepping */
+ tensor vir_twin_constr;
/* Forces that should not enter into the virial summation:
* PPPM/PME/Ewald/posres
/* Long-range forces and virial for PPPM/PME/Ewald */
gmx_pme_t pmedata;
+ int ljpme_combination_rule;
tensor vir_el_recip;
+ tensor vir_lj_recip;
/* PME/Ewald stuff */
gmx_bool bEwald;
- real ewaldcoeff;
+ real ewaldcoeff_q;
+ real ewaldcoeff_lj;
ewald_tab_t ewald_table;
/* Virial Stuff */
int ntype; /* Number of atom types */
gmx_bool bBHAM;
real *nbfp;
+ real *ljpme_c6grid; /* C6-values used on grid in LJPME */
/* Energy group pair flags */
int *egp_flags;
- /* xmdrun flexible constraints */
+ /* Shell molecular dynamics flexible constraints */
real fc_stepsize;
/* Generalized born implicit solvent */
#ifdef __cplusplus
}
#endif
+#endif