Skip to content

Commit aca145a

Browse files
haozhihankluophysics
authored andcommitted
Refactor: delete paw code, will add back the paw code with a better plan. (deepmodeling#6225)
* delete USE_PAW code * delete use_paw * update * remove ENABLE_PAW * update
1 parent 05e39a1 commit aca145a

File tree

4 files changed

+2
-83
lines changed

4 files changed

+2
-83
lines changed

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
3232
- name: Configure
3333
run: |
34-
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_PAW=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DENABLE_FLOAT_FFTW=ON
34+
cmake -B build -DBUILD_TESTING=ON -DENABLE_DEEPKS=ON -DENABLE_MLKEDF=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON -DENABLE_GOOGLEBENCH=ON -DENABLE_RAPIDJSON=ON -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DENABLE_FLOAT_FFTW=ON
3535
3636
# Temporarily removed because no one maintains this now.
3737
# And it will break the CI test workflow.

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -614,6 +614,7 @@ endif()
614614

615615

616616

617+
617618
list(APPEND math_libs m)
618619
target_link_libraries(${ABACUS_BIN_NAME} ${math_libs})
619620

source/module_esolver/esolver_ks.cpp

Lines changed: 0 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -116,87 +116,6 @@ void ESolver_KS<T, Device>::before_all_runners(UnitCell& ucell, const Input_para
116116
this->ppcell.cell_factor = PARAM.inp.cell_factor;
117117

118118

119-
120-
/// PAW Section
121-
#ifdef USE_PAW
122-
if (PARAM.inp.use_paw)
123-
{
124-
int* atom_type = nullptr;
125-
double** atom_coord = nullptr;
126-
std::vector<std::string> filename_list;
127-
128-
atom_type = new int[ucell.nat];
129-
atom_coord = new double*[ucell.nat];
130-
filename_list.resize(ucell.ntype);
131-
132-
for (int ia = 0; ia < ucell.nat; ia++)
133-
{
134-
atom_coord[ia] = new double[3];
135-
}
136-
137-
int iat = 0;
138-
for (int it = 0; it < ucell.ntype; it++)
139-
{
140-
for (int ia = 0; ia < ucell.atoms[it].na; ia++)
141-
{
142-
atom_type[iat] = it;
143-
atom_coord[iat][0] = ucell.atoms[it].taud[ia].x;
144-
atom_coord[iat][1] = ucell.atoms[it].taud[ia].y;
145-
atom_coord[iat][2] = ucell.atoms[it].taud[ia].z;
146-
iat++;
147-
}
148-
}
149-
150-
if (GlobalV::MY_RANK == 0)
151-
{
152-
std::ifstream ifa(PARAM.globalv.global_in_stru.c_str(), std::ios::in);
153-
if (!ifa)
154-
{
155-
ModuleBase::WARNING_QUIT("set_libpaw_files", "can not open stru file");
156-
}
157-
158-
std::string line;
159-
while (!ifa.eof())
160-
{
161-
getline(ifa, line);
162-
if (line.find("PAW_FILES") != std::string::npos) {
163-
break;
164-
}
165-
}
166-
167-
for (int it = 0; it < ucell.ntype; it++)
168-
{
169-
ifa >> filename_list[it];
170-
}
171-
}
172-
#ifdef __MPI
173-
for (int it = 0; it < ucell.ntype; it++)
174-
{
175-
Parallel_Common::bcast_string(filename_list[it]);
176-
}
177-
#endif
178-
179-
GlobalC::paw_cell.init_paw_cell(inp.ecutwfc,
180-
inp.cell_factor,
181-
ucell.omega,
182-
ucell.nat,
183-
ucell.ntype,
184-
atom_type,
185-
(const double**)atom_coord,
186-
filename_list);
187-
188-
for (int iat = 0; iat < ucell.nat; iat++)
189-
{
190-
delete[] atom_coord[iat];
191-
}
192-
delete[] atom_coord;
193-
delete[] atom_type;
194-
CalAtomsInfo ca;
195-
ca.cal_atoms_info(ucell.atoms, ucell.ntype, PARAM);
196-
}
197-
#endif
198-
/// End PAW
199-
200119
//! 3) it has been established that
201120
// xc_func is same for all elements, therefore
202121
// only the first one if used

source/module_hamilt_pw/hamilt_pwdft/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ remove_definitions(-D__DEEPKS)
22
remove_definitions(-D__CUDA)
33
remove_definitions(-D__ROCM)
44
remove_definitions(-D__EXX)
5-
remove_definitions(-DUSE_PAW)
65

76
AddTest(
87
TARGET pwdft_soc

0 commit comments

Comments
 (0)