added Verlet scheme and NxN non-bonded functionality
[alexxy/gromacs.git] / include / pme.h
index b2765b37a280d54a72d670e179cfccb0c44b575b..576b0a394c13e18d4c2830b78097144188882bf2 100644 (file)
@@ -53,9 +53,19 @@ int gmx_pme_init(gmx_pme_t *pmedata,t_commrec *cr,
                  int nnodes_major,int nnodes_minor,
                  t_inputrec *ir,int homenr,
                  gmx_bool bFreeEnergy, gmx_bool bReproducible, int nthread);
+/* Initialize the pme data structures resepectively.
+ * Return value 0 indicates all well, non zero is an error code.
+ */
 
+int gmx_pme_reinit(gmx_pme_t *         pmedata,
+                  t_commrec *         cr,
+                  gmx_pme_t           pme_src,
+                  const t_inputrec *  ir,
+                  ivec                grid_size);
+/* As gmx_pme_init, but takes most settings, except the grid, from pme_src */
+                       
 int gmx_pme_destroy(FILE *log,gmx_pme_t *pmedata);
-/* Initialize and destroy the pme data structures resepectively.
+/* Destroy the pme data structures resepectively.
  * Return value 0 indicates all well, non zero is an error code.
  */
 
@@ -117,9 +127,12 @@ void gmx_pme_send_x(t_commrec *cr, matrix box, rvec *x,
                           gmx_large_int_t step);
 /* Send the coordinates to our PME-only node and request a PME calculation */
 
-void gmx_pme_finish(t_commrec *cr);
+void gmx_pme_send_finish(t_commrec *cr);
 /* Tell our PME-only node to finish */
 
+void gmx_pme_send_switch(t_commrec *cr, ivec grid_size, real ewaldcoeff);
+/* Tell our PME-only node to switch to a new grid size */
+
 void gmx_pme_receive_f(t_commrec *cr,
                              rvec f[], matrix vir, 
                              real *energy, real *dvdlambda,
@@ -127,14 +140,18 @@ void gmx_pme_receive_f(t_commrec *cr,
 /* PP nodes receive the long range forces from the PME nodes */
 
 int gmx_pme_recv_q_x(gmx_pme_pp_t pme_pp,
-                           real **chargeA, real **chargeB,
-                           matrix box, rvec **x,rvec **f,
-                           int *maxshift_x,int *maxshift_y,
-                           gmx_bool *bFreeEnergy,real *lambda,
-                           gmx_bool *bEnerVir,
-                           gmx_large_int_t *step);
+                    real **chargeA, real **chargeB,
+                    matrix box, rvec **x,rvec **f,
+                    int *maxshift_x, int *maxshift_y,
+                    gmx_bool *bFreeEnergy, real *lambda,
+                    gmx_bool *bEnerVir,
+                    gmx_large_int_t *step,
+                    ivec grid_size, real *ewaldcoeff);
+;
 /* Receive charges and/or coordinates from the PP-only nodes.
  * Returns the number of atoms, or -1 when the run is finished.
+ * In the special case of a PME grid size switch request, -2 is returned
+ * and grid_size and *ewaldcoeff are set, which are otherwise not set.
  */
 
 void gmx_pme_send_force_vir_ener(gmx_pme_pp_t pme_pp,