Skip to content

[Refactor] Rename module_relax, module_io, module_md, module_hamilt_lcao #6339

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

Closed
Closed
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
10 changes: 5 additions & 5 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ For those who are interested in the source code, the following figure shows the
| |-- module_surchem The module for calculating the surface charge correction.
| |-- module_vdw The module for calculating the van der Waals correction.
| |-- module_xc The module for calculating the exchange-correlation energy and potential.
|-- module_hamilt_lcao The module for defining the Hamiltonian in LCAO calculations.
|-- source_lcao The module for defining the Hamiltonian in LCAO calculations.
| |-- hamilt_lcaodft The module for defining the Hamiltonian in LCAO-DFT calculations.
| | |-- operator_lcao The module for defining the operators in LCAO-DFT calculations.
| |-- module_deepks The module for defining the Hamiltonian in DeepKS calculations.
Expand All @@ -79,10 +79,10 @@ For those who are interested in the source code, the following figure shows the
| `-- hamilt_stodft The module for defining the Hamiltonian in STODFT calculations.
|-- source_hsolver The module for solving the Hamiltonian with different diagonalization methods, including CG, Davidson in PW
| | calculations, and scalapack and genelpa in LCAO calculations.
|-- module_io The module for reading of INPUT files and output properties including band structure, density of states, charge density, etc.
|-- module_md The module for performing molecular dynamics.
|-- 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.
|-- module_relax The module for performing structural optimization.
|-- 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.
Expand All @@ -101,7 +101,7 @@ For comments that need to be shown in documents, these formats should be used --

A helpful VS Code extension -- [Doxygen Documentation Generator](https://marketplace.visualstudio.com/items?itemName=cschlosser.doxdocgen), can help you formating comments.

An practical example is class [LCAO_Deepks](https://github.com/deepmodeling/abacus-develop/blob/deepks/source/module_hamilt_lcao/module_deepks/LCAO_deepks.h), the effects can be seen on [readthedocs page](https://abacus-deepks.readthedocs.io/en/latest/DeePKS_API/classLCAO__Descriptor.html#exhale-class-classLCAO-Descriptor)
An practical example is class [LCAO_Deepks](https://github.com/deepmodeling/abacus-develop/blob/deepks/source/source_lcao/module_deepks/LCAO_deepks.h), the effects can be seen on [readthedocs page](https://abacus-deepks.readthedocs.io/en/latest/DeePKS_API/classLCAO__Descriptor.html#exhale-class-classLCAO-Descriptor)

- Tips
- Only comments in .h file will be visible in generated by Doxygen + Sphinx;
Expand Down
4 changes: 2 additions & 2 deletions docs/advanced/json/json_add.md
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ AbacusJson::add_json({"Json","key6","key7",3}, "cp2k", false);

The current code structure of JSON functionality in Abacus is roughly as follows:

- source/module_io
- source/source_io
- para_json.cpp: Contains JSON generation and output interfaces directly called by the device in Abacus.
- json_output/: Contains the functionality encapsulation class `abacusjson.cpp` of RapidJSON in Abacus and code classes for parameter generation in various JSON modules.
- test: Code testing files in `json_output`.
Expand All @@ -160,7 +160,7 @@ In Abacus JSON addition, the following principles need to be followed:

3. Use classes as function parameters as much as possible instead of using global classes for obtained parameters. (For example, in `gen_general_info`, `Input`)

4. After adding parameters, supplement test code in `module_io/json_output/test`.
4. After adding parameters, supplement test code in `source_io/json_output/test`.

For the current JSON file, there are two JSON modules: `init` and `general_info`, `output_info`.
Taking `general_info` as an example, the code to be added is as follows:
Expand Down
10 changes: 5 additions & 5 deletions source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ add_subdirectory(source_psi)
add_subdirectory(source_estate)
add_subdirectory(source_hamilt)
add_subdirectory(source_pw)
add_subdirectory(module_hamilt_lcao)
add_subdirectory(source_lcao)
add_subdirectory(source_hsolver)
add_subdirectory(source_basis/module_ao)
add_subdirectory(source_basis/module_nao)
add_subdirectory(module_md)
add_subdirectory(source_md)
add_subdirectory(source_basis/module_pw)
add_subdirectory(source_esolver)
add_subdirectory(module_hamilt_lcao/module_gint)
add_subdirectory(module_io)
add_subdirectory(module_relax)
add_subdirectory(source_lcao/module_gint)
add_subdirectory(source_io)
add_subdirectory(source_relax)
add_subdirectory(module_ri)
add_subdirectory(module_parameter)
add_subdirectory(module_lr)
Expand Down
24 changes: 12 additions & 12 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ VPATH=./src_global:\
./source_base/module_container/ATen/ops:\
./source_base/module_device:\
./source_base/module_mixing:\
./module_md:\
./source_md:\
./source_basis/module_pw:\
./source_basis/module_pw/module_fft:\
./source_esolver:\
Expand All @@ -53,18 +53,18 @@ VPATH=./src_global:\
./source_pw/hamilt_pwdft/kernels:\
./source_pw/hamilt_pwdft/module_exx_helper:\
./source_pw/hamilt_stodft/kernels:\
./module_hamilt_lcao/module_hcontainer:\
./module_hamilt_lcao/hamilt_lcaodft:\
./module_hamilt_lcao/module_tddft:\
./module_hamilt_lcao/module_deepks:\
./module_hamilt_lcao/module_dftu:\
./module_hamilt_lcao/module_deltaspin:\
./module_hamilt_lcao/hamilt_lcaodft/operator_lcao:\
./module_hamilt_lcao/module_gint:\
./module_relax:\
./source_lcao/module_hcontainer:\
./source_lcao/hamilt_lcaodft:\
./source_lcao/module_tddft:\
./source_lcao/module_deepks:\
./source_lcao/module_dftu:\
./source_lcao/module_deltaspin:\
./source_lcao/hamilt_lcaodft/operator_lcao:\
./source_lcao/module_gint:\
./source_relax:\
./source_hamilt/module_vdw:\
./module_io:\
./module_io/json_output:\
./source_io:\
./source_io/json_output:\
./src_ri:\
./module_ri:\
./module_parameter:\
Expand Down
8 changes: 4 additions & 4 deletions source/module_lr/esolver_lrtd_lcao.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
#include "module_lr/hsolver_lrtd.hpp"
#include "module_lr/lr_spectrum.h"
#include <memory>
#include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h"
#include "module_io/read_wfc_nao.h"
#include "module_io/cube_io.h"
#include "module_io/print_info.h"
#include "source_lcao/hamilt_lcaodft/hamilt_lcao.h"
#include "source_io/read_wfc_nao.h"
#include "source_io/cube_io.h"
#include "source_io/print_info.h"
#include "source_cell/module_neighbor/sltk_atom_arrange.h"
#include "module_lr/utils/lr_util_print.h"
#include "source_base/scalapack_connector.h"
Expand Down
6 changes: 3 additions & 3 deletions source/module_lr/esolver_lrtd_lcao.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
#include <memory>

#include "source_esolver/esolver_ks_lcao.h" //for the move constructor
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
#include "module_hamilt_lcao/module_gint/gint_k.h"
#include "module_hamilt_lcao/module_gint/grid_technique.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"
#include "source_lcao/module_gint/grid_technique.h"
#include "source_estate/module_dm/density_matrix.h"
#include "module_lr/potentials/pot_hxc_lrtd.h"
#include "module_lr/hamilt_casida.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/lr_spectrum.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "source_estate/module_dm/density_matrix.h"
#include "module_lr/utils/lr_util.h"
#include "source_basis/module_nao/two_center_bundle.h"
#include "module_hamilt_lcao/module_tddft/td_current.h"
#include "source_lcao/module_tddft/td_current.h"
namespace LR
{
template<typename T>
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/lr_spectrum_velocity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "module_lr/utils/lr_util_hcontainer.h"
#include "math.h"
#include "module_parameter/parameter.h"
#include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h"
#include "source_lcao/module_hcontainer/hcontainer_funcs.h"
namespace LR
{
/// get the velocity matrix v(R)
Expand Down
4 changes: 2 additions & 2 deletions source/module_lr/operator_casida/operator_lr_hxc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#include "module_lr/utils/lr_util.h"
#include "module_lr/utils/lr_util_hcontainer.h"
#include "module_lr/utils/lr_util_print.h"
// #include "module_hamilt_lcao/hamilt_lcaodft/DM_gamma_2d_to_grid.h"
#include "module_hamilt_lcao/module_hcontainer/hcontainer_funcs.h"
// #include "source_lcao/hamilt_lcaodft/DM_gamma_2d_to_grid.h"
#include "source_lcao/module_hcontainer/hcontainer_funcs.h"
#include "module_lr/ao_to_mo_transformer/ao_to_mo.h"
#include "source_pw/hamilt_pwdft/global.h"

Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/operator_casida/operator_lr_hxc.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "source_cell/klist.h"
#include "source_hamilt/operator.h"
#include "module_lr/utils/gint_template.h"
#include "module_hamilt_lcao/module_gint/grid_technique.h"
#include "source_lcao/module_gint/grid_technique.h"
#include "source_estate/module_dm/density_matrix.h"
#include "module_lr/potentials/pot_hxc_lrtd.h"
#include "module_lr/utils/lr_util.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/potentials/xc_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "module_lr/utils/lr_util_xc.hpp"
#include <set>
#include <chrono>
#include "module_io/cube_io.h"
#include "source_io/cube_io.h"
#ifdef USE_LIBXC
#include <xc.h>
#include "source_hamilt/module_xc/xc_functional_libxc.h"
Expand Down
6 changes: 3 additions & 3 deletions source/module_lr/utils/gint_move.hpp
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
#include "lr_util.h"
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "module_parameter/parameter.h"
#include "module_hamilt_lcao/module_gint/gint_k.h"
#include "module_hamilt_lcao/module_gint/grid_technique.h"
#include "source_lcao/module_gint/gint_k.h"
#include "source_lcao/module_gint/grid_technique.h"

// Here will be the only place where GlobalCs are used (to be moved) in module_lr
#include "source_pw/hamilt_pwdft/global.h"
Expand Down
4 changes: 2 additions & 2 deletions source/module_lr/utils/gint_template.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
#include "module_hamilt_lcao/module_gint/gint_k.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"
namespace LR
{
template <typename T> struct TGint;
Expand Down
2 changes: 1 addition & 1 deletion source/module_lr/utils/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ AddTest(
TARGET lr_util_phys_test
LIBS parameter base ${math_libs} device container planewave #for FFT
SOURCES lr_util_physics_test.cpp ../lr_util.cpp
../../../module_io/orb_io.cpp
../../../source_io/orb_io.cpp
)

AddTest(
Expand Down
10 changes: 5 additions & 5 deletions source/module_rdmft/rdmft.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
#include "source_base/parallel_2d.h"
#include "source_basis/module_ao/parallel_orbitals.h"
#include "source_cell/unitcell.h"
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
#include "module_hamilt_lcao/module_gint/gint_k.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"
#include "source_basis/module_ao/ORB_read.h"
#include "source_basis/module_nao/two_center_bundle.h"

#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h"
#include "module_hamilt_lcao/module_hcontainer/hcontainer.h"
#include "module_hamilt_lcao/hamilt_lcaodft/hs_matrix_k.hpp"
#include "source_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h"
#include "source_lcao/module_hcontainer/hcontainer.h"
#include "source_lcao/hamilt_lcaodft/hs_matrix_k.hpp"

#ifdef __EXX
#include "module_ri/Exx_LRI.h"
Expand Down
8 changes: 4 additions & 4 deletions source/module_rdmft/rdmft_pot.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@

#ifdef __EXX
#include "module_ri/RI_2D_Comm.h"
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#endif
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.h"
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.h"
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/ekinetic_new.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/nonlocal_new.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/veff_lcao.h"

namespace rdmft
{
Expand Down
10 changes: 5 additions & 5 deletions source/module_rdmft/rdmft_tools.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#include "source_base/matrix.h"
#include "source_cell/module_neighbor/sltk_grid_driver.h"
#include "source_cell/unitcell.h"
#include "module_hamilt_lcao/module_gint/gint_gamma.h"
#include "module_hamilt_lcao/module_gint/gint_k.h"
#include "source_lcao/module_gint/gint_gamma.h"
#include "source_lcao/module_gint/gint_k.h"
#include "source_estate/module_pot/potential_new.h"
#include "source_base/blas_connector.h"
#include "source_base/scalapack_connector.h"
Expand All @@ -21,9 +21,9 @@
#include "source_estate/module_dm/cal_dm_psi.h"
#include "source_estate/module_dm/density_matrix.h"

#include "module_hamilt_lcao/module_hcontainer/hcontainer.h"
#include "module_hamilt_lcao/hamilt_lcaodft/hs_matrix_k.hpp"
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h"
#include "source_lcao/module_hcontainer/hcontainer.h"
#include "source_lcao/hamilt_lcaodft/hs_matrix_k.hpp"
#include "source_lcao/hamilt_lcaodft/operator_lcao/operator_lcao.h"


#ifdef __EXX
Expand Down
8 changes: 4 additions & 4 deletions source/module_ri/Exx_LRI_interface.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@
#include "Exx_LRI_interface.h"
#include "module_ri/exx_abfs-jle.h"
#include "module_ri/exx_opt_orb.h"
#include "module_hamilt_lcao/hamilt_lcaodft/hamilt_lcao.h"
#include "module_hamilt_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#include "source_lcao/hamilt_lcaodft/hamilt_lcao.h"
#include "source_lcao/hamilt_lcaodft/operator_lcao/op_exx_lcao.h"
#include "source_base/parallel_common.h"
#include "source_base/formatter.h"

#include "module_io/csr_reader.h"
#include "module_io/write_HS_sparse.h"
#include "source_io/csr_reader.h"
#include "source_io/write_HS_sparse.h"
#include "source_estate/elecstate_lcao.h"

#include <sys/time.h>
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/Matrix_Orbs11.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "source_base/vector3.h"
#include "source_basis/module_ao/ORB_gaunt_table.h"
#include "source_basis/module_ao/ORB_read.h"
#include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb11.h"
#include "source_lcao/hamilt_lcaodft/center2_orb-orb11.h"
#include "source_cell/unitcell.h"
#include <RI/global/Tensor.h>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/Matrix_Orbs21.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "source_base/vector3.h"
#include "source_basis/module_ao/ORB_gaunt_table.h"
#include "source_basis/module_ao/ORB_read.h"
#include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb21.h"
#include "source_lcao/hamilt_lcaodft/center2_orb-orb21.h"
#include "source_cell/unitcell.h"
#include <RI/global/Tensor.h>
#include <map>
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/Matrix_Orbs22.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "source_base/vector3.h"
#include "source_basis/module_ao/ORB_gaunt_table.h"
#include "source_basis/module_ao/ORB_read.h"
#include "module_hamilt_lcao/hamilt_lcaodft/center2_orb-orb22.h"
#include "source_lcao/hamilt_lcaodft/center2_orb-orb22.h"
#include "source_cell/unitcell.h"

#include <RI/global/Tensor.h>
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/RI_2D_Comm.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#define RI_2D_COMM_H

#include "source_basis/module_ao/parallel_orbitals.h"
#include "module_hamilt_lcao/module_hcontainer/hcontainer.h"
#include "source_lcao/module_hcontainer/hcontainer.h"
#include "source_cell/klist.h"

#include <RI/global/Tensor.h>
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/RI_2D_Comm.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "source_pw/hamilt_pwdft/global.h"
#include "source_base/tool_title.h"
#include "source_base/timer.h"
#include "module_hamilt_lcao/hamilt_lcaodft/LCAO_domain.h"
#include "source_lcao/hamilt_lcaodft/LCAO_domain.h"
#include "module_parameter/parameter.h"
#include <RI/global/Global_Func-2.h>

Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/exx_lip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
#include "source_base/vector3.h"
#include "source_pw/hamilt_pwdft/global.h"
#include "source_cell/klist.h"
#include "module_hamilt_lcao/hamilt_lcaodft/wavefunc_in_pw.h"
#include "source_lcao/hamilt_lcaodft/wavefunc_in_pw.h"
#include "source_base/lapack_connector.h"
#include "source_base/parallel_global.h"
#include "module_parameter/parameter.h"
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/module_exx_symmetry/symmetry_rotation.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include "irreducible_sector.h"
#include "source_basis/module_ao/parallel_orbitals.h"
#include <RI/global/Tensor.h>
#include "module_hamilt_lcao/module_hcontainer/hcontainer.h"
#include "source_lcao/module_hcontainer/hcontainer.h"
#include "source_cell/module_neighbor/sltk_grid_driver.h"

namespace ModuleSymmetry
Expand Down
2 changes: 1 addition & 1 deletion source/module_ri/module_exx_symmetry/test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ AddTest(
LIBS base ${math_libs} device symmetry neighbor parameter
SOURCES symmetry_rotation_test.cpp ../symmetry_rotation.cpp ../irreducible_sector.cpp ../irreducible_sector_bvk.cpp
../../../source_basis/module_ao/parallel_orbitals.cpp
../../../module_io/output.cpp
../../../source_io/output.cpp
)
4 changes: 2 additions & 2 deletions source/source_base/module_device/device.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ std::string get_device_info(std::string device_flag);

/**
* @brief Get the device kpar object
* for module_io GlobalV::KPAR
* for source_io GlobalV::KPAR
*/
int get_device_kpar(const int& kpar, const int& bndpar);

/**
* @brief Get the device flag object
* for module_io PARAM.inp.device
* for source_io PARAM.inp.device
*/
std::string get_device_flag(const std::string& device,
const std::string& basis_type);
Expand Down
2 changes: 1 addition & 1 deletion source/source_base/test/global_file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ TEST_F(GlobalFile,closelog)
TEST_F(GlobalFile,closealllog)
{
/*
For module_io/input.cpp:line3578 close_log() is a void function,
For source_io/input.cpp:line3578 close_log() is a void function,
All its contents is calling close_all_log() in source_base/global_file.cpp
For Input::close_log() what is left to test are the validities of parameters
GlobalV::MY_RANK and this->out_alllog.
Expand Down
Loading
Loading