From 2076649dc4067af11bfeabc4ef3f353420b3df14 Mon Sep 17 00:00:00 2001 From: hackbard Date: Mon, 18 Aug 2008 12:16:20 +0200 Subject: [PATCH 1/1] fixed virial calc! --- potentials/albe_orig.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/potentials/albe_orig.c b/potentials/albe_orig.c index 46e1606..908f6dd 100644 --- a/potentials/albe_orig.c +++ b/potentials/albe_orig.c @@ -372,7 +372,7 @@ int albe_orig_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) { v3_add(&(aj->f),&(aj->f),&force); /* virial */ - virial_calc(aj,&force,&(exchange->dist_ij)); + virial_calc(ai,&force,&(exchange->dist_ij)); #ifdef DEBUG if(moldyn->time>DSTART&&moldyn->timeexchange); kcount=exchange->kcount; - if(kcount>ALBE_MAXN) + if(kcount>ALBE_ORIG_MAXN) printf("FATAL: neighbours!\n"); /* d_ik2 */ @@ -500,13 +500,13 @@ if(moldyn->time>DSTART&&moldyn->timef),&(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); @@ -528,13 +528,13 @@ if(moldyn->time>DSTART&&moldyn->timef),&(ai->f),&force); - /* virial */ - virial_calc(ai,&force,&dist_ik); - /* increase k counter */ exchange->kcount++; -- 2.39.2