From: hackbard Date: Mon, 18 Aug 2008 10:16:20 +0000 (+0200) Subject: fixed virial calc! X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=2076649dc4067af11bfeabc4ef3f353420b3df14;p=physik%2Fposic.git fixed virial calc! --- 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++;