*
* Copyright (c) 1991-2000, University of Groningen, The Netherlands.
* Copyright (c) 2001-2010, The GROMACS development team.
- * Copyright (c) 2012, by the GROMACS development team, led by
+ * Copyright (c) 2012,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.
* To help us fund GROMACS development, we humbly ask that you cite
* the research papers on the package. Check out http://www.gromacs.org.
*/
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
+#include "gmxpre.h"
-
-#include "typedefs.h"
-#include "macros.h"
-#include "inputrec.h"
-#include "gmx_fatal.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/legacyheaders/macros.h"
+#include "gromacs/legacyheaders/inputrec.h"
+#include "gromacs/utility/fatalerror.h"
/* The minimum number of integration steps required for reasonably accurate
return n;
}
+
+gmx_bool ir_coulomb_switched(const t_inputrec *ir)
+{
+ return (ir->coulombtype == eelSWITCH ||
+ ir->coulombtype == eelSHIFT ||
+ ir->coulombtype == eelENCADSHIFT ||
+ ir->coulombtype == eelPMESWITCH ||
+ ir->coulombtype == eelPMEUSERSWITCH ||
+ ir->coulomb_modifier == eintmodPOTSWITCH ||
+ ir->coulomb_modifier == eintmodFORCESWITCH);
+}
+
+gmx_bool ir_coulomb_is_zero_at_cutoff(const t_inputrec *ir)
+{
+ return (ir->cutoff_scheme == ecutsVERLET ||
+ ir_coulomb_switched(ir) || ir->coulomb_modifier != eintmodNONE ||
+ ir->coulombtype == eelRF_ZERO);
+}
+
+gmx_bool ir_coulomb_might_be_zero_at_cutoff(const t_inputrec *ir)
+{
+ return (ir_coulomb_is_zero_at_cutoff(ir) || ir->coulombtype == eelUSER || ir->coulombtype == eelPMEUSER);
+}
+
+gmx_bool ir_vdw_switched(const t_inputrec *ir)
+{
+ return (ir->vdwtype == evdwSWITCH ||
+ ir->vdwtype == evdwSHIFT ||
+ ir->vdwtype == evdwENCADSHIFT ||
+ ir->vdw_modifier == eintmodPOTSWITCH ||
+ ir->vdw_modifier == eintmodFORCESWITCH);
+}
+
+gmx_bool ir_vdw_is_zero_at_cutoff(const t_inputrec *ir)
+{
+ return (ir->cutoff_scheme == ecutsVERLET ||
+ ir_vdw_switched(ir) || ir->vdw_modifier != eintmodNONE);
+}
+
+gmx_bool ir_vdw_might_be_zero_at_cutoff(const t_inputrec *ir)
+{
+ return (ir_vdw_is_zero_at_cutoff(ir) || ir->vdwtype == evdwUSER);
+}