#ifdef STATIC_LISTS
int *neighbour_i[27];
int p,q;
- t_atom *atom;
+#elif LOWMEM_LISTS
+ int neighbour_i[27];
+ int p,q;
#else
t_list neighbour_i[27];
t_list neighbour_i2[27];
count=moldyn->count;
itom=moldyn->atom;
lc=&(moldyn->lc);
-#ifdef STATIC_LISTS
- atom=moldyn->atom;
-#endif
// optimized
params=moldyn->pot_params;
dnlc=lc->dnlc;
/* copy the neighbour lists */
-#ifndef STATIC_LISTS
+#ifdef STATIC_LISTS
+#elif LOWMEM_LISTS
+#else
memcpy(neighbour_i2,neighbour_i,27*sizeof(t_list));
#endif
while(neighbour_i[j][p]!=-1) {
- jtom=&(atom[neighbour_i[j][p]]);
+ jtom=&(itom[neighbour_i[j][p]]);
p++;
+#elif LOWMEM_LISTS
+ p=neighbour_i[j];
+
+ while(p!=-1) {
+
+ jtom=&(itom[p]);
+ p=lc->subcell->list[p];
#else
this=&(neighbour_i[j]);
list_reset_f(this);
while(neighbour_i[k][q]!=-1) {
- ktom=&(atom[neighbour_i[k][q]]);
+ ktom=&(itom[neighbour_i[k][q]]);
q++;
+#elif LOWMEM_LISTS
+ q=neighbour_i[k];
+
+ while(q!=-1) {
+
+ ktom=&(itom[q]);
+ q=lc->subcell->list[q];
#else
that=&(neighbour_i2[k]);
list_reset_f(that);
#ifdef STATIC_LISTS
}
+#elif LOWMEM_LISTS
+ }
#else
} while(list_next_f(that)!=\
L_NO_NEXT_ELEMENT);
while(neighbour_i[k][q]!=-1) {
- ktom=&(atom[neighbour_i[k][q]]);
+ ktom=&(itom[neighbour_i[k][q]]);
q++;
+#elif LOWMEM_LISTS
+ q=neighbour_i[k];
+
+ while(q!=-1) {
+
+ ktom=&(itom[q]);
+ q=lc->subcell->list[q];
#else
that=&(neighbour_i2[k]);
list_reset_f(that);
#ifdef STATIC_LISTS
}
+#elif LOWMEM_LISTS
+ }
#else
} while(list_next_f(that)!=\
L_NO_NEXT_ELEMENT);
#ifdef STATIC_LISTS
}
+#elif LOWMEM_LISTS
+ }
#else
} while(list_next_f(this)!=L_NO_NEXT_ELEMENT);
#endif