]> hackdaworld.org Git - physik/posic.git/commitdiff
more verbose insertion + d2 fix
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Tue, 29 Apr 2008 16:08:33 +0000 (18:08 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Tue, 29 Apr 2008 16:08:33 +0000 (18:08 +0200)
config.default
mdrun.c

index 74e49975b68232e457c10b66168557239b47e274..ecc87fc7b1651bcd8458c86f641f4adb84dc1e28 100644 (file)
@@ -20,7 +20,7 @@ pbc 1 1 1
 
 ## temperature / pressure ##
 
-temperature 0.0
+temperature 723
 pressure 0.0
 
 ## initial lattice ##
@@ -46,8 +46,8 @@ sattr pctrl 100.0 tctrl 100.0 prelax 1.0 trelax 1.0 rsteps 100 avgrst 1
 
 ## more stages ##
 
-stage ins_atoms 10 1 14 0 vh123 rand -5.5 -5.5 -5.5 5.5 5.5 5.5
-stage ins_atoms 1 1 6 1 vh123 rand 0 0 0 5.429 5.429 5.429
+stage ins_atoms 10 1 14 0 vh123 rand -5.5 -5.5 -5.5 5.5 5.5 5.5 1.5
+stage ins_atoms 1 1 6 1 vh123 rand -2.715 -2.715 -2.715 2.715 2.715 2.715 1.5
 stage continue 10000
 #stage anneal 723 -1.0
 
diff --git a/mdrun.c b/mdrun.c
index 31abd1c069a0cbe6dd5660cbc82fae22990ef672..eff1ee5ec673a02df713595f238d844af873a34a 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;
        }