57 log_.setMultithreading(
true);
59 log_.setCommonPreface(
"\n... ...");
62 <<
"Calculating absorption spectrum plot " <<
orbfile_ << std::flush;
67 <<
" Loading QM data from " <<
orbfile_ << std::flush;
72 throw std::runtime_error(
73 "BSE singlet energies not stored in QM data file!");
77 throw std::runtime_error(
78 "BSE transition dipoles not stored in QM data file!");
81 const Eigen::VectorXd BSESingletEnergies =
83 const std::vector<Eigen::Vector3d>& TransitionDipoles =
93 <<
" Considering " << n_exc <<
" excitation with max energy "
94 << BSESingletEnergies(
maxexc_) <<
" eV / min wave length "
95 <<
evtonm(BSESingletEnergies[
maxexc_ - 1]) <<
" nm" << std::flush;
132 ofs <<
"# E(eV) epsGaussian IM(eps)Gaussian epsLorentz "
138 double eps_Gaussian = 0.0;
139 double imeps_Gaussian = 0.0;
140 double eps_Lorentzian = 0.0;
141 double imeps_Lorentzian = 0.0;
147 imeps_Gaussian += osc[i_exc] * BSESingletEnergies(i_exc) *
151 imeps_Lorentzian += osc[i_exc] * BSESingletEnergies(i_exc) *
155 ofs <<
e <<
" " << eps_Gaussian <<
" " << imeps_Gaussian <<
" "
156 << eps_Lorentzian <<
" " << imeps_Lorentzian << std::endl;
160 <<
" Spectrum in energy range from " <<
lower_ <<
" to " <<
upper_
161 <<
" eV and with broadening of FWHM " <<
fwhm_
162 <<
" eV written to file " <<
output_file_ << std::flush;
167 ofs <<
"# lambda(nm) epsGaussian IM(eps)Gaussian epsLorentz "
173 double eps_Gaussian = 0.0;
174 double imeps_Gaussian = 0.0;
175 double eps_Lorentzian = 0.0;
176 double imeps_Lorentzian = 0.0;
180 eps_Gaussian += osc[i_exc] *
Gaussian(lambda, exc_lambda,
fwhm_);
182 osc[i_exc] * exc_lambda *
Gaussian(lambda, exc_lambda,
fwhm_);
188 ofs << lambda <<
" " << eps_Gaussian <<
" " << imeps_Gaussian
189 <<
" " << eps_Lorentzian <<
" " << imeps_Lorentzian << std::endl;
192 <<
" Spectrum in wavelength range from " <<
lower_ <<
" to " <<
upper_
193 <<
" nm and with broadening of FWHM " <<
fwhm_
194 <<
" nm written to file " <<
output_file_ << std::flush;