- puts("foo");
- d=1.0/v3_absolute_square(&distance); /* 1/r^2 */
- h1=d*d; /* 1/r^4 */
- h2*=d; /* 1/r^6 */
- h1=h2*h2; /* 1/r^12 */
- u+=eps*(sig12*h1-sig6*h2);
- h2*=d; /* 1/r^8 */
- h1*=d; /* 1/r^14 */
- h2*=6*sig6;
- h1*=12*sig12;
- d=-h1+h2;
- d*=eps;
- v3_scale(&force,&distance,d);
- v3_add(&(atom[i].f),&(atom[i].f),&force);
- printf("test!!\n");
+ d=v3_absolute_square(&distance); /* 1/r^2 */
+ if(d<=moldyn->cutoff_square) {
+ d=1.0/d; /* 1/r^2 */
+ h1=d*d; /* 1/r^4 */
+ h2*=d; /* 1/r^6 */
+ h1=h2*h2; /* 1/r^12 */
+ u+=eps*(sig12*h1-sig6*h2);
+ h2*=d; /* 1/r^8 */
+ h1*=d; /* 1/r^14 */
+ h2*=6*sig6;
+ h1*=12*sig12;
+ d=-h1+h2;
+ d*=eps;
+ v3_scale(&force,&distance,d);
+ v3_add(&(atom[i].f),&(atom[i].f),&force);
+ }