more verbose insertion + d2 fix
[physik/posic.git] / mdrun.c
diff --git a/mdrun.c b/mdrun.c
index 31abd1c..eff1ee5 100644 (file)
--- a/mdrun.c
+++ b/mdrun.c
@@ -402,8 +402,10 @@ int mdrun_parse_config(t_mdrun *mdrun) {
                                        }
                                }
                                // only rand mode by now
-                               if(word[8][0]=='t')
+                               if(word[8][0]=='t') {
                                        iap.type=INS_TOTAL;
+                                       iap.cr=atof(word[9]);
+                               }
                                else {
                                        iap.type=INS_REGION;
                                        iap.x0=atof(word[8]);
@@ -412,6 +414,7 @@ int mdrun_parse_config(t_mdrun *mdrun) {
                                        iap.x1=atof(word[11]);
                                        iap.y1=atof(word[12]);
                                        iap.z1=atof(word[13]);
+                                       iap.cr=atof(word[14]);
                                }
                                add_stage(mdrun,STAGE_INSERT_ATOMS,&iap);
                        }
@@ -550,8 +553,10 @@ int insert_atoms(t_moldyn *moldyn,t_mdrun *mdrun) {
                }
                add_atom(moldyn,iap->element,pse_mass[iap->element],
                         iap->brand,iap->attr,&r,&v);
-               printf("%s atom inserted: %f %f %f | d squared = %f\n",
-                      ME,r.x,r.y,r.z,dmin);
+               printf("%s atom inserted (%d/%d): %f %f %f\n",
+                      ME,(iap->cnt_steps+1)*iap->ins_atoms,
+                      iap->ins_steps*iap->ins_atoms,r.x,r.y,r.z);
+               printf("  -> d2 = %f/%f\n",dmin,iap->cr*iap->cr);
                cnt+=1;
        }