![]() |
QMCPACK
|
Public Member Functions | |
EshdfFile (const std::string &hdfFileName) | |
~EshdfFile () | |
void | writeQEBoilerPlate (const XmlNode &qeXml) |
void | writeQboxBoilerPlate (const XmlNode &qboxSample) |
void | writeQESupercell (const XmlNode &qeXml) |
void | writeQboxSupercell (const XmlNode &qboxSample) |
void | writeQEAtoms (const XmlNode &qeXml) |
void | writeQboxAtoms (const XmlNode &qboxSample) |
void | writeQEElectrons (const XmlNode &qeXml, const std::string &dir_name) |
void | writeQboxElectrons (const XmlNode &qboxSample) |
Private Types | |
using | momap_t = std::map< std::vector< int >, std::complex< double > > |
using | mopair_t = std::pair< std::vector< int >, std::complex< double > > |
Private Member Functions | |
int | wrapped (int i, int size) const |
int | getIntsOnly (const std::string &str) const |
void | writeApplication (const std::string &appName, int major, int minor, int sub) |
void | writeCreator () |
void | writeFormat () |
void | writeVersion () |
void | readInEigFcn (const XmlNode &nd, FftContainer &cont) |
void | handleSpinGroup (const XmlNode *nd, double &nocc, FftContainer &cont) |
double | getOccupation (const XmlNode *nd) const |
void | handleDensity (const XmlNode &qeXml, const std::string &dir_name, int spinpol) |
std::vector< double > | getPtvs (const XmlNode &qeXml) |
void | processKPts (const XmlNode &band_structure_xml, const std::vector< double > &ptvs, std::vector< std::vector< double >> &eigenvals, std::vector< std::vector< double >> &occupations, std::vector< KPoint > &kpts, std::vector< double > &weights, std::vector< int > &ngvecs) |
void | getNumElectrons (std::vector< std::vector< double >> &occupations, std::vector< double > &weights, int &nup, int &ndn, int spinpol, int ncol) |
void | handleKpt (int kpt_num, const std::string &dir_name, KPoint &kpt, const std::vector< double > &eigenvalues, double weight, int spinpol, int noncol, const momap_t &moref) |
void | readKptGvecs (int kpt_num, const std::string &dir_name, int spinpol, momap_t &morefmap) |
qmcplusplus::hdf_archive | openHdfFileForRead (const std::string &fname) |
EshdfFile (const EshdfFile &f) | |
EshdfFile & | operator= (const EshdfFile &f) |
Private Attributes | |
qmcplusplus::hdf_archive | outfile_ |
helper class meant to control access ot the eshdf file that is being created and provide helper functions so that the proper xml data from QBOX or quantum espresso can be handed to it and the data can be processed and written to the eshdf file
Definition at line 32 of file WriteEshdf.h.
|
private |
Definition at line 34 of file WriteEshdf.h.
|
private |
Definition at line 35 of file WriteEshdf.h.
EshdfFile | ( | const std::string & | hdfFileName | ) |
constructor that sets up the hdf_archive data structure that will hold the eshdf file to be created. Needs to be give the name for that file (hdfFileName)
Definition at line 79 of file WriteEshdf.cpp.
~EshdfFile | ( | ) |
Definition at line 81 of file WriteEshdf.cpp.
|
private |
helper function that takes a string and returns an int consisting of only the numerals in the string
Definition at line 261 of file WriteEshdf.cpp.
|
private |
will use the occupations and weights to figure out the total number of up and down electrons (nup,ndn). Also needs a flag to see if the calculation was spin_polarized (0 for no, 1 for yes) and another to see if noncolinear spins were used (0 for no, 1 for yes)
Definition at line 608 of file WriteEshdf.cpp.
|
private |
to be handed a slater_determinant tag from the qbox sample file. Will read in the occupations from the density_matrix subnode add the total which will be returned as output
Definition at line 96 of file WriteEshdf.cpp.
References XmlNode::getChild(), and XmlNode::getValue().
|
private |
to be handed the top level xml node from data-file-schema, reads the reciprocal lattice vectors from the xml, calculates the primitive translation vectors and puts them sequentially in a 9 element long std::vector
Definition at line 660 of file WriteEshdf.cpp.
References qmcplusplus::det(), XmlNode::getChild(), and XmlNode::getValue().
|
private |
to be handed the top level xml node from data-file-schema, also a string naming the directory where the charge-density.hdf5 file is located and an integer spinpol which is 0 for a non spin polarized calculation and 1 for one that is
Definition at line 492 of file WriteEshdf.cpp.
References qmcplusplus::dims, XmlNode::getAttribute(), XmlNode::getChild(), hdf_archive::getShape(), XmlNode::getValue(), hdf_archive::read(), and hdf_archive::readSlabReshaped().
|
private |
helper function to read in the data from the wfc(kpt_num).hdf5 files located in directory dir_name. Needs to know the KPoint, its eigenvalues, weight, the flags for spinolarized and noncolinear as well as the momap_t that handles the global mapping from g_vectors at individual k_points to global ones
Definition at line 713 of file WriteEshdf.cpp.
References hdf_archive::close(), qmcplusplus::dims, hdf_archive::getShape(), KPoint::kx, KPoint::ky, KPoint::kz, hdf_archive::open(), hdf_archive::readSlabReshaped(), and hdf_archive::readSlabSelection().
|
private |
to be handed a slater_determinant tag of the qbox sample file. Will read in the occupations and call readInEigFcn for each state, also needs an FftContainer to pass on to readInEigFcn
Definition at line 110 of file WriteEshdf.cpp.
References FftContainer::fullSize, XmlNode::getChild(), XmlNode::getName(), XmlNode::getNumChildren(), and FftContainer::kspace.
|
private |
will open the hdf file fname and will make an hdf_archive
Definition at line 477 of file WriteEshdf.cpp.
References hdf_archive::open().
|
private |
to be handed a band_structure xml node from data-file-schema as well as the 9 element vector of ptvs. Then will populate the eigenvalues per kpoint, occupations per kpoint, kpoints, and the weights and number of g-vectors for each kpoint
Definition at line 568 of file WriteEshdf.cpp.
References XmlNode::getAttribute(), XmlNode::getChild(), XmlNode::getName(), XmlNode::getNumChildren(), XmlNode::getValue(), KPoint::kx, KPoint::ky, and KPoint::kz.
|
private |
to be handed a grid_function tag of the qbox sample file. Will then read in the eigenfunciton (spo) in real-space and use the FftContainer cont to transform them to k-space
Definition at line 152 of file WriteEshdf.cpp.
References FftContainer::executeFFT(), FftContainer::fixKsNorm(), FftContainer::fullSize, XmlNode::getAttribute(), FftContainer::getNx(), FftContainer::getNy(), FftContainer::getNz(), FftContainer::getQboxIndex(), XmlNode::getValue(), FftContainer::rspace, and qmcplusplus::sqrt().
|
private |
handles reading in the g-vectors for a particular k-point so that they can be inserted into a momap_t. Needs to know the number of the kpoint (kpt_num), the directory where it is located (dir_name) and whether it is spin polarized (spinpol)
Definition at line 684 of file WriteEshdf.cpp.
References hdf_archive::close(), hdf_archive::getShape(), and hdf_archive::readSlabReshaped().
|
private |
helper indexing function to go from the interval [0,size) to (-size/2,size/2)
Definition at line 84 of file WriteEshdf.cpp.
|
private |
writes to the application field of outfile_ (code -> appName), (version -> major,minor,sub)
Definition at line 206 of file WriteEshdf.cpp.
References qmcplusplus::hdf::version.
|
private |
writes to the creator field of outfile_ (program_name -> convertpw4qmc), (version -> 0,1,0)
Definition at line 224 of file WriteEshdf.cpp.
References qmcplusplus::hdf::version.
|
private |
writes to the format field of outfile_ (format -> ES-HDF)
Definition at line 234 of file WriteEshdf.cpp.
void writeQboxAtoms | ( | const XmlNode & | qboxSample | ) |
Definition at line 412 of file WriteEshdf.cpp.
References qmcplusplus::dims, XmlNode::getAttribute(), XmlNode::getChild(), XmlNode::getName(), XmlNode::getNumChildren(), and XmlNode::getValue().
Referenced by main().
void writeQboxBoilerPlate | ( | const XmlNode & | qboxSample | ) |
Definition at line 240 of file WriteEshdf.cpp.
References XmlNode::getChild(), and XmlNode::getValue().
Referenced by main().
void writeQboxElectrons | ( | const XmlNode & | qboxSample | ) |
Definition at line 1044 of file WriteEshdf.cpp.
References qmcplusplus::dims, qmcplusplus::floor(), XmlNode::getAttribute(), XmlNode::getAttributeIndex(), XmlNode::getChild(), XmlNode::getName(), XmlNode::getNumChildren(), KPoint::kx, KPoint::ky, and KPoint::kz.
Referenced by main().
void writeQboxSupercell | ( | const XmlNode & | qboxSample | ) |
Definition at line 304 of file WriteEshdf.cpp.
References qmcplusplus::dims, XmlNode::getAttribute(), and XmlNode::getChild().
Referenced by main().
void writeQEAtoms | ( | const XmlNode & | qeXml | ) |
functions to write the atoms section of the eshdf file needs to be handed the top level xml node (data-file-schema or qbox.sample)
Definition at line 352 of file WriteEshdf.cpp.
References qmcplusplus::dims, XmlNode::getAttribute(), XmlNode::getChild(), XmlNode::getName(), XmlNode::getNumChildren(), and XmlNode::getValue().
Referenced by main().
void writeQEBoilerPlate | ( | const XmlNode & | qeXml | ) |
functions to get the boilerplate written for qbox or quantum espresso calls writeApplication, writeVersion, writeCreator and writeFormat nees to be handed the top level xml node (data-file-schema or qbox.sample)
Definition at line 279 of file WriteEshdf.cpp.
References XmlNode::getAttribute(), and XmlNode::getChild().
Referenced by main().
void writeQEElectrons | ( | const XmlNode & | qeXml, |
const std::string & | dir_name | ||
) |
functions to write the electrons section of the eshdf file need to be handed the top level xml node (data-file-schema or qbox.sample) in the case of espresso, also needs to be handed the directory name where the wfc.hdf5 and charge-density.hdf5 files are located
Definition at line 980 of file WriteEshdf.cpp.
References XmlNode::getChild(), and XmlNode::getValue().
Referenced by main().
void writeQESupercell | ( | const XmlNode & | qeXml | ) |
functions to write the supercell and primitive_vectors sections of the eshdf file. Needs to be handed the top level xml node (data-file-schema or qbox.sample)
Definition at line 327 of file WriteEshdf.cpp.
References qmcplusplus::dims, XmlNode::getChild(), and XmlNode::getValue().
Referenced by main().
|
private |
writes to the version field of outfile_ (version -> 2,1,0)
Definition at line 218 of file WriteEshdf.cpp.
References qmcplusplus::hdf::version.
|
private |
Definition at line 38 of file WriteEshdf.h.