Skip to content

Commit a0d4655

Browse files
committed
<fix> default startmag_type should be 1, for element magnetic instead of atomic magnetic.
<range> only for atomic_rho
1 parent 9a589d3 commit a0d4655

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
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_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]];

0 commit comments

Comments
 (0)