diff --git a/Scripts/Models/Factory/private/sqw_phon.m b/Scripts/Models/Factory/private/sqw_phon.m index 010c95c5..ee764dde 100644 --- a/Scripts/Models/Factory/private/sqw_phon.m +++ b/Scripts/Models/Factory/private/sqw_phon.m @@ -685,7 +685,7 @@ seconds = floor(remaining-hours*3600-minutes*60); enddate = addtodate(now, ceil(remaining), 'second'); - options.status = [ 'ETA ' sprintf('%i:%02i:%02i', hours, minutes, seconds) ', ending on ' datestr(enddate) ]; + options.status = [ 'ETA ' sprintf('%i:%02i:%02i', hours, minutes, seconds) ', ending on ' datestr(enddate) ' [' num2str(round(move*100.0/size(displacements,1))) '%]' ]; disp([ mfilename ': ' options.status ]); sqw_phonons_htmlreport('', 'status', options); end diff --git a/Scripts/Models/Factory/private/sqw_phonons_get_forces.m b/Scripts/Models/Factory/private/sqw_phonons_get_forces.m index 07257cce..5da8cd06 100644 --- a/Scripts/Models/Factory/private/sqw_phonons_get_forces.m +++ b/Scripts/Models/Factory/private/sqw_phonons_get_forces.m @@ -222,6 +222,11 @@ [st, result] = system([ precmd 'python ' fullfile(target,'sqw_phonons_forces_iterate.py') ]); end disp(result) + % get how many steps have been computed: name is 'phonon.N[xyz][+-].pckl' + move_update = dir(fullfile(target,'phonon.*.pckl')); + if numel(move_update) > move + move = numel(move_update); + end if move <= nb_of_steps % display ETA. There are nb_of_steps steps. % up to now we have done 'move' and it took etime(clock, t) @@ -235,7 +240,7 @@ seconds = floor(remaining-hours*3600-minutes*60); enddate = addtodate(now, ceil(remaining), 'second'); - options.status = [ 'ETA ' sprintf('%i:%02i:%02i', hours, minutes, seconds) ', ending on ' datestr(enddate) '. move ' num2str(move) '/' num2str(nb_of_steps) ]; + options.status = [ 'ETA ' sprintf('%i:%02i:%02i', hours, minutes, seconds) ', ending on ' datestr(enddate) '. move ' num2str(move) '/' num2str(nb_of_steps) ' [' num2str(round(move*100.0/nb_of_steps)) '%]']; disp([ mfilename ': ' options.status ]); sqw_phonons_htmlreport('', 'status', options); end diff --git a/Scripts/Models/Factory/private/sqw_phonons_htmlreport.m b/Scripts/Models/Factory/private/sqw_phonons_htmlreport.m index 7eeaa237..b1900c0c 100644 --- a/Scripts/Models/Factory/private/sqw_phonons_htmlreport.m +++ b/Scripts/Models/Factory/private/sqw_phonons_htmlreport.m @@ -174,16 +174,20 @@ function sqw_phonons_htmlreport_table(fid, options, name) '.vtk Visualization Toolkit (VTK) file which can be viewed with ParaView, Mayavi2, VisIt, Slicer4' ... '.mrc MRC Electron density map, to be visualized with PyMol, VMD, Chimera, Yasara, VEDA' ... '.xhtml Extensible Web page. You can rotate the object (left mouse button), zoom (right mouse button), and pan (middle mouse button).', ... + '.fits Flexible Image Transport System (FITS) image, which can be viewed with e.g. ImageJ, GIMP..', ... + '.tiff TIFF image file, to be viewed with e.g. ImageJ, GIMP..' ... } [index1, index2] = strtok([ name index{1} ]); if ~isempty(dir(fullfile(options.target,index1))) % the file exists if strcmp(index1, [ name '.png' ]) - fprintf(fid, '