/*
* This file is part of the GROMACS molecular simulation package.
*
- * 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.
#ifndef _tables_h
#define _tables_h
-
+#include "gromacs/legacyheaders/types/interaction_const.h"
+#include "gromacs/legacyheaders/types/simple.h"
#ifdef __cplusplus
extern "C" {
}
#endif
-void table_spline3_fill_ewald_lr(real *table_F,
- real *table_V,
- real *table_FDV0,
- int ntab,
- real dx,
- real beta);
+typedef double (*real_space_grid_contribution_computer)(double, double);
+/* Function pointer used to tell table_spline3_fill_ewald_lr whether it
+ * should calculate the grid contribution for electrostatics or LJ.
+ */
+
+void table_spline3_fill_ewald_lr(real *table_F,
+ real *table_V,
+ real *table_FDV0,
+ int ntab,
+ double dx,
+ real beta,
+ real_space_grid_contribution_computer v_lr);
/* Fill tables of ntab points with spacing dr with the ewald long-range
* (mesh) force.
* There are three separate tables with format FDV0, F, and V.
* The force can then be interpolated linearly.
*/
-real ewald_spline3_table_scale(real ewaldcoeff, real rc);
+real ewald_spline3_table_scale(const interaction_const_t *ic);
/* Return the scaling for the Ewald quadratic spline tables. */
+double v_q_ewald_lr(double beta, double r);
+/* Return the real space grid contribution for Ewald*/
+
+double v_lj_ewald_lr(double beta, double r);
+/* Return the real space grid contribution for LJ-Ewald*/
#ifdef __cplusplus
}