Minor mods
This commit is contained in:
parent
5068491cc8
commit
0f3a261973
@ -3,6 +3,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
format long;
|
||||
|
||||
AdditionalParams.GradientDescentMethod = this.GradientDescentMethod;
|
||||
SimulationMode = this.SimulationMode;
|
||||
|
||||
switch this.GradientDescentMethod
|
||||
case 'HeavyBall'
|
||||
@ -17,7 +18,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
|
||||
% Live Plotter
|
||||
if this.PlotLive
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||
drawnow
|
||||
end
|
||||
|
||||
@ -63,7 +64,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
Observ.res_idx = Observ.res_idx + 1;
|
||||
|
||||
if this.PlotLive
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||
drawnow
|
||||
end
|
||||
|
||||
@ -84,9 +85,8 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
E = this.Calculator.calculateTotalEnergy(psi,Params,Transf,VDk,V) / Norm;
|
||||
Observ.EVec = [Observ.EVec E];
|
||||
|
||||
disp('Saving data...');
|
||||
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
||||
disp('Save complete!');
|
||||
disp('Completed and saved!');
|
||||
|
||||
case 'NonLinearCGD'
|
||||
|
||||
@ -104,7 +104,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
|
||||
% Live plotter
|
||||
if this.PlotLive
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||
drawnow
|
||||
end
|
||||
|
||||
@ -182,7 +182,7 @@ function [psi] = runGradientDescent(this,psi,Params,Transf,VDk,V,Observ)
|
||||
|
||||
% Live plotter
|
||||
if this.PlotLive
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,this.SimulationMode, AdditionalParams)
|
||||
Plotter.plotLive(psi,Params,Transf,Observ,SimulationMode,AdditionalParams)
|
||||
drawnow
|
||||
end
|
||||
save(sprintf(strcat(this.SaveDirectory, '/Run_%03i/psi_gs.mat'),Params.njob),'psi','muchem','Observ','Transf','Params','VDk','V');
|
||||
|
Loading…
Reference in New Issue
Block a user