* 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 <math.h>
-#include "typedefs.h"
-#include "mdatoms.h"
+#include "gromacs/legacyheaders/gmx_omp_nthreads.h"
+#include "gromacs/legacyheaders/mdatoms.h"
+#include "gromacs/legacyheaders/qmmm.h"
+#include "gromacs/legacyheaders/typedefs.h"
+#include "gromacs/topology/mtop_util.h"
#include "gromacs/utility/smalloc.h"
-#include "main.h"
-#include "qmmm.h"
-#include "mtop_util.h"
-#include "gmx_omp_nthreads.h"
#define ALMOST_ZERO 1e-30
t_mdatoms *init_mdatoms(FILE *fp, gmx_mtop_t *mtop, gmx_bool bFreeEnergy)
{
- int mb, a, g, nmol;
+ int a;
double tmA, tmB;
t_atom *atom;
t_mdatoms *md;
gmx_mtop_atomloop_all_t aloop;
- t_ilist *ilist;
snew(md, 1);
int i;
t_grpopts *opts;
gmx_groups_t *groups;
- gmx_molblock_t *molblock;
int nthreads gmx_unused;
+ const real oneOverSix = 1.0 / 6.0;
bLJPME = EVDW_PME(ir->vdwtype);
groups = &mtop->groups;
- molblock = mtop->molblock;
-
/* Index==NULL indicates no DD (unless we have a DD node with no
* atoms), so also check for homenr. This should be
* signaled properly with an extra parameter or nindex==-1.
alook = gmx_mtop_atomlookup_init(mtop);
+ // cppcheck-suppress unreadVariable
nthreads = gmx_omp_nthreads_get(emntDefault);
#pragma omp parallel for num_threads(nthreads) schedule(static)
for (i = 0; i < md->nr; i++)
{
- int g, ag, molb;
+ int g, ag;
real mA, mB, fac;
real c6, c12;
t_atom *atom;
}
else
{
- md->sigmaA[i] = pow(c12/c6, 1.0/6.0);
+ md->sigmaA[i] = pow(c12/c6, oneOverSix);
}
md->sigma3A[i] = 1/(md->sigmaA[i]*md->sigmaA[i]*md->sigmaA[i]);
}
}
else
{
- md->sigmaB[i] = pow(c12/c6, 1.0/6.0);
+ md->sigmaB[i] = pow(c12/c6, oneOverSix);
}
md->sigma3B[i] = 1/(md->sigmaB[i]*md->sigmaB[i]*md->sigmaB[i]);
}