/* 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;
}
/* 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;
}