Releases: bjmorgan/vasppy
Releases · bjmorgan/vasppy
v1.0.0
vasppy v1.0.0
Breaking changes
- Removed the custom
Poscarclass — all structure handling now uses pymatgenStructure. Code that importedvasppy.poscar.Poscarmust be updated to usepymatgen.core.Structureorpymatgen.io.vasp.Poscar. - Removed dead modules:
atom.py,pimaim.py,polyhedron.py,xdatcar.pyand their associated scripts (pimaim_to_poscar,pimaim_to_xtl,poscar_to_pimaim,xdatcar_to_disp,xdatcar_to_rdf). - Removed
--scaleand--groupflags fromproc_poscar. pymatgen always folds the scaling factor into the lattice, so--scaleis now the default behaviour.--grouprelied on arbitrary species labels not supported by pymatgen. - Requires Python 3.11+.
Improvements
- Type hints and Google-style docstrings throughout all modules.
- All mypy strict-mode errors resolved.
- Refactored
doscar.pypdos_selectinto composable helpers with guard-clause and normalise-then-act patterns. - Replaced manual lazy-loading with
functools.cached_propertyinVasprun. - Improved error handling: narrowed broad exception catches, added warnings for corrupt vasprun files, validated YAML inputs, added None checks for truncated XML.
- Vectorised self-reference mask construction in
dr_ijusing NumPy broadcasting. - Module-level compiled regex constants in
outcar.py. - CI improvements: mypy in its own job, dropped redundant pylint, fixed duplicate runs on feature branches.
Bug fixes
- Fixed bitwise operator bug in
Band.__eq__. - Fixed PROCAR k-point regex and
KPoint.__eq__. - Fixed RDF initialisation with numpy array indices.
- Fixed file handle leaks in
outcar.py. - Fixed bare except and
potcar_specreturn type insummary.py. - Fixed swapped tensor element ordering in
optics.pydocstrings. - Fixed
read_total_dosreturn type annotation. - Fixed
dr_ijdiagonal masking to only apply whenindices_i == indices_j.
v0.7.2.0
Version 0.6.3.0
Adds simple Vasprun class for parsing vasprun.xml data.
0.6.1.1
0.6.1.0
Updates to vasp_summary parsing of summary vasp data.
- Defaults to
parse_dos=Falsewhen parsingvasprun.xmlto speed up processing. - Added a
-bcommand line option to show a progress bar. - Added a
-j ncommand line option for parallel parsing of VASP calculation directories.
0.6.0.0
Procar refactoring
Extensive refactoring to the Procar class, that introduces breaking changes:
- The preferred ways to read
PROCARfiles are nowProcar.from_file()andProcar.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 optionalselect_zero_weighted_kpointsargument. Setting this toTruewill return aProcarobject 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 fromProcar.from_file().Procarobjects can be concatenated, using normal addition operators.- Specific k-points can be selected, as a new
Procarobject, using theselect_k_points()method.