38 double frequency)
const {
52 const Eigen::ArrayXd Mmn2 =
53 Mmn_[gw_level + qpmin_offset].col(i_aux).cwiseAbs2();
55 temp.segment(0, lumo) += ppm_freq;
56 temp.segment(lumo, levelsum - lumo) -= ppm_freq;
57 Eigen::ArrayXd denom = temp.abs2() + eta2;
58 sigma += fac * (Mmn2 * temp / denom).sum();
64 double frequency)
const {
69 double dsigma_domega = 0.0;
78 const Eigen::ArrayXd Mmn2 =
79 Mmn_[gw_level + qpmin_offset].col(i_aux).cwiseAbs2();
81 temp.segment(0, lumo) += ppm_freq;
82 temp.segment(lumo, levelsum - lumo) -= ppm_freq;
83 Eigen::ArrayXd denom = temp.abs2() + eta2;
84 dsigma_domega += fac * ((eta2 - temp.abs2()) * Mmn2 / denom.abs2()).sum();
92 double frequency2)
const {
102 for (
Index i_aux = 0; i_aux < auxsize; i_aux++) {
105 if (ppm_weight(i_aux) < 1.e-9) {
108 const double ppm_freq = ppm_freqs(i_aux);
109 const double fac = 0.25 * ppm_weight(i_aux) * ppm_freq;
110 const Eigen::MatrixXd& Mmn1 =
Mmn_[gw_level1 + qpmin_offset];
111 const Eigen::MatrixXd& Mmn2 =
Mmn_[gw_level2 + qpmin_offset];
112 const Eigen::ArrayXd Mmn1xMmn2 =
113 Mmn1.col(i_aux).cwiseProduct(Mmn2.col(i_aux));
114 Eigen::ArrayXd temp1 = RPAEnergies;
115 temp1.segment(0, lumo) -= ppm_freq;
116 temp1.segment(lumo, levelsum - lumo) += ppm_freq;
117 Eigen::ArrayXd temp2 = (frequency2 - temp1);
118 temp1 = (frequency1 - temp1);
120 fac * ((temp1 / (temp1.abs2() + eta2) + temp2 / (temp2.abs2() + eta2)) *