vasppy
is a suite of Python tools and scripts written in Python for manipulating and processing VASP input and output files.
Automated testing of the latest build happens here
Manual tests can be run using
python3 -m unittest discover
API documentation is hosted at Read the Docs.
The potcar_spec()
function in summary.py
currently returns a dictionary of {name, md5_hash}. This does not work as expected when the same species appears more than once in the POTCAR
file. A better implementation would be to return a pair of lists of [names], [md5_hashes].
The DOSCAR class currently raises an error for DOSCAR files that do not include pDOS data.
e.g. https://github.com/bjmorgan/vasppy/issues/13
It would be helpful if the parser checks whether there is pDOS data present and can report appropriately. And / or allows simple DOS datasets to be loaded.
Thanks for the python interface!
In procar.py, I would suggest replacing this:
regex = re.compile( 'k-point\s+(\d+)\s:\s+([- ][01].\d{8})([- ][01].\d{8})([- ][01].\d{8})\s+weight = ([01].\d+)' )
...with this...
regex = re.compile( 'k-point\s+(\d+)\s:\s+([- ][01].\d+)([- ][01].\d+)([- ][01].\d+)\s+weight = (-[01].\d+)' )
I've run into one modified version of VASP that has an extra space after the "weight =". This way it's a little less fragile. - Mark
Thank you for your hard work to develop such good software. Can you provide some examples or scripts on how to use vasppy? Because I am not very familiar with the python language.
Adds simple Vasprun
class for parsing vasprun.xml
data.
Minor update to potcar_spec
to include option to print md5 hashes of POTCARs
Updates to vasp_summary
parsing of summary vasp data.
- Defaults to parse_dos=False
when parsing vasprun.xml
to speed up processing.
- Added a -b
command line option to show a progress bar.
- Added a -j n
command line option for parallel parsing of VASP calculation directories.
Bug fixes and updates, including: - POTCAR hashes now include "revised" VASP POTCAR *_54 formats. - Tests relying on physical constants use the updated scipy 1.4.1 values.
Extensive refactoring to the Procar
class, that introduces breaking changes:
PROCAR
files are now Procar.from_file()
and Procar.from_files()
. Procar.read_from_file()
is deprecated as a public method and will be removed in a future version. Procar.from_files()
takes a list of file path strings, and collates each PROCAR in sequence. This is useful where e.g. a band structure calculation has been split over multiple VASP calculations.Procar.from_file()
now has an optional select_zero_weighted_kpoints
argument. Setting this to True
will return a Procar
object that only has those k-points with zero weights. This is useful for processing data from hybrid DFT calculations, where some k-points might have zero weightings.Procar.from_files()
inherits all keyword arguments from Procar.from_file()
.Procar
objects can be concatenated, using normal addition operators.Procar
object, using the select_k_points()
method.