Commit 3ffc3f07 by Francois Gygi

Fix -atomic_charge initialization when net_charge!=0

parent e9973639
......@@ -144,6 +144,9 @@ void BOSampleStepper::initialize_density(void)
}
}
// Adjust G=0 component of the charge if net_charge is non-zero
rhopst[0] += s_.wf.nel() - atoms.nel();
// Initialize charge equally for both spins
cd_.rhog[0] = rhopst;
if ( cd_.rhog.size() == 2 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment