Commit cba48522 by Francois Gygi

fixed atomic charge initialization for nspin==2

git-svn-id: http://qboxcode.org/svn/qb/trunk@1261 cba15fb0-1239-40c8-b417-11db7ca47a34
parent 2e1377ec
......@@ -145,7 +145,17 @@ void BOSampleStepper::initialize_density(void)
}
}
// Initialize charge equally for both spins
cd_.rhog[0] = rhopst;
if ( cd_.rhog.size() == 2 )
{
assert(cd_.rhog[0].size()==cd_.rhog[1].size());
for ( int i = 0; i < cd_.rhog[0].size(); i++ )
{
cd_.rhog[0][i] = 0.5 * rhopst[i];
cd_.rhog[1][i] = 0.5 * rhopst[i];
}
}
initial_atomic_density = true;
}
......
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