Skip to content

[Refactor] Move module_ri to source_lcao/module_ri and module_rdmft to source_lcao/module_rdmft and correct some documents #6344

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jul 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,8 @@ For those who are interested in the source code, the following figure shows the
| |-- module_dftu The module for defining the Hamiltonian in DFT+U calculations.
| |-- module_gint The module for performing grid integral in LCAO calculations.
| |-- module_hcontainer The module for storing the Hamiltonian matrix in LCAO calculations.
| `-- module_tddft The module for defining the Hamiltonian in TDDFT calculations.
| |-- module_tddft The module for defining the Hamiltonian in TDDFT calculations.
| `-- module_ri The module for performing RI calculations.
|-- source_pw The module for defining the Hamiltonian in PW calculations.
| |-- hamilt_ofdft The module for defining the Hamiltonian in OFDFT calculations.
| |-- hamilt_pwdft The module for defining the Hamiltonian in PW-DFT calculations.
Expand All @@ -82,10 +83,7 @@ For those who are interested in the source code, the following figure shows the
|-- source_io The module for reading of INPUT files and output properties including band structure, density of states, charge density, etc.
|-- source_md The module for performing molecular dynamics.
|-- source_psi The module for defining the wave function and its operations.
|-- source_relax The module for performing structural optimization.
| |-- relax_new The module for performing structural optimization with new algorithm, optimized for cell and ion simultaneously.
| `-- relax_old The module for performing structural optimization with old algorithm, optimized for cell and ion separately.
|-- module_ri The module for performing RI calculations.
`-- source_relax The module for performing structural optimization, optimized for cell and ion simultaneously.
```

## Submitting an Issue
Expand Down
4 changes: 2 additions & 2 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ add_subdirectory(source_esolver)
add_subdirectory(source_lcao/module_gint)
add_subdirectory(source_io)
add_subdirectory(source_relax)
add_subdirectory(module_ri)
add_subdirectory(source_lcao/module_ri)
add_subdirectory(module_parameter)
add_subdirectory(module_lr)

# add by jghan
add_subdirectory(module_rdmft)
add_subdirectory(source_lcao/module_rdmft)

add_library(
driver
Expand Down
4 changes: 2 additions & 2 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -67,15 +67,15 @@ VPATH=./src_global:\
./source_io:\
./source_io/json_output:\
./src_ri:\
./module_ri:\
./source_lcao/module_ri:\
./module_parameter:\
./module_lr:\
./module_lr/ao_to_mo_transformer:\
./module_lr/dm_trans:\
./module_lr/operator_casida:\
./module_lr/potentials:\
./module_lr/utils:\
./module_rdmft:\
./source_lcao/module_rdmft:\
./\

OBJS_ABACUS_PW=${OBJS_MAIN}\
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/esolver_lrtd_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#include "source_lcao/module_gint/temp_gint/gint_info.h"
#ifdef __EXX
// #include <RI/physics/Exx.h>
#include "module_ri/Exx_LRI.h"
#include "source_lcao/module_ri/Exx_LRI.h"
#endif
namespace LR
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/hamilt_casida.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#ifdef __EXX
#include "module_lr/operator_casida/operator_lr_exx.h"
#include "module_lr/ri_benchmark/operator_ri_hartree.h"
#include "module_ri/LRI_CV_Tools.h"
#include "source_lcao/module_ri/LRI_CV_Tools.h"
#endif
namespace LR
{
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/operator_casida/operator_lr_exx.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#pragma once
#include "source_hamilt/operator.h"
#include "source_estate/module_dm/density_matrix.h"
#include "module_ri/Exx_LRI.h"
#include "source_lcao/module_ri/Exx_LRI.h"
#include "module_lr/utils/lr_util.h"
namespace LR
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_base/abfs-vector3_order.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#ifndef ABFS_VECTOR3_ORDER_H
#define ABFS_VECTOR3_ORDER_H

#include "module_ri/abfs.h"
#include "source_lcao/module_ri/abfs.h"

// mohan comment out 2021-02-06
//#include <boost/archive/binary_oarchive.hpp>
Expand Down
2 changes: 1 addition & 1 deletion source/source_base/test/abfs-vector3_order_test.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#include "source_base/abfs-vector3_order.h"
#include "source_base/vector3.h"
#include "gtest/gtest.h"
#include "module_ri/abfs.h"
#include "source_lcao/module_ri/abfs.h"

/************************************************
* unit test of functions in class Abfs::vector3_order
Expand Down
2 changes: 1 addition & 1 deletion source/source_cell/bcast_cell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "source_base/parallel_common.h"
#include "module_parameter/parameter.h"
#ifdef __EXX
#include "module_ri/serialization_cereal.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#include "source_pw/hamilt_pwdft/global.h"
#endif
namespace unitcell
Expand Down
2 changes: 1 addition & 1 deletion source/source_cell/read_atom_species.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "source_base/tool_title.h"
#ifdef __EXX
#include "source_pw/hamilt_pwdft/global.h"
#include "module_ri/serialization_cereal.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#endif
namespace unitcell
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_ks_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
#include "source_hsolver/hsolver_lcao.h"

// test RDMFT
#include "module_rdmft/rdmft.h"
#include "source_lcao/module_rdmft/rdmft.h"

#include "source_lcao/module_gint/temp_gint/gint_info.h"

Expand Down
6 changes: 3 additions & 3 deletions source/source_esolver/esolver_ks_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,12 @@

// for EXX
#ifdef __EXX
#include "module_ri/Exx_LRI_interface.h"
#include "module_ri/Mix_DMk_2D.h"
#include "source_lcao/module_ri/Exx_LRI_interface.h"
#include "source_lcao/module_ri/Mix_DMk_2D.h"
#endif

// for RDMFT
#include "module_rdmft/rdmft.h"
#include "source_lcao/module_rdmft/rdmft.h"

#include <memory>

Expand Down
2 changes: 1 addition & 1 deletion source/source_esolver/esolver_ks_lcaopw.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "source_hsolver/hsolver_lcaopw.h"

#ifdef __EXX
#include "module_ri/exx_lip.h"
#include "source_lcao/module_ri/exx_lip.h"
#endif
namespace ModuleESolver
{
Expand Down
2 changes: 1 addition & 1 deletion source/source_hamilt/module_xc/exx_info.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef EXX_INFO_H
#define EXX_INFO_H

#include "module_ri/conv_coulomb_pot_k.h"
#include "source_lcao/module_ri/conv_coulomb_pot_k.h"
#include "xc_functional.h"

#include <vector>
Expand Down
6 changes: 3 additions & 3 deletions source/source_io/ctrl_output_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@
#include "source_lcao/module_deepks/LCAO_deepks_interface.h"
#endif
#ifdef __EXX
#include "module_ri/Exx_LRI_interface.h" // use EXX codes
#include "module_ri/RPA_LRI.h" // use RPA code
#include "source_lcao/module_ri/Exx_LRI_interface.h" // use EXX codes
#include "source_lcao/module_ri/RPA_LRI.h" // use RPA code
#endif
#include "module_rdmft/rdmft.h" // use RDMFT codes
#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes
#include "source_io/to_qo.h" // use toQO

namespace ModuleIO
Expand Down
4 changes: 2 additions & 2 deletions source/source_io/ctrl_output_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@
#include "source_lcao/module_gint/gint_k.h" // use Gint_k
#include "source_basis/module_pw/pw_basis_k.h" // use ModulePW::PW_Basis_K and ModulePW::PW_Basis
#include "source_pw/hamilt_pwdft/structure_factor.h" // use Structure_Factor
#include "module_rdmft/rdmft.h" // use RDMFT codes
#include "source_lcao/module_rdmft/rdmft.h" // use RDMFT codes
#ifdef __EXX
#include "module_ri/Exx_LRI_interface.h" // use EXX codes
#include "source_lcao/module_ri/Exx_LRI_interface.h" // use EXX codes
#endif

namespace ModuleIO
Expand Down
2 changes: 1 addition & 1 deletion source/source_io/input_conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#include <algorithm>

#ifdef __EXX
#include "module_ri/exx_abfs-jle.h"
#include "source_lcao/module_ri/exx_abfs-jle.h"
#endif

#include "source_lcao/module_dftu/dftu.h"
Expand Down
2 changes: 1 addition & 1 deletion source/source_io/restart_exx_csr.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#pragma once
#include "source_base/abfs-vector3_order.h"
#include "source_cell/unitcell.h"
#include "module_ri/serialization_cereal.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#include <RI/global/Tensor.h>
#include <map>

Expand Down
2 changes: 1 addition & 1 deletion source/source_io/restart_exx_csr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "source_cell/unitcell.h"
#include "source_io/csr_reader.h"
#include "source_io/write_HS_sparse.h"
#include "module_ri/serialization_cereal.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#include <RI/global/Tensor.h>
#include <map>

Expand Down
2 changes: 1 addition & 1 deletion source/source_io/write_vxc_r.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "source_io/write_HS_sparse.h"
#ifdef __EXX
#include "source_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#include "module_ri/RI_2D_Comm.h"
#include "source_lcao/module_ri/RI_2D_Comm.h"
#endif

#ifndef TGINT_H
Expand Down
2 changes: 1 addition & 1 deletion source/source_lcao/hamilt_lcaodft/FORCE_STRESS.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "source_io/input_conv.h"
#include "source_psi/psi.h"
#ifdef __EXX
#include "module_ri/Exx_LRI_interface.h"
#include "source_lcao/module_ri/Exx_LRI_interface.h"
#endif
#include "force_stress_arrays.h"
#include "source_lcao/module_gint/gint_gamma.h"
Expand Down
2 changes: 1 addition & 1 deletion source/source_lcao/hamilt_lcaodft/LCAO_hamilt.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#include "source_base/global_variable.h"
#include "source_base/timer.h"
#include "source_lcao/hamilt_lcaodft/spar_exx.h"
#include "module_ri/RI_2D_Comm.h"
#include "source_lcao/module_ri/RI_2D_Comm.h"

#include <RI/global/Global_Func-2.h>
#include <RI/ri/Cell_Nearest.h>
Expand Down
2 changes: 1 addition & 1 deletion source/source_lcao/hamilt_lcaodft/hamilt_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
#endif

#ifdef __EXX
#include "module_ri/Exx_LRI_interface.h"
#include "source_lcao/module_ri/Exx_LRI_interface.h"
#include "operator_lcao/op_exx_lcao.h"
#endif

Expand Down
2 changes: 1 addition & 1 deletion source/source_lcao/hamilt_lcaodft/hamilt_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
#endif

#ifdef __EXX
#include "module_ri/Exx_LRI.h"
#include "source_lcao/module_ri/Exx_LRI.h"
#endif
namespace hamilt
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#include "op_exx_lcao.h"
#include "module_parameter/parameter.h"
#include "module_ri/RI_2D_Comm.h"
#include "source_lcao/module_ri/RI_2D_Comm.h"
#include "source_pw/hamilt_pwdft/global.h"
#include "source_hamilt/module_xc/xc_functional.h"
#include "source_io/restart_exx_csr.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//==========================================================

#include "rdmft.h"
#include "module_rdmft/rdmft_tools.h"
#include "source_lcao/module_rdmft/rdmft_tools.h"
#include "source_base/timer.h"
#include "source_pw/hamilt_pwdft/global.h"
#include "source_base/parallel_reduce.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "source_lcao/hamilt_lcaodft/hs_matrix_k.hpp"

#ifdef __EXX
#include "module_ri/Exx_LRI.h"
#include "module_ri/module_exx_symmetry/symmetry_rotation.h"
#include "source_lcao/module_ri/Exx_LRI.h"
#include "source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.h"
// there are some operator reload to print data in different formats
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
//==========================================================

#include "rdmft.h"
#include "module_rdmft/rdmft_tools.h"
#include "source_lcao/module_rdmft/rdmft_tools.h"
#include "source_psi/psi.h"
#include "source_estate/module_dm/cal_dm_psi.h"

#ifdef __EXX
#include "module_ri/RI_2D_Comm.h"
#include "source_lcao/module_ri/RI_2D_Comm.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#endif
#include "source_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Author: Jingang Han
// DATE : 2024-03-11
//==========================================================
#include "module_rdmft/rdmft_tools.h"
#include "source_lcao/module_rdmft/rdmft_tools.h"
#include "source_pw/hamilt_pwdft/global.h"
// used by class Veff_rdmft
#include "source_base/tool_title.h"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@


#ifdef __EXX
#include "module_ri/RI_2D_Comm.h"
#include "module_ri/Exx_LRI.h"
#include "source_lcao/module_ri/RI_2D_Comm.h"
#include "source_lcao/module_ri/Exx_LRI.h"
// there are some operator reload to print data in different formats
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//==========================================================

#include "rdmft.h"
#include "module_rdmft/rdmft_tools.h"
#include "source_lcao/module_rdmft/rdmft_tools.h"
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_estate/module_dm/density_matrix.h"
#include "source_estate/module_charge/symmetry_rho.h"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#include "ABFs_Construct-PCA.h"

#include "exx_abfs-abfs_index.h"
#include "../source_base/lapack_connector.h"
#include "../source_base/global_function.h"
#include "../source_base/element_basis_index.h"
#include "../source_base/matrix.h"
#include "../module_ri/Matrix_Orbs11.h"
#include "../module_ri/Matrix_Orbs21.h"
#include "../../source_base/lapack_connector.h"
#include "../../source_base/global_function.h"
#include "../../source_base/element_basis_index.h"
#include "../../source_base/matrix.h"
#include "../../source_lcao/module_ri/Matrix_Orbs11.h"
#include "../../source_lcao/module_ri/Matrix_Orbs21.h"

#include <cassert>
#include <limits>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef ABFS_CONSTRUCT_PCA_H
#define ABFS_CONSTRUCT_PCA_H

#include "../source_basis/module_ao/ORB_read.h"
#include "../../source_basis/module_ao/ORB_read.h"
#include "source_cell/unitcell.h"
#include <vector>
#include <RI/global/Tensor.h>
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@
#include "Exx_LRI.h"
#include "RI_2D_Comm.h"
#include "RI_Util.h"
#include "module_ri/exx_abfs-construct_orbs.h"
#include "module_ri/exx_abfs-io.h"
#include "module_ri/conv_coulomb_pot_k.h"
#include "source_lcao/module_ri/exx_abfs-construct_orbs.h"
#include "source_lcao/module_ri/exx_abfs-io.h"
#include "source_lcao/module_ri/conv_coulomb_pot_k.h"
#include "source_base/tool_title.h"
#include "source_base/timer.h"
#include "module_ri/serialization_cereal.h"
#include "module_ri/Mix_DMk_2D.h"
#include "source_lcao/module_ri/serialization_cereal.h"
#include "source_lcao/module_ri/Mix_DMk_2D.h"
#include "source_basis/module_ao/parallel_orbitals.h"

#include <RI/distribute/Distribute_Equally.h>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
#define EXX_LRI_INTERFACE_H

#include "Exx_LRI.h"
#include "module_ri/Mix_DMk_2D.h"
#include "module_ri/module_exx_symmetry/symmetry_rotation.h"
#include "source_lcao/module_ri/Mix_DMk_2D.h"
#include "source_lcao/module_ri/module_exx_symmetry/symmetry_rotation.h"
#include <memory>

class LCAO_Matrix;
Expand Down
Loading
Loading