Skip to content

Commit

Permalink
Refactor:Remove the read_atom_species and add read_lattice_constant (#…
Browse files Browse the repository at this point in the history
…5828)

* modify cheack_tau

* change the cheak_tau

* modify the read_atom_species

* upadte the file

* fix unittest bug

* add objs

* modify the atom_label and atom_mass

* modify compile bug

* modify the reszie of the atom_mass

* fix compile bug

* [pre-commit.ci lite] apply automatic fixes

* Revert "fix compile bug"

This reverts commit 9a51ca3.

* Revert "modify the reszie of the atom_mass"

This reverts commit f9cc2b9.

* update the resize

* fix unitest bug

* change the compile bug

---------

Co-authored-by: pre-commit-ci-lite[bot] <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com>
  • Loading branch information
A-006 and pre-commit-ci-lite[bot] authored Jan 9, 2025
1 parent 2ebc9bb commit beeb256
Show file tree
Hide file tree
Showing 34 changed files with 652 additions and 610 deletions.
2 changes: 2 additions & 0 deletions source/Makefile.Objects
Original file line number Diff line number Diff line change
Expand Up @@ -189,6 +189,8 @@ OBJS_CELL=atom_pseudo.o\
check_atomic_stru.o\
update_cell.o\
bcast_cell.o\
read_stru.o\
read_atom_species.o\

OBJS_DEEPKS=LCAO_deepks.o\
deepks_force.o\
Expand Down
2 changes: 2 additions & 0 deletions source/module_cell/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ add_library(
check_atomic_stru.cpp
update_cell.cpp
bcast_cell.cpp
read_stru.cpp
read_atom_species.cpp
)

if(ENABLE_COVERAGE)
Expand Down
12 changes: 4 additions & 8 deletions source/module_cell/module_neighbor/test/prepare_unitcell.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,16 +76,12 @@ class UcellTestPrepare
this->lmaxmax,
this->init_vel,
this->fixed_axes);
delete[] ucell->atom_label;
delete[] ucell->atom_mass;
delete[] ucell->pseudo_fn;
delete[] ucell->pseudo_type;

delete[] ucell->magnet.start_magnetization; //mag set here
ucell->atom_label = new std::string[ucell->ntype];
ucell->atom_mass = new double[ucell->ntype];
ucell->pseudo_fn = new std::string[ucell->ntype];
ucell->pseudo_type = new std::string[ucell->ntype];
ucell->atom_label.resize(ucell->ntype);
ucell->atom_mass.resize(ucell->ntype);
ucell->pseudo_fn.resize(ucell->ntype);
ucell->pseudo_type.resize(ucell->ntype);
ucell->orbital_fn.resize(ucell->ntype);
ucell->magnet.start_magnetization = new double[ucell->ntype]; //mag set here
ucell->magnet.ux_[0] = 0.0; // ux_ set here
Expand Down
Loading

0 comments on commit beeb256

Please sign in to comment.