Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
 into ultrasoft
  • Loading branch information
YuLiu98 committed Oct 23, 2023
2 parents c56ce61 + 086e82a commit 68b7e17
Show file tree
Hide file tree
Showing 76 changed files with 1,435 additions and 6,120 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/dynamic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Dynamic Analysis

on:
schedule:
- cron: '0 20 * * *'
- cron: '0 16 * * 0'
workflow_dispatch:

jobs:
Expand All @@ -16,8 +16,8 @@ jobs:
uses: actions/checkout@v4
- name: Building
run: |
cmake -B build -DENABLE_ASAN=1 -DBUILD_TESTING=ON -DENABLE_DEEPKS=1 -DENABLE_LIBXC=1
cmake --build build -j16
cmake -B build -DENABLE_ASAN=1 -DENABLE_DEEPKS=1 -DENABLE_LIBXC=1
cmake --build build -j8
cmake --install build
- name: Testing
run: |
Expand Down
4 changes: 1 addition & 3 deletions Dockerfile.gnu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ FROM ubuntu:22.04
RUN apt update && apt install -y --no-install-recommends \
libopenblas-openmp-dev liblapack-dev libscalapack-mpi-dev libelpa-dev libfftw3-dev libcereal-dev \
libxc-dev libgtest-dev libgmock-dev python3-numpy \
bc cmake git g++ make bc time sudo unzip vim wget gfortran libmpich-dev mpich
bc cmake git g++ make bc time sudo unzip vim wget gfortran

ENV GIT_SSL_NO_VERIFY=true TERM=xterm-256color \
OMPI_ALLOW_RUN_AS_ROOT=1 OMPI_ALLOW_RUN_AS_ROOT_CONFIRM=1 OMPI_MCA_btl_vader_single_copy_mechanism=none
Expand All @@ -19,8 +19,6 @@ ENV CMAKE_PREFIX_PATH=/opt/libtorch/share/cmake

ADD https://api.github.com/repos/deepmodeling/abacus-develop/git/refs/heads/develop /dev/null

ENV CMAKE_Fortran_COMPILER=/usr/bin/mpifort

RUN git clone https://github.com/deepmodeling/abacus-develop.git --depth 1 && \
cd abacus-develop && \
cmake -B build -DENABLE_DEEPKS=ON -DENABLE_LIBXC=ON -DENABLE_LIBRI=ON && \
Expand Down
10 changes: 5 additions & 5 deletions docs/advanced/elec_properties/Mulliken.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,20 @@ s 0 1.2553358
s 1 -0.030782972
sum over m -0.030782972
sum over m+zeta 1.2245529
pz 0 0.85945806
px 0 0.85945806
py 0 0.85945806
pz 0 0.85945806
sum over m 2.5783742
pz 1 0.0065801228
px 1 0.0065801228
py 1 0.0065801228
pz 1 0.0065801228
sum over m 0.019740368
sum over m+zeta 2.5981145
d3z^2-r^2 0 0.0189287
dxy 0 0.046491729
dz^2 0 0.0189287
dxz 0 0.046491729
dx^2-y^2 0 0.0189287
dyz 0 0.046491729
dx^2-y^2 0 0.0189287
dxy 0 0.046491729
sum over m 0.17733259
sum over m+zeta 0.17733259
Total Charge on atom: Si 4
Expand Down
1 change: 0 additions & 1 deletion source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,6 @@ OBJS_SRCPW=H_Ewald_pw.o\
stress_func_kin.o\
stress_func_loc.o\
stress_func_nl.o\
stress_func_print.o\
stress_pw.o\
of_stress_pw.o\
symmetry_rho.o\
Expand Down
6 changes: 3 additions & 3 deletions source/module_base/name_angular.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ namespace ModuleBase
const std::string Name_Angular[5][11] =
{
{"s"},
{"px", "py", "pz"},
{"d3z^2-r^2", "dxy", "dxz", "dx^2-y^2", "dyz"},
{"f5z^2-3r^2", "f5xz^2-xr^2", "f5yz^2-yr^2", "fzx^2-zy^2", "fxyz", "fx^3-3*xy^2", "f3yx^2-y^3"},
{"pz", "px", "py"},
{"dz^2", "dxz", "dyz", "dx^2-y^2", "dxy"},
{"fz^3", "fxz^2", "fyz^2", "fzx^2-zy^2", "fxyz", "fx^3-3*xy^2", "f3yx^2-y^3"},
{"g1", "g2", "g3", "g4", "g5", "g6", "g7", "g8", "g9"}
}; // name of atomic orbital jiyy add 2022-05-10
}
Expand Down
4 changes: 4 additions & 0 deletions source/module_esolver/esolver_dp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,14 @@

#include "module_base/parallel_common.h"
#include "module_base/timer.h"
#include "module_io/output_log.h"

namespace ModuleESolver
{

void ESolver_DP::Init(Input& inp, UnitCell& ucell)
{
ucell_ = &ucell;
dp_potential = 0;
dp_force.create(ucell.nat, 3);
dp_virial.create(3, 3);
Expand Down Expand Up @@ -128,11 +130,13 @@ namespace ModuleESolver
void ESolver_DP::cal_Force(ModuleBase::matrix& force)
{
force = dp_force;
ModuleIO::print_force(GlobalV::ofs_running, *ucell_, " TOTAL-FORCE (eV/Angstrom)", force, false);
}

void ESolver_DP::cal_Stress(ModuleBase::matrix& stress)
{
stress = dp_virial;
ModuleIO::print_stress("TOTAL-STRESS", stress, true, false);
}

void ESolver_DP::postprocess()
Expand Down
1 change: 1 addition & 0 deletions source/module_esolver/esolver_dp.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ class ESolver_DP : public ESolver
double dp_potential; ///< the computed potential energy
ModuleBase::matrix dp_force; ///< the computed atomic forces
ModuleBase::matrix dp_virial; ///< the computed lattice virials
UnitCell* ucell_; ///< pointer to the unitcell information
};

} // namespace ModuleESolver
Expand Down
3 changes: 3 additions & 0 deletions source/module_esolver/esolver_ks_lcao_tmpfunc.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
#include "esolver_ks_lcao.h"
#include "module_hamilt_lcao/module_dftu/dftu.h"
#ifdef __DEEPKS
#include "module_hamilt_lcao/module_deepks/LCAO_deepks.h"
#include "module_hamilt_pw/hamilt_pwdft/global.h"
#endif
namespace ModuleESolver
{
template <>
Expand Down
4 changes: 4 additions & 0 deletions source/module_esolver/esolver_lj.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,14 @@

#include "module_cell/module_neighbor/sltk_atom_arrange.h"
#include "module_cell/module_neighbor/sltk_grid_driver.h"
#include "module_io/output_log.h"

namespace ModuleESolver
{

void ESolver_LJ::Init(Input& inp, UnitCell& ucell)
{
ucell_ = &ucell;
lj_potential = 0;
lj_force.create(ucell.nat, 3);
lj_virial.create(3, 3);
Expand Down Expand Up @@ -99,11 +101,13 @@ namespace ModuleESolver
void ESolver_LJ::cal_Force(ModuleBase::matrix& force)
{
force = lj_force;
ModuleIO::print_force(GlobalV::ofs_running, *ucell_, " TOTAL-FORCE (eV/Angstrom)", force, false);
}

void ESolver_LJ::cal_Stress(ModuleBase::matrix& stress)
{
stress = lj_virial;
ModuleIO::print_stress("TOTAL-STRESS", stress, true, false);
}

void ESolver_LJ::postprocess()
Expand Down
3 changes: 2 additions & 1 deletion source/module_esolver/esolver_lj.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ namespace ModuleESolver
void cal_Stress(ModuleBase::matrix& stress) override;
void postprocess() override;


private:
double LJ_energy(const double d);
ModuleBase::Vector3<double> LJ_force(const double d,
const ModuleBase::Vector3<double> dr);
Expand All @@ -35,6 +35,7 @@ namespace ModuleESolver
double lj_potential;
ModuleBase::matrix lj_force;
ModuleBase::matrix lj_virial;
UnitCell* ucell_; ///< pointer to the unitcell information
//---------------------------------------------------
};
}
Expand Down
13 changes: 13 additions & 0 deletions source/module_esolver/test/esolver_dp_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@
* - ESolver_DP::postprocess()
* - ESolver_DP::type_map()
*/
namespace ModuleIO
{
void print_force(std::ofstream& ofs_running,
const UnitCell& cell,
const std::string& name,
const ModuleBase::matrix& force,
bool ry = true)
{
}
void print_stress(const std::string& name, const ModuleBase::matrix& scs, const bool screen, const bool ry)
{
}
} // namespace ModuleIO

class ESolverDPTest : public ::testing::Test
{
Expand Down
Loading

0 comments on commit 68b7e17

Please sign in to comment.