diff --git a/c++/pomerol_ed.cpp b/c++/pomerol_ed.cpp index de2fdb8..a0180da 100644 --- a/c++/pomerol_ed.cpp +++ b/c++/pomerol_ed.cpp @@ -209,8 +209,8 @@ namespace pomerol2triqs { diagonalize_main(gs_shift); } - void pomerol_ed::saveQuantumNumbers(const std::string &filename) { - if (!states_class) TRIQS_RUNTIME_ERROR << "saveQuantumNumbers: internal error!"; + void pomerol_ed::save_quantum_numbers(const std::string &filename) { + if (!states_class) TRIQS_RUNTIME_ERROR << "save_quantum_numbers: internal error!"; if (!comm.rank()) { std::ofstream fout(filename); @@ -222,8 +222,8 @@ namespace pomerol2triqs { } } - void pomerol_ed::saveEigenValues(const std::string &filename) { - if (!states_class || !matrix_h) TRIQS_RUNTIME_ERROR << "saveEigenValues: internal error!"; + void pomerol_ed::save_eigenvalues(const std::string &filename) { + if (!states_class || !matrix_h) TRIQS_RUNTIME_ERROR << "save_eigenvalues: internal error!"; if (!comm.rank()) { // create a list of pairs of eigenvalue and quantum numers to sort @@ -277,7 +277,7 @@ namespace pomerol2triqs { rho.reset(new Pomerol::DensityMatrix(*states_class, *matrix_h, beta)); rho->prepare(); rho->compute(); - rho->truncateBlocks(DensityMatrixCutoff, verbose); + rho->truncateBlocks(density_matrix_cutoff, verbose); } } diff --git a/c++/pomerol_ed.hpp b/c++/pomerol_ed.hpp index c636210..8c10826 100644 --- a/c++/pomerol_ed.hpp +++ b/c++/pomerol_ed.hpp @@ -87,7 +87,7 @@ namespace pomerol2triqs { // block2_gf> compute_g2(gf_struct_t const &gf_struct, gf_mesh const &mesh, block_order_t block_order, // g2_blocks_t const &g2_blocks, Filler filler) const; - double DensityMatrixCutoff = 1e-15; + double density_matrix_cutoff = 1e-15; public: /// Create a new solver object @@ -100,13 +100,13 @@ namespace pomerol2triqs { void diagonalize(many_body_op_t const &hamiltonian, std::vector const& integrals_of_motion); /// Save quantum numbers and block size - void saveQuantumNumbers(const std::string &filename); + void save_quantum_numbers(const std::string &filename); /// Save all eigenvalues and corresponding quantum numbers - void saveEigenValues(const std::string &filename); + void save_eigenvalues(const std::string &filename); - /// Set DensityMatrixCutoff (default: 1e-15, 0 = No cutoff). DensityMatrix will be recomputed. - void setDensityMatrixCutoff(const double DensityMatrixCutoff); + /// Set density-matrix cutoff (default: 1e-15, 0 = No cutoff). Density matrix will be recomputed. + void set_density_matrix_cutoff(const double cutoff); /// Green's function in Matsubara frequencies block_gf G_iw(gf_struct_t const &gf_struct, double beta, int n_iw); @@ -130,8 +130,8 @@ namespace pomerol2triqs { // block2_gf> G2_iw_l_lp(g2_iw_l_lp_params_t const &p); }; - inline void pomerol_ed::setDensityMatrixCutoff(const double DensityMatrixCutoff){ - this->DensityMatrixCutoff = DensityMatrixCutoff; + inline void pomerol_ed::set_density_matrix_cutoff(const double cutoff){ + this->density_matrix_cutoff = cutoff; rho.release(); } } diff --git a/example/2band.atom.py b/example/2band.atom.py index 3fe9910..415d90e 100644 --- a/example/2band.atom.py +++ b/example/2band.atom.py @@ -66,11 +66,11 @@ ed.diagonalize(H) # save data -ed.saveQuantumNumbers("quantum_numbers.dat") -ed.saveEigenValues("eigenvalues.dat") +ed.save_quantum_numbers("quantum_numbers.dat") +ed.save_eigenvalues("eigenvalues.dat") -# set DensityMatrixCutoff -ed.setDensityMatrixCutoff(1e-10) +# set density-matrix cutoff +ed.set_density_matrix_cutoff(1e-10) # Compute G(i\omega) G_iw = ed.G_iw(gf_struct, beta, n_iw) diff --git a/example/slater.py b/example/slater.py index cb22b95..10de2ae 100644 --- a/example/slater.py +++ b/example/slater.py @@ -112,11 +112,11 @@ # ed.diagonalize(H, [N,]) # only N # save data -ed.saveQuantumNumbers("quantum_numbers.dat") -ed.saveEigenValues("eigenvalues.dat") +ed.save_quantum_numbers("quantum_numbers.dat") +ed.save_eigenvalues("eigenvalues.dat") -# set DensityMatrixCutoff -ed.setDensityMatrixCutoff(1e-10) +# set density-matrix cutoff +ed.set_density_matrix_cutoff(1e-10) # Compute G(i\omega) G_iw = ed.G_iw(gf_struct, beta, n_iw) diff --git a/python/pomerol2triqs_desc.py b/python/pomerol2triqs_desc.py index 81c7025..8c99de5 100644 --- a/python/pomerol2triqs_desc.py +++ b/python/pomerol2triqs_desc.py @@ -49,23 +49,23 @@ c.add_method("""void diagonalize (many_body_op_t hamiltonian, std::vector integrals_of_motion)""", doc = """Diagonalize Hamiltonian using provided integrals of motion """) -c.add_method("""void saveQuantumNumbers (std::string filename)""", +c.add_method("""void save_quantum_numbers (std::string filename)""", doc = """Save quantum numbers and block size """) -c.add_method("""void saveEigenValues (std::string filename)""", +c.add_method("""void save_eigenvalues (std::string filename)""", doc = """Save all eigenvalues and corresponding quantum numbers """) -c.add_method("""void setDensityMatrixCutoff (double DensityMatrixCutoff)""", - doc = """Set DensityMatrixCutoff (default: 1e-15, 0 = No cutoff). DensityMatrix will be recomputed. """) +c.add_method("""void set_density_matrix_cutoff (double cutoff)""", + doc = r"""Set density-matrix cutoff (default: 1e-15, 0 = No cutoff). Density matrix will be recomputed.""") c.add_method("""block_gf G_iw (gf_struct_t gf_struct, double beta, int n_iw)""", - doc = """Green\'s function in Matsubara frequencies """) + doc = r"""Green's function in Matsubara frequencies""") c.add_method("""block_gf G_tau (gf_struct_t gf_struct, double beta, int n_tau)""", - doc = """Green\'s function in imaginary time """) + doc = r"""Green's function in imaginary time""") c.add_method("""block_gf G_w (gf_struct_t gf_struct, double beta, std::pair energy_window, int n_w, double im_shift = 0)""", - doc = """Retarded Green\'s function on real energy axis """) + doc = r"""Retarded Green's function on real energy axis""") c.add_method("""array, 3> G2_iw (**pomerol2triqs::g2_iw_inu_inup_params_t)""", doc = r"""Two-particle Green's function, Matsubara frequencies""")