fixed static lists + first work on lowmem lists
[physik/posic.git] / potentials / albe_fast.c
index 6331064..4523938 100644 (file)
@@ -171,7 +171,7 @@ int albe_potential_force_calc(t_moldyn *moldyn) {
 #ifdef STATIC_LISTS
                        p=0;
 
-                       while(neighbour_i[j][p]!=0) {
+                       while(neighbour_i[j][p]!=-1) {
 
                                jtom=&(atom[neighbour_i[j][p]]);
                                p++;
@@ -236,7 +236,7 @@ int albe_potential_force_calc(t_moldyn *moldyn) {
 #ifdef STATIC_LISTS
                                        q=0;
 
-                                       while(neighbour_i[j][q]!=0) {
+                                       while(neighbour_i[k][q]!=-1) {
 
                                                ktom=&(atom[neighbour_i[k][q]]);
                                                q++;
@@ -466,7 +466,7 @@ if(moldyn->time>DSTART&&moldyn->time<DEND) {
 #ifdef STATIC_LISTS
                                        q=0;
 
-                                       while(neighbour_i[j][q]!=0) {
+                                       while(neighbour_i[k][q]!=-1) {
 
                                                ktom=&(atom[neighbour_i[k][q]]);
                                                q++;