]> hackdaworld.org Git - physik/posic.git/commitdiff
correction of fatal errors!
authorhackbard <hackbard@sage.physik.uni-augsburg.de>
Fri, 16 May 2008 08:44:30 +0000 (10:44 +0200)
committerhackbard <hackbard@sage.physik.uni-augsburg.de>
Fri, 16 May 2008 08:44:30 +0000 (10:44 +0200)
mdrun.c

diff --git a/mdrun.c b/mdrun.c
index d99bd7a169f4637afd0266dfbba3f2fc36a3f3c7..29d3160acdc9375864ff56788a293704e8c3ccee 100644 (file)
--- a/mdrun.c
+++ b/mdrun.c
@@ -879,10 +879,18 @@ int main(int argc,char **argv) {
 
        /* prepare simulation */
 
-       moldyn_init(&moldyn,argc,argv);
-
-       if(mdrun.continue_file)
+       if(mdrun.continue_file[0]) {
+               // read the save file
                moldyn_read_save_file(&moldyn,mdrun.continue_file);
+               // manualaadjusting some stuff
+               moldyn.argc=argc;
+               moldyn.args=argv;
+               rand_init(&(moldyn.random),NULL,1);
+               moldyn.random.status|=RAND_STAT_VERBOSE;
+       }
+       else {
+               moldyn_init(&moldyn,argc,argv);
+       }
        
        if(set_int_alg(&moldyn,mdrun.intalgo)<0)
                return -1;
@@ -915,7 +923,7 @@ int main(int argc,char **argv) {
        }
 
        /* if it is a continue run, reset schedule and skip lattice init */
-       if(mdrun.continue_file) {
+       if(mdrun.continue_file[0]) {
                memset(&(moldyn.schedule),0,sizeof(t_moldyn_schedule));
                goto addsched;
        }