projects
/
physik
/
posic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
small mods to support site energies and kinetic energies per atom
[physik/posic.git]
/
potentials
/
albe.c
diff --git
a/potentials/albe.c
b/potentials/albe.c
index
c0a5fe4
..
28008b0
100644
(file)
--- a/
potentials/albe.c
+++ b/
potentials/albe.c
@@
-226,6
+226,7
@@
int albe_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) {
double d_ij,r0;
unsigned char brand;
double S,R,s_r,arg;
double d_ij,r0;
unsigned char brand;
double S,R,s_r,arg;
+ double energy;
params=moldyn->pot_params;
exchange=&(params->exchange);
params=moldyn->pot_params;
exchange=&(params->exchange);
@@
-309,7
+310,9
@@
int albe_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) {
exchange->pre_dzeta=-0.5*f_a*f_c*db;
/* energy contribution */
exchange->pre_dzeta=-0.5*f_a*f_c*db;
/* energy contribution */
- moldyn->energy+=0.5*f_c*(f_r+b*f_a);
+ energy=0.5*f_c*(f_r+b*f_a);
+ moldyn->energy+=energy;
+ ai->e+=energy;
/* reset k counter for second k loop */
exchange->kcount=0;
/* reset k counter for second k loop */
exchange->kcount=0;