Skip to content

Commit 575e7f1

Browse files
committed
Merge branch 'ABACUS_2.2.0_beta' of https://github.com.cnpmjs.org/deepmodeling/abacus-develop into ABACUS_2.2.0_beta
2 parents 32e2f82 + 97b196d commit 575e7f1

File tree

10 files changed

+53
-7
lines changed

10 files changed

+53
-7
lines changed

source/module_cell/read_atoms.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -618,7 +618,7 @@ bool UnitCell_pseudo::read_atom_positions(std::ifstream &ifpos, std::ofstream &o
618618
mv.z = true ;
619619
atoms[it].vel[ia].set(0,0,0);
620620
#ifndef __CMD
621-
atoms[it].mag[ia]=magnet.start_magnetization[it];
621+
//atoms[it].mag[ia]=magnet.start_magnetization[it];//if this line is used, default startmag_type would be 2
622622
#endif
623623
atoms[it].angle1[ia]=0;
624624
atoms[it].angle2[ia]=0;

source/src_pdiag/diag_scalapack_gvx.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ std::pair<int,std::vector<int>> Diag_Scalapack_gvx::pdsygvx_once(
4242
if (info)
4343
throw std::runtime_error("info = "+ModuleBase::GlobalFunc::TO_STRING(info)+".\n"+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__));
4444

45-
GlobalV::ofs_running<<"lwork="<<work[0]<<"\t"<<"liwork="<<iwork[0]<<std::endl;
45+
// GlobalV::ofs_running<<"lwork="<<work[0]<<"\t"<<"liwork="<<iwork[0]<<std::endl;
4646
lwork = work[0];
4747
work.resize(lwork,0);
4848
liwork = iwork[0];
@@ -55,7 +55,7 @@ std::pair<int,std::vector<int>> Diag_Scalapack_gvx::pdsygvx_once(
5555
work.data(), &lwork,
5656
iwork.data(), &liwork,
5757
ifail.data(), iclustr.data(), gap.data(), &info);
58-
GlobalV::ofs_running<<"M="<<M<<"\t"<<"NZ="<<NZ<<std::endl;
58+
// GlobalV::ofs_running<<"M="<<M<<"\t"<<"NZ="<<NZ<<std::endl;
5959

6060
if(info==0)
6161
return std::make_pair(info, std::vector<int>{});
@@ -110,7 +110,7 @@ std::pair<int,std::vector<int>> Diag_Scalapack_gvx::pzhegvx_once(
110110
if (info)
111111
throw std::runtime_error("info="+ModuleBase::GlobalFunc::TO_STRING(info)+". "+ModuleBase::GlobalFunc::TO_STRING(__FILE__)+" line "+ModuleBase::GlobalFunc::TO_STRING(__LINE__));
112112

113-
GlobalV::ofs_running<<"lwork="<<work[0]<<"\t"<<"lrwork="<<rwork[0]<<"\t"<<"liwork="<<iwork[0]<<std::endl;
113+
// GlobalV::ofs_running<<"lwork="<<work[0]<<"\t"<<"lrwork="<<rwork[0]<<"\t"<<"liwork="<<iwork[0]<<std::endl;
114114
lwork = work[0].real();
115115
work.resize(lwork,0);
116116
lrwork = rwork[0] + this->degeneracy_max * GlobalV::NLOCAL;
@@ -126,7 +126,7 @@ std::pair<int,std::vector<int>> Diag_Scalapack_gvx::pzhegvx_once(
126126
rwork.data(), &lrwork,
127127
iwork.data(), &liwork,
128128
ifail.data(), iclustr.data(), gap.data(), &info);
129-
GlobalV::ofs_running<<"M="<<M<<"\t"<<"NZ="<<NZ<<std::endl;
129+
// GlobalV::ofs_running<<"M="<<M<<"\t"<<"NZ="<<NZ<<std::endl;
130130

131131
if(info==0)
132132
return std::make_pair(info, std::vector<int>{});

source/src_pw/charge.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ void Charge::atomic_rho(const int spin_number_need, double** rho_in)const // Pe
331331
else if(spin_number_need==2)
332332
{
333333
if(startmag_type==1)
334-
{ cout<<"this should not be called";
334+
{
335335
for (int ig = 0; ig < GlobalC::pw.ngmc ; ig++)
336336
{
337337
const std::complex<double> swap = GlobalC::pw.strucFac(it, ig)* rho_lgl[GlobalC::pw.ig2ngg[ig]];
@@ -375,7 +375,7 @@ void Charge::atomic_rho(const int spin_number_need, double** rho_in)const // Pe
375375
{
376376
//noncolinear case
377377
if(startmag_type == 1)
378-
{cout<<"this would not be call";
378+
{
379379
for (int ig = 0; ig < GlobalC::pw.ngmc ; ig++)
380380
{
381381
const std::complex<double> swap = GlobalC::pw.strucFac(it, ig)* rho_lgl[GlobalC::pw.ig2ngg[ig]];

source/src_pw/forces.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ void Forces::print(const std::string &name, const ModuleBase::matrix &f, bool ry
264264

265265
GlobalV::ofs_running << " " << std::setw(8) << "atom" << std::setw(15) << "x" << std::setw(15) << "y" << std::setw(15) << "z" << std::endl;
266266
GlobalV::ofs_running << std::setiosflags(ios::showpos);
267+
GlobalV::ofs_running << std::setprecision(8);
267268

268269
const double fac = ModuleBase::Ry_to_eV / 0.529177;
269270

tests/integrate/801_PW_LT_sc/INPUT

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
INPUT_PARAMETERS
2+
#Parameters (System)
3+
suffix autotest
4+
ntype 1
5+
nbands 4
6+
atom_file STRU
7+
kpoint_file KPT
8+
pseudo_dir ../tools/PP_ORB/
9+
calculation scf
10+
latname sc
11+
#Parameters (PW)
12+
ecutwfc 25.0 # Rydberg
13+
#Parameters (electronic)
14+
basis_type pw
15+
dr2 1e-10
16+
17+
force 1
18+
stress 1

tests/integrate/801_PW_LT_sc/KPT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
K_POINTS
2+
0
3+
Gamma
4+
1 1 1 0 0 0

tests/integrate/801_PW_LT_sc/STRU

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
#This is the atom file containing all the information
2+
#about the lattice structure.
3+
4+
ATOMIC_SPECIES
5+
H 1.0008 H.pz-vbc.UPF
6+
7+
LATTICE_CONSTANT
8+
10.0 #Lattice constant
9+
10+
ATOMIC_POSITIONS
11+
Cartesian #Cartesian(Unit is LATTICE_CONSTANT)
12+
H #Name of element
13+
0.0 #Magnetic for this element.
14+
2 #Number of atoms
15+
0.00 0.00 -0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z
16+
0.00 0.00 0.0661400 0 0 0 #x,y,z, move_x, move_y, move_z

tests/integrate/801_PW_LT_sc/jd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sc (simple cubic) for pw base
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
etotref -30.3983392986650216
2+
etotperatomref -15.1991696493
3+
totalforceref 6.695464
4+
totalstressref 32.286157
5+
totaltimeref +0.36

tests/integrate/CASES

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,3 +79,4 @@
7979
601_NO_TDDFT_N2_occ
8080
#701_LJ_Ar
8181

82+
801_PW_LT_sc

0 commit comments

Comments
 (0)