projects
/
physik
/
posic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
2076649
)
fixed virial calc in new albe pot
author
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 18 Aug 2008 11:51:31 +0000
(13:51 +0200)
committer
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 18 Aug 2008 11:51:31 +0000
(13:51 +0200)
potentials/albe.c
patch
|
blob
|
history
diff --git
a/potentials/albe.c
b/potentials/albe.c
index
e8aee74
..
9d8336e
100644
(file)
--- a/
potentials/albe.c
+++ b/
potentials/albe.c
@@
-448,7
+448,7
@@
printf(" t: %.15f %.15f %.15f\n",aj->f.x,aj->f.y,aj->f.z);
#endif
/* virial */
#endif
/* virial */
- virial_calc(a
j
,&force,dist);
+ virial_calc(a
i
,&force,dist);
/* dzeta prefactor = - f_c f_a db, (* -0.5 due to force calc) */
exchange->pre_dzeta=0.5*f_a*f_c*db;
/* dzeta prefactor = - f_c f_a db, (* -0.5 due to force calc) */
exchange->pre_dzeta=0.5*f_a*f_c*db;
@@
-464,6
+464,9
@@
printf(" t: %.15f %.15f %.15f\n",aj->f.x,aj->f.y,aj->f.z);
}
#endif
}
#endif
+ /* virial */
+ virial_calc(ai,&force,dist);
+
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
@@
-474,9
+477,6
@@
printf(" t: %.15f %.15f %.15f\n",ai->f.x,ai->f.y,ai->f.z);
}
#endif
}
#endif
- /* virial */
- virial_calc(ai,&force,dist);
-
/* reset k counter for second k loop */
exchange->kcnt=0;
/* reset k counter for second k loop */
exchange->kcnt=0;
@@
-520,6
+520,9
@@
printf(" t: %.15f %.15f %.15f\n",ak->f.x,ak->f.y,ak->f.z);
}
#endif
}
#endif
+ /* virial */
+ virial_calc(ai,&force,&(exchange->dist[k]));
+
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
@@
-531,9
+534,6
@@
printf(" ## %f\n",exchange->d[k]);
}
#endif
}
#endif
- /* virial */
- virial_calc(ai,&force,&(exchange->dist[k]));
-
/* increase k counter */
exchange->kcnt+=1;
/* increase k counter */
exchange->kcnt+=1;