albe force calc bug fixed, sic mods, mean virial
[physik/posic.git] / potentials / tersoff.c
index da92ea5..6bfcf30 100644 (file)
@@ -312,6 +312,14 @@ int tersoff_mult_3bp_k1(t_moldyn *moldyn,
                exchange->zeta_ij+=f_c_ik*g;
        }
 
+#ifdef DEBUG
+       if((ai==&(moldyn->atom[0]))|
+          (aj==&(moldyn->atom[864]))|
+          (ak==&(moldyn->atom[1003]))) {
+               printf(" -> %f %f %f\n",exchange->ci2di2,frac,h_cos);
+       }
+#endif
+
        /* store even more data for second k loop */
        exchange->g[kcount]=g;
        exchange->dg[kcount]=dg;
@@ -414,6 +422,9 @@ int tersoff_mult_3bp_j2(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc) {
                        printf("total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z);
                if(aj==&(moldyn->atom[0]))
                        printf("total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z);
+               printf("energy: %f = %f %f %f %f\n",0.5*f_c*(b*f_a+f_r),
+                                                   f_c,b,f_a,f_r);
+               printf("        %f %f %f\n",exchange->zeta_ij,.0,.0);
        }
 #endif