Commit 8d434af8 by Francois Gygi

Fix spectrum file for nspin==2

parent 7a008115
......@@ -248,15 +248,16 @@ int SpectrumCmd::action(int argc, char **argv)
// write spectrum to file spectrum.dat
if ( ui->onpe0() )
{
ofstream spfile(spfilename);
for ( int ispin = 0; ispin < nspin; ispin++ )
{
ofstream spfile(spfilename);
spfile << "# spectrum ispin=" << ispin+1
<< " width=" << width << endl;
for ( int ie = 0; ie < sp[ispin].size(); ie++ )
spfile << emin + ie * de << " " << sp[ispin][ie] << endl;
spfile << endl << endl;
}
spfile.close();
}
return 0;
......
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