Remove group scheme search code
[alexxy/gromacs.git] / src / gromacs / nbnxm / pairlist.cpp
index e0b6fd2416b36477db9e9d53ffe72e865a754f26..9b62b763c9174c628667878010c1cc0c8eba9e35 100644 (file)
@@ -51,7 +51,6 @@
 #include "gromacs/math/utilities.h"
 #include "gromacs/math/vec.h"
 #include "gromacs/mdlib/gmx_omp_nthreads.h"
-#include "gromacs/mdlib/ns.h"
 #include "gromacs/mdtypes/group.h"
 #include "gromacs/mdtypes/md_enums.h"
 #include "gromacs/nbnxm/atomdata.h"
@@ -1456,6 +1455,20 @@ static inline void fep_list_new_nri_copy(t_nblist *nlist)
     nlist->jindex[nlist->nri] = nlist->nrj;
 }
 
+/* Rellocate FEP list for size nl->maxnri, TODO: replace by C++ */
+static void reallocate_nblist(t_nblist *nl)
+{
+    if (gmx_debug_at)
+    {
+        fprintf(debug, "reallocating neigborlist (ielec=%d, ivdw=%d, igeometry=%d, type=%d), maxnri=%d\n",
+                nl->ielec, nl->ivdw, nl->igeometry, nl->type, nl->maxnri);
+    }
+    srenew(nl->iinr,   nl->maxnri);
+    srenew(nl->gid,    nl->maxnri);
+    srenew(nl->shift,  nl->maxnri);
+    srenew(nl->jindex, nl->maxnri+1);
+}
+
 /* For load balancing of the free-energy lists over threads, we set
  * the maximum nrj size of an i-entry to 40. This leads to good
  * load balancing in the worst case scenario of a single perturbed