@@ -12,7 +12,8 @@ namespace LR
1212 public:
1313 LR_Spectrum (const int & nspin_global, const int & naos, const std::vector<int >& nocc, const std::vector<int >& nvirt,
1414 typename TGint<T>::type* gint, const ModulePW::PW_Basis& rho_basis, psi::Psi<T>& psi_ks_in,
15- const UnitCell& ucell, const K_Vectors& kv_in, const std::vector<Parallel_2D>& pX_in, const Parallel_2D& pc_in, const Parallel_Orbitals& pmat_in,
15+ const UnitCell& ucell, const K_Vectors& kv_in, Grid_Driver& gd, const std::vector<double >& orb_cutoff,
16+ const std::vector<Parallel_2D>& pX_in, const Parallel_2D& pc_in, const Parallel_Orbitals& pmat_in,
1617 const double * eig, const T* X, const int & nstate, const bool & openshell) :
1718 nspin_x (openshell ? 2 : 1 ), naos(naos), nocc(nocc), nvirt(nvirt), nk(kv_in.get_nks() / nspin_global),
1819 gint (gint), rho_basis(rho_basis), ucell(ucell), kv(kv_in),
@@ -22,15 +23,15 @@ namespace LR
2223 gdim (nk* std::inner_product (nocc.begin(), nocc.end(), nvirt.begin(), 0))
2324 {
2425 for (int is = 0 ;is < nspin_global;++is) { psi_ks.emplace_back (LR_Util::get_psi_spin (psi_ks_in, is, nk)); }
25- this ->oscillator_strength ();
26+ this ->oscillator_strength (gd, orb_cutoff );
2627 };
2728 // / @brief calculate the optical absorption spectrum
2829 void optical_absorption (const std::vector<double >& freq, const double eta, const std::string& spintype);
2930 // / @brief print out the transition dipole moment and the main contributions to the transition amplitude
3031 void transition_analysis (const std::string& spintype);
3132 private:
3233 // / $$2/3\Omega\sum_{ia\sigma} |\braket{\psi_{i}|\mathbf{r}|\psi_{a}} |^2\int \rho_{\alpha\beta}(\mathbf{r}) \mathbf{r} d\mathbf{r}$$
33- void oscillator_strength ();
34+ void oscillator_strength (Grid_Driver& gd, const std::vector< double >& orb_cutoff );
3435 const int nspin_x = 1 ; // /< 1 for singlet/triplet, 2 for updown(openshell)
3536 const int naos = 1 ;
3637 const std::vector<int >& nocc;
0 commit comments