From: hackbard Date: Mon, 18 Aug 2008 12:09:55 +0000 (+0200) Subject: fixed virial (for albe pot) X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=45a8aeb3cf3238c8f54560973d5fcc164a137373;p=physik%2Fposic.git fixed virial (for albe pot) --- diff --git a/potentials/albe.c b/potentials/albe.c index c01ab15..02c254f 100644 --- 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 */ - virial_calc(aj,&force,&(exchange->dist_ij)); + virial_calc(ai,&force,&(exchange->dist_ij)); #ifdef DEBUG if(moldyn->time>DSTART&&moldyn->timetime>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); @@ -507,13 +507,13 @@ if(moldyn->time>DSTART&&moldyn->timef),&(ai->f),&force); - /* virial */ - virial_calc(ai,&force,&dist_ik); - /* increase k counter */ exchange->kcount++;