*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2004, The GROMACS development team.
- * Copyright (c) 2013,2014,2015,2016,2017,2018, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2015,2016,2017,2018,2019, 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.
* but a frame might be returned which does not contain the field.
* When a NEED flag is set, frames not containing the field will be skipped.
*/
-#define TRX_READ_X (1<<0)
-#define TRX_NEED_X (1<<1)
-#define TRX_READ_V (1<<2)
-#define TRX_NEED_V (1<<3)
-#define TRX_READ_F (1<<4)
-#define TRX_NEED_F (1<<5)
+#define TRX_READ_X (1u<<0u)
+#define TRX_NEED_X (1u<<1u)
+#define TRX_READ_V (1u<<2u)
+#define TRX_NEED_V (1u<<3u)
+#define TRX_READ_F (1u<<4u)
+#define TRX_NEED_F (1u<<5u)
/* Useful for reading natoms from a trajectory without skipping */
-#define TRX_DONT_SKIP (1<<6)
+#define TRX_DONT_SKIP (1u<<6u)
/* For trxframe.not_ok */
-#define HEADER_NOT_OK (1<<0)
-#define DATA_NOT_OK (1<<1)
+#define HEADER_NOT_OK (1u<<0u)
+#define DATA_NOT_OK (1u<<1u)
#define FRAME_NOT_OK (HEADER_NOT_OK | DATA_NOT_OK)
bool read_first_frame(const gmx_output_env_t *oenv, t_trxstatus **status,
*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2012, The GROMACS development team.
- * Copyright (c) 2012,2014,2015,2017, by the GROMACS development team, led by
+ * Copyright (c) 2012,2014,2015,2017,2019, 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.
/* Flags to tell the force calculation routines what (not) to do */
/* The state has changed, always set unless TPI is used. */
-#define GMX_FORCE_STATECHANGED (1<<0)
+#define GMX_FORCE_STATECHANGED (1u<<0u)
/* The box might have changed */
-#define GMX_FORCE_DYNAMICBOX (1<<1)
+#define GMX_FORCE_DYNAMICBOX (1u<<1u)
/* Do neighbor searching */
-#define GMX_FORCE_NS (1<<2)
+#define GMX_FORCE_NS (1u<<2u)
/* Calculate listed energies/forces (e.g. bonds, restraints, 1-4, FEP non-bonded) */
-#define GMX_FORCE_LISTED (1<<4)
+#define GMX_FORCE_LISTED (1u<<4u)
/* Calculate non-bonded energies/forces */
-#define GMX_FORCE_NONBONDED (1<<6)
+#define GMX_FORCE_NONBONDED (1u<<6u)
/* Calculate forces (not only energies) */
-#define GMX_FORCE_FORCES (1<<7)
+#define GMX_FORCE_FORCES (1u<<7u)
/* Calculate the virial */
-#define GMX_FORCE_VIRIAL (1<<8)
+#define GMX_FORCE_VIRIAL (1u<<8u)
/* Calculate energies */
-#define GMX_FORCE_ENERGY (1<<9)
+#define GMX_FORCE_ENERGY (1u<<9u)
/* Calculate dHdl */
-#define GMX_FORCE_DHDL (1<<10)
+#define GMX_FORCE_DHDL (1u<<10u)
/* Normally one want all energy terms and forces */
#define GMX_FORCE_ALLFORCES (GMX_FORCE_LISTED | GMX_FORCE_NONBONDED | GMX_FORCE_FORCES)
*/
/* we are initializing and not yet in the actual MD loop */
-#define CGLO_INITIALIZATION (1<<1)
+#define CGLO_INITIALIZATION (1u<<1u)
/* we are computing the kinetic energy from average velocities */
-#define CGLO_EKINAVEVEL (1<<2)
+#define CGLO_EKINAVEVEL (1u<<2u)
/* we are removing the center of mass momenta */
-#define CGLO_STOPCM (1<<3)
+#define CGLO_STOPCM (1u<<3u)
/* bGStat is defined in do_md */
-#define CGLO_GSTAT (1<<4)
+#define CGLO_GSTAT (1u<<4u)
/* Sum the energy terms in global computation */
-#define CGLO_ENERGY (1<<6)
+#define CGLO_ENERGY (1u<<6u)
/* Sum the kinetic energy terms in global computation */
-#define CGLO_TEMPERATURE (1<<7)
+#define CGLO_TEMPERATURE (1u<<7u)
/* Sum the kinetic energy terms in global computation */
-#define CGLO_PRESSURE (1<<8)
+#define CGLO_PRESSURE (1u<<8u)
/* Sum the constraint term in global computation */
-#define CGLO_CONSTRAINT (1<<9)
+#define CGLO_CONSTRAINT (1u<<9u)
/* Reading ekin from the trajectory */
-#define CGLO_READEKIN (1<<10)
+#define CGLO_READEKIN (1u<<10u)
/* we need to reset the ekin rescaling factor here */
-#define CGLO_SCALEEKIN (1<<11)
+#define CGLO_SCALEEKIN (1u<<11u)
/* After a new DD partitioning, we need to set a flag to schedule
* global reduction of the total number of bonded interactions that
* will be computed, to check none are missing. */
-#define CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS (1<<12)
+#define CGLO_CHECK_NUMBER_OF_BONDED_INTERACTIONS (1u<<12u)
/*! \brief Return the number of steps that will take place between
gmx_bool bDoDHDL = FALSE, bDoFEP = FALSE, bDoExpanded = FALSE;
gmx_bool do_ene, do_log, do_verbose;
gmx_bool bMasterState;
- int force_flags, cglo_flags;
+ unsigned int force_flags;
tensor force_vir = {{0}}, shake_vir = {{0}}, total_vir = {{0}},
tmp_vir = {{0}}, pres = {{0}};
int i, m;
if (!ir->bContinuation)
{
- if (state->flags & (1 << estV))
+ if (state->flags & (1u << estV))
{
auto v = makeArrayRef(state->v);
/* Set the velocities of vsites, shells and frozen atoms to zero */
restore_ekinstate_from_state(cr, ekind, &state_global->ekinstate);
}
- cglo_flags = (CGLO_INITIALIZATION | CGLO_TEMPERATURE | CGLO_GSTAT
- | (EI_VV(ir->eI) ? CGLO_PRESSURE : 0)
- | (EI_VV(ir->eI) ? CGLO_CONSTRAINT : 0)
- | (hasReadEkinState ? CGLO_READEKIN : 0));
+ unsigned int cglo_flags = (CGLO_INITIALIZATION | CGLO_TEMPERATURE | CGLO_GSTAT
+ | (EI_VV(ir->eI) ? CGLO_PRESSURE : 0)
+ | (EI_VV(ir->eI) ? CGLO_CONSTRAINT : 0)
+ | (hasReadEkinState ? CGLO_READEKIN : 0));
bSumEkinhOld = FALSE;
*/
for (int cgloIteration = 0; cgloIteration < (bStopCM ? 2 : 1); cgloIteration++)
{
- int cglo_flags_iteration = cglo_flags;
+ unsigned int cglo_flags_iteration = cglo_flags;
if (bStopCM && cgloIteration == 0)
{
cglo_flags_iteration |= CGLO_STOPCM;
/* With all integrators, except VV, we need to retain the pressure
* at the current step for coupling at the next step.
*/
- if ((state->flags & (1<<estPRES_PREV)) &&
+ if ((state->flags & (1u<<estPRES_PREV)) &&
(bGStatEveryStep ||
(ir->nstpcouple > 0 && step % ir->nstpcouple == 0)))
{
double t, lam0[efptNR];
bool isLastStep = false;
bool doFreeEnergyPerturbation = false;
- int force_flags;
+ unsigned int force_flags;
tensor force_vir, shake_vir, total_vir, pres;
rvec mu_tot;
gmx_localtop_t top;
double t, lam0[efptNR];
bool isLastStep = false;
bool doFreeEnergyPerturbation = false;
- int force_flags;
+ unsigned int force_flags;
tensor force_vir, shake_vir, total_vir, pres;
t_trxstatus *status;
rvec mu_tot;
struct mpi_in_place_buf_t;
struct gmx_domdec_t;
-#define DUTY_PP (1<<0)
-#define DUTY_PME (1<<1)
+#define DUTY_PP (1u<<0u)
+#define DUTY_PME (1u<<1u)
typedef struct {
int bUse;