Commit d8501dea by Francois Gygi

Enable reading of sample containing no wavefunctions (atomset only)


git-svn-id: http://qboxcode.org/svn/qb/trunk@820 cba15fb0-1239-40c8-b417-11db7ca47a34
parent e9412b6d
......@@ -223,8 +223,9 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial)
if ( read_wfv )
cout << " wavefunction velocity was read" << endl;
cout << " SampleReader::readSample: grid nx,ny,nz="
<< nx << " " << ny << " " << nz << endl;
if ( read_wf )
cout << " SampleReader::readSample: grid nx,ny,nz="
<< nx << " " << ny << " " << nz << endl;
delete s_handler;
delete parser;
......@@ -619,7 +620,24 @@ void SampleReader::readSample (Sample& s, const string uri, bool serial)
// force consistency of unit cell
// copy wavefunction domain on atomset unit_cell
s.atoms.set_cell(s.wf.cell());
if ( read_wf )
{
cout << "copying wf.cell on atoms.cell" << endl;
s.atoms.set_cell(s.wf.cell());
}
if ( !read_wf )
{
// only atomset was read
s.wf.reset();
// set wf cell
s.wf.resize(s.atoms.cell(),s.atoms.cell(),s.wf.ecut());
// set number of states from charge in atomset
s.wf.set_nel(s.atoms.nel());
s.wf.update_occ(0.0);
//cout << s.wf << endl;
}
// check if wavefunction_velocity element was read, if not, delete wfvtmp
if ( s.wfv != 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