Skip to content

Make read_vasp_xml use SinglePointDFTCalculator

username-removed-249965 requested to merge vasp_xml_singlepointdft into master

This makes vasp_read_xml return an Atoms object with an attached SinglePointDFTCalculator, instead of a SinglePointCalculator. In addition, this makes the attached calculator have an associated free_energy value (for use in atoms.get_potential_energy(force_consistent=True)), an associated list of irreducible k-points (vasprun.xml does not print the total list of k-points), the Fermi level, and the eigenvalues and occupancies for the first k-point in the irreducible k-point mesh (normally the gamma point). The Fermi level and eigenvalues/occupancies are only available for the final configuration from a successfully terminated VASP calculation.

Ideally, I would be attaching a complete list of eigenvalues and occupancies for each k-point in the irreducible k-point mesh, however it would appear that SinglePointDFTCalculator does not currently support this. I believe SinglePointDFTCalculator is currently used exclusively for parsing GPAW output files. Since I do not use GPAW, I hesitate to make any changes to the SinglePointDFTCalculator that might break read_gpaw_out. If someone is willing to make the SinglePointDFTCalculator object compatible with eigenvalues and occupancies from the complete list of k-points, I can modify read_vasp_xml to work with this new interface.

Merge request reports