function [psi,V,VDk] = initialize(this,Params,VParams,Transf) % == User-defined potential == % V = this.Potential; assert(~anynan(V), 'Potential not defined! Specify as .Potential = .trap() + .'); % == Calculating the DDIs == % VDk = this.Calculator.calculateVDkWithCutoff(Transf, Params, VParams); save(sprintf(strcat(this.SaveDirectory, '/VDk_M.mat')),'VDk'); fprintf('Computed and saved DDI potential in Fourier space with cutoff.\n') % == Setting up the initial wavefunction == % psi = this.setupWavefunction(Params,Transf); if this.RunOnGPU psi = gpuArray(psi); end end