Exciting Calculator Refactor
Meta-Issue. Bring exciting calculator in line with abstract GenericFileIOCalculator class
Note, this issue might be better as several smaller issues.
Refactor the exciting calculator class
- Inherit from GenericFileIOCalculator
- Needs to take a profile (installation details) and a template (write/out)
- Extract everything that’s not directly related to the calculator:
- Move all methods associated with generating input and parsing output to free functions
- Use Quantum Espresso's calculator class as an example (follow those patterns)
**DOS and Band Structure Class **
Start DOS and Band Structure classes/free functions
Requirements:
- Parse KS eigenvalues OR return the DOS with no smearing function.
- See eigval.xml. Also gives k-points (confirm units are fractional or in inverse Bohr)
- Parse IBZ k-point coordinates
- See band structure outputs or KPOINTS.OUT. The latter contains IBZ k-points and weights
- To get the non-reduced grid, use
reducek = False
in exciting's input
Generation of Exciting Input Files
- Start with ground state.
- Two steps to write an input file:
- Convert ASE inputs to exciting-specific keywords
- Format code-specific keywords to actual file
For example (assuming Alex has interpreted correctly), this would create input-specific keywords:
class ExcitingInputKeywords:
def monkorst_pack(self, grid: Union[int, List[int]], offset=[0,0,0]) -> dict (or tuple):
"""
Monkhorst-Pack {keyword : input string} for input.xml
"""
if isinstance(grid, int):
grid = [grid] * 3
assert len(grid) == 3, "Monkorst Pack grid must be an int, or a List[int] of length 3"
grid_string = + " ".join(k for k in grid)
return {ngridk: '"' + grid_string + '"'}
def band_path(...):
data -> input keywords
return
etc
Exciting Output Parsers
See <EXCITINGROOT>/tools/exciting_tools/excitingtools/parser/
Those written by Alex are small, modular units, covered by unit tests. This pattern should be followed in all cases.
(Note, INFO.OUT is most definitely not written like that).
Relevant Information
-
Band Structure Outputs
- BAND.OUT
- BANDLINES.OUT
- bandstructure.xml
- bandstructure.dat
-
DOS Outputs (both total DOS)
- dos.xml
- TDOS.OUT
Band Path Format
Currently exciting takes start and end points for each path through the BZ. It would be better to be able explicitly specify each 3D point in the path in exciting's input, as this is what ASE supplies.
The simpler option is to supply the high symmetry points only, and the number of grid points between them.
Then we ensure that exciting's grid generation for the band path is consistent with ASE's.