projects
/
physik
/
posic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
363a969
)
fixed virial (for albe pot)
author
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 18 Aug 2008 12:09:55 +0000
(14:09 +0200)
committer
hackbard
<hackbard@sage.physik.uni-augsburg.de>
Mon, 18 Aug 2008 12:09:55 +0000
(14:09 +0200)
potentials/albe.c
patch
|
blob
|
history
diff --git
a/potentials/albe.c
b/potentials/albe.c
index
c01ab15
..
02c254f
100644
(file)
--- a/
potentials/albe.c
+++ b/
potentials/albe.c
@@
-355,7
+355,7
@@
int albe_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) {
v3_add(&(aj->f),&(aj->f),&force);
/* virial */
v3_add(&(aj->f),&(aj->f),&force);
/* virial */
- virial_calc(a
j
,&force,&(exchange->dist_ij));
+ virial_calc(a
i
,&force,&(exchange->dist_ij));
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
@@
-479,13
+479,13
@@
if(moldyn->time>DSTART&&moldyn->time<DEND) {
}
#endif
}
#endif
+ /* virial */
+ virial_calc(ai,&force,&dist_ij);
+
/* force contribution to atom i */
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
/* force contribution to atom i */
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
- /* virial */
- virial_calc(ai,&force,&dist_ij);
-
/* derivative wrt k */
v3_scale(&force,&dist_ik,-1.0*dfcg); // dri rik = - drk rik
v3_scale(&tmp,&dcosdrk,fcdg);
/* derivative wrt k */
v3_scale(&force,&dist_ik,-1.0*dfcg); // dri rik = - drk rik
v3_scale(&tmp,&dcosdrk,fcdg);
@@
-507,13
+507,13
@@
if(moldyn->time>DSTART&&moldyn->time<DEND) {
}
#endif
}
#endif
+ /* virial */
+ virial_calc(ai,&force,&dist_ik);
+
/* force contribution to atom i */
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
/* force contribution to atom i */
v3_scale(&force,&force,-1.0);
v3_add(&(ai->f),&(ai->f),&force);
- /* virial */
- virial_calc(ai,&force,&dist_ik);
-
/* increase k counter */
exchange->kcount++;
/* increase k counter */
exchange->kcount++;