Skip to content

Commit 596cdc8

Browse files
author
dyzheng
committed
Fix: overlap force stress error for nspin=2
1 parent c8d913a commit 596cdc8

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

source/source_lcao/FORCE_STRESS.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,7 @@ void Force_Stress_LCAO<T>::getForceStress(UnitCell& ucell,
179179
if (PARAM.inp.nspin == 2)
180180
{
181181
dmat.dm->switch_dmr(1);
182+
edm.switch_dmr(1);
182183
}
183184

184185
const hamilt::HContainer<double>* dmR = dmat.dm->get_DMR_pointer(1);
@@ -209,6 +210,7 @@ void Force_Stress_LCAO<T>::getForceStress(UnitCell& ucell,
209210
if (PARAM.inp.nspin == 2)
210211
{
211212
dmat.dm->switch_dmr(0);
213+
edm.switch_dmr(0);
212214
}
213215

214216
// Calculate local potential force/stress (vl_dphi)

0 commit comments

Comments
 (0)