- /* calculation of g(r) */
- do {
- itom=lc->subcell[i].current->data;
-// GO ON HERE ...
- } while(list_next_f(this)!=L_NO_NEXT_ELEMENT););
+ /* brand of atom i */
+ ibrand=itom[i].brand;
+
+ for(j=0;j<27;j++) {
+ /* prepare the neighbour cell list */
+ this=&(neighbour[j]);
+ list_reset_f(this);
+
+ /* check for atoms */
+ if(this->start==NULL)
+ continue;
+
+ /* boundary check */
+ bc=(j<lc->dnlc)?0:1;
+
+ do {
+ jtom=this->current->data;
+
+
+ if(jtom==&(itom[i]))
+ continue;
+
+ /* only count pairs once */
+ if(itom[i].tag>jtom->tag)
+ continue;
+
+ /*
+ * pair correlation calc
+ */
+
+ /* distance */
+ v3_sub(&dist,&(jtom->r),&(itom[i].r));
+ if(bc) check_per_bound(moldyn,&dist);
+ d=v3_absolute_square(&dist);