anchor.diff:            i2 = links(2,i_link)
             d = distances(i_link)
   
  -          r = rel_pos(p% pos_rattle(:,i1),p% pos_rattle(:,i2), edges)
  -          s = rel_pos(p% pos(:,i1),p% pos(:,i2), edges)
  +          r = p%pos_rattle(:,i1)-p%pos_rattle(:,i2)
  +          s = p%pos(:,i1)-p%pos(:,i2)
             i_mass1 = i_mass(p%species(i1))
             i_mass2 = i_mass(p%species(i2))
             inv_mass = i_mass1 + i_mass2
  
positive.code:     end do rattle_loop
      call p%time_rattle_pos%tac()
      deallocate(i_mass)
  
      if (rattle_i==rattle_max) write(*,*) 'rattle_max reached in rattle_body_pos'
  
  
negative.code:           i_mass1 = i_mass(p%species(i1))
            i_mass2 = i_mass(p%species(i2))
            inv_mass = i_mass1 + i_mass2
            s = p%pos(:,i1)-p% pos(:,i2)
            k = abs(dot_product(p%vel(:,i1)-p%vel(:,i2), s) / (d**2*inv_mass))
            if (k>error) error = k
         end do
  