Changelog¶
All notable changes to DefectPL are documented here. The format follows Keep a Changelog and the project adheres to Semantic Versioning.
[0.3.0] — 2026-06-16¶
Added¶
defectpl pr plot— scatter plot of P-ratio / IPR vs energy or band index (--xaxis energy|band,--vbm,--cbm,--kptoptions).defectpl pr ksplot— Kohn–Sham level diagram with continuous P-ratio colour code.plot_pr_vs_energy(),plot_pr_vs_band_index()inparticipation_ratio.py.plot_ks_with_pr()inks_analysis.py.flatten_pr_result()helper for converting nested PR dict to flat rows.defect_entry.jsonschema versioning (schema_version: "1.0"); reader warns on mismatch.calc_delta_Q()inutils.py— PBC-safe ΔQ from two pymatgenStructureobjects.get_omega_from_pes()inutils.py— parabolic fit of PES data to extract ℏω in eV._require_phonopy()guard inphonon.py; all phonopy imports are now lazy.- pymatgen and phonopy declared as optional extras (
vasp,phonon,all) inpyproject.toml. - All pymatgen imports in
vasp.pymade lazy;OutcarParserno longer inherits fromOutcar. docs/theory/section with phonon, CCD, and P-ratio theory pages.docs/tutorials/section with four step-by-step tutorials.docs/contributing.md— developer guide covering docs, PyPI, and conda-forge.- MkDocs Material theme replacing the old ReadTheDocs theme.
- GitHub Actions: CI matrix (Ubuntu/Windows × Python 3.10/3.11/3.12), docs auto-deploy, and PyPI OIDC trusted-publishing workflow.
- Full numpy-style docstrings for all public classes and functions.
Fixed¶
calc_IPR()formula corrected from1 / Σp²toΣp² / (Σp)²(true IPR);localization_ratioformula updated fromnatoms / iprstonatoms * iprsaccordingly.plotlydeclared as an explicit base dependency (was imported at module level but undeclared).- Python 3.12 deprecation warnings for
\escape sequences in docstrings resolved. - Wrong function name
plot_ks_levelsindocs/api/ks_analysis.mdcorrected toplot_spin_resolved_levels. - Duplicate
HBAR_JSimport inutils.pyremoved. - Phonon eigenvector shape documented as
(nmodes, natoms, 3)throughout. test_phonon.py::test_read_band_yamlshape assertions corrected to(6, 2, 3).
[0.2.1] — 2025-??-??¶
Added¶
- Participation ratio feature:
ParticipationRatioCalculator,read_procar, PROCAR native parser. defectpl prCLI group:calc,batch,summary,top,make-entry,make-dsi.defect_utils.py:make_defect_entry(),make_defect_structure_info().ks_analysis.py:extract_ksplot_data(),plot_ks_levels().defectpl ksplotCLI command.
[0.2.0] — 2024-??-??¶
Added¶
defectpl pl displacementanddefectpl pl forceCLI commands.VibrationalSpectra1Dclass for 1D lineshape with \(\omega_1 \neq \omega_2\).ConfigurationCoordinateDiagramclass.defectpl setup-ccd/analyze-ccdCLI commands.defectpl compare-json/compare-yamlcomparison commands.
[0.1.0] — 2024-??-??¶
Added¶
- Initial release.
Photoluminescencedataclass with displacement mode and force mode.- Phonon utilities:
read_band_yaml,create_force_constants_from_vasprun. Plotterclass with ten standard diagnostic plots.- MSONable JSON serialization for all core objects.