Skip to content

Releases: materialsproject/pymatgen

v2023.7.17

17 Jul 23:37
Compare
Choose a tag to compare

What's Changed

  • Fix MagOrderingTransformation by enforcing implicit-zero magnetic moments in SpaceGroupAnalyzer by @mattmcdermott in #3070
  • Bug fix: CollinearMagneticAnalyzer should not fail when Species.spin = None by @mattmcdermott in #3157
  • Deprecate from_string by @janosh in #3158

Full Changelog: v2023.7.14...v2023.7.17

v2023.7.14

14 Jul 13:48
Compare
Choose a tag to compare

What's Changed

  • Don't waste pytest.approx() function calls on integers by @janosh in #3150
  • Add check_potcar: bool = True to MaterialsProject2020Compatibility, MaterialsProjectDFTMixingScheme and PotcarCorrection by @janosh in #3143
  • Rename PMG_DISABLE_POTCAR_CHECKS to PMG_POTCAR_CHECKS by @janosh in #3153
  • Fix "Incompatible POTCAR" error on ComputedEntries with oxidation states by @janosh in #3155
  • Read site labels from cif file (2) by @stefsmeets in #3137

Full Changelog: v2023.7.11...v2023.7.14

v2023.7.11

11 Jul 12:52
Compare
Choose a tag to compare

What's Changed

Full Changelog: v2023.6.28...v2023.7.11

v2023.6.28

28 Jun 00:34
Compare
Choose a tag to compare
  • Use lru_cache to speed up get_el_sp by 400x (@v1kko).
  • Related to lru_cache of get_el_sp, Species.properties is now deprecated in favor of setting Species(spin=5). The rationale is
    that spin is the only supported property for Species anyway. Species and DummySpecies is now mostly immutable, i.e., setting specie.spin = 5 have no effect. This is as intended since the first version of pymatgen.

v2023.06.23

23 Jun 19:09
Compare
Choose a tag to compare

We're pleased to ship the latest and greatest Pymatgen v2023.06.23 today! 🎉 👨‍💻 🌮

Besides squashing many bugs, we give you a brand new Molecule.relax() [code] courtesy of @arosen93 in #3044 to match the existing but now matGL-M3GNet-powered Structure.relax() [code].

What's more, we have some shiny new (Structure|Molecule).calculate() [code] methods for single-point ASE calculations if you just want a quick energy estimate for example:

from pymatgen.core import Lattice, Structure

structure = Structure(
    lattice=Lattice.cubic(2.8),
    species=("Fe", "Fe"),
    coords=((0, 0, 0), (0.5, 0.5, 0.5)),
)
print(f"M3GNet energy={structure.calculate().calc.results['energy'][0]:.4} eV")
>>> M3GNet energy=-16.84 eV

What's Changed

  • Update DictSet to allow direct initialization by @kavanase in #3031
  • DOC: remove "structure" from init by @lbluque in #3030
  • MPAqueousCompatiblity: compute hydrate correction using reduced rather than full composition by @rkingsbury in #2886
  • Don't do a hard bandgap==0 check in the r2SCAN workflow by @arosen93 in #3036
  • Improvements to PDPlotter: unary plots, 2D ternaries, better defaults, and highlight entries by @mattmcdermott in #3032
  • Rename VaspInputSet.(potcar_functional->user_potcar_functional) and start testing DictSet by @janosh in #3035
  • Simplify dict["key"] if "key" in dict else None to dict.get("key") by @janosh in #3038
  • Fix LMAXMIX default in VASP INCAR now set based on element blocks in structure by @janosh in #3041
  • Better error message to clarify Structure.species only supported for ordered by @janosh in #3046
  • IcohpValue.__str__ don't return None by @janosh in #3052
  • PourbaixDiagram wrong composition bug fix by @montoyjh in #3053
  • Migrate GHA release job to PyPI trusted publishing by @janosh in #3055
  • Add (Structure|Molecule).calculate() + Molecule.relax(), improve Structure.relax() by @arosen93 in #3044
  • Don't require ASE as dependency by @arosen93 in #3062
  • Update doc in periodic_table.py by @755452800 in #3063
  • Skip Molecule.relax() tests by @arosen93 in #3060
  • Use self-documenting f-strings instead of hard-coding var names by @janosh in #3064
  • Fix ValueError: Unexpected atomic number Z=0 by @janosh in #3066
  • PymatgenTest add auto-used tmp_path fixture (replaces ScratchDir) by @janosh in #3067
  • Remove assertEqual vestiges in tests by @janosh in #3069
  • More pytest.approx() refactoring by @janosh in #3072
  • Update test_kpath_lm.py, remove redundant test and simplify tests by @JaGeo in #3073
  • AseAtomsAdaptor: Ensure Molecule.charge and Molecule.spin_multiplicity aren't lost upon interconversion by @arosen93 in #3056
  • Single-line None assignment by @janosh in #3074
  • Breaking: change Composition bad key error type from TypeError to KeyError by @janosh in #3075
  • Fix ase tests not running due to pymatgen/io/ase.py shadowing ase package by @janosh in #3077
  • Cosmetic fixes to AseAtomsAdaptor dictionary key ordering by @arosen93 in #3076
  • Improvements to the documentation of the Lobsterenv module by @JaGeo in #3079
  • More precise error message tests and more informative errors in some cases by @janosh in #3081
  • Add test_apply_scissor_(insulator|spin_polarized) by @janosh in #3082
  • Immutable class defaults by @janosh in #3085
  • Fix hill_formula Composition property by @amkrajewski in #3086
  • Fix doc string punctuation by @janosh in #3088
  • Fix DosPlotterTest.test_get_plot_limits() assert floats equal not using approx by @janosh in #3089
  • Check for expected error msg in pytest.raises() by @janosh in #3091
  • Fix ValueError when parsing vasprun.xml with only some atom force constants by @janosh in #3092
  • Fix test_babel_pc_with_ro_depth_0_vs_depth_10 by @janosh in #3093
  • Set hashlib.md5(usedforsecurity=False) when computing POTCAR hashes by @janosh in #3094
  • Move get_zmatrix from GaussianInput to Molecule by @JaGeo in #3095

Full Changelog: v2023.05.31...v2023.06.23

v2023.05.31

01 Jun 01:34
Compare
Choose a tag to compare

Attention ⚠️

user_potcar_settings now defaults to {"W": "W_sv"} in all VASP input sets if user_potcar_functional == "PBE_54" (since the 5.4 POTCARs dropped W_pv) (see #3022 for details)

What's Changed

  • Drop deprecated SubstrateAnalyzer + ZSLGenerator reexports by @janosh in #2981
  • Fix average error by @JaGeo in #2986
  • Doc strings by @janosh in #2987
  • Suspected Typo Fix in pymatgen.io.vasp.optics by @kavanase in #2989
  • Enable ruff doc rules in CI by @janosh in #2990
  • Add type hints for pymatgen.io.ase module by @arosen93 in #2991
  • Hide all type-hint-only imports behind if TYPE_CHECKING by @janosh in #2992
  • Orbital-resolved icohplist by @JaGeo in #2993
  • Re-export SiteCollection + DummySpecies from pymatgen.core by @janosh in #2995
  • Species parse oxi state from symbol str by @janosh in #2998
  • Add LightStructureEnvironments.from_structure_environments() fallback value if ce_and_neighbors is None by @janosh in #3002
  • Support writing structures to compressed JSON (.json.gz .json.bz2 .json.xz .json.lzma) by @janosh in #3003
  • Lookup MPRester API key in settings if None provided as arg by @ml-evs in #3004
  • Update .pytest-split-durations by @janosh in #3005
  • Clean up by @janosh in #3010
  • Fix ValueError when structure.selective_dynamics has type np.array by @janosh in #3012
  • Breaking: Overhaul class PymatgenTest by @janosh in #3014
  • Optimize cython find_points_in _spheres by @lbluque in #3015
  • MaterialsProjectCompatibility issue deprecation warning by @janosh in #3017
  • Tweak variable names by @janosh in #3019
  • Unignore ruff PD011 by @janosh in #3020
  • Breaking: Default user_potcar_settings to {"W": "W_sv"} in all input sets if user_potcar_functional == "PBE_54" by @janosh in #3022

Full Changelog: v2023.5.10...v2023.05.31

v2023.5.10

10 May 14:03
Compare
Choose a tag to compare
  • Fix mem leak in pbc_shortest_vector cython code. (@stichri)
  • Set all cython code to language level 3.

v2023.5.8

08 May 17:25
Compare
Choose a tag to compare

❗ The Yb_2 deprecation release ❗

This release changes the Ytterbium (Yb) pseudo-potential (PSP) from Yb_2 to Yb_3 for all PBE_54 VASP input sets.

Background: The A-lab revealed that as a result of using Yb_2 the energy on Yb compounds is off by a lot, resulting in supposedly stable things being unsynthesizable. While an unfortunate mistake, it's also great to see how experiment can help surface simulation errors.

On pre-PBE_54 input sets, we now issue a warning that Yb_2 will give bad results for most systems since Yb is most often in oxidation state Yb3+.

Reason: The better fix Yb_3 only became available in the PBE_54 PSP set. Requiring it on pre-PBE_54 input sets would mean you can't run Yb compounds.

For more details see #2968 and #2969.

What's Changed

  • Fix TypeError: a bytes-like object is required, not 'list' when passing triplet of bools to find_points_in_spheres() pbc kwarg by @janosh in #2907
  • Fix ValueError: not enough values to unpack in PDPlotter if no unstable entries in PD by @janosh in #2908
  • Fix VolumetricData.to_cube() not preserving structure dimensions by @janosh in #2909
  • Update team.rst by @jmmshn in #2912
  • Faff by @janosh in #2915
  • Add formal_chempots option to ChemicalPotentialDiagram to plot the formal chemical potentials rather than the DFT energies by @kavanase in #2916
  • Modified dosplotter by @kaueltzen in #2844
  • auto version by @jmmshn in #2925
  • bug fix for potcar parsing by @jmmshn in #2910
  • Fix breaking changes from pandas v2 by @janosh in #2935
  • add kwarg to MoleculeGraph method and fix PackmolSet bug by @orionarcher in #2927
  • fix on reading multiple route in Gaussian input file by @Ameyanagi in #2939
  • Fix CI errors by @janosh in #2940
  • Add ResParser support for reading files with spin values by @ScottNotFound in #2941
  • Ignore bad unicode characters in Structure.from_file() by @janosh in #2948
  • Minor modification for symmetrically distinct Miller index generation by @fyalcin in #2949
  • Fixed Wulff shape for new versions of matplotlib by @CifLord in #2950
  • Test figure returned by WulffShape.get_plot() contains single Axes3D by @janosh in #2953
  • Fix Cp2kOutput.spin_polarized() likely not doing what author intended by @janosh in #2954
  • For MPcules: Molecule Trajectory and graph hashes by @espottesmith in #2945
  • self.assertArrayEqual->assert by @janosh in #2955
  • fix GaussianOutput bug with multiple route lines by @xjf729 in #2937
  • Fix ValueError when passing selective_dynamics to Poscar by @chiang-yuan in #2951
  • Bump beautifulsoup4 from 4.11.1 to 4.12.2 by @dependabot in #2962
  • Bump pypa/cibuildwheel from 2.11.4 to 2.12.3 by @dependabot in #2959
  • Bump uncertainties from 3.1.6 to 3.1.7 by @dependabot in #2960
  • Bump numpy from 1.23.2 to 1.24.3 by @dependabot in #2963
  • Bump tabulate from 0.8.10 to 0.9.0 by @dependabot in #2961
  • Bump pandas from 1.4.4 to 2.0.1 by @dependabot in #2964
  • Link /addons from new subsection on /contributing page by @janosh in #2967
  • Breaking: change Yb pseudo-potential on all VASP input sets from Yb_2 to Yb_3 by @janosh in #2969
  • fix recursion error by adding copy and deepcopy dunder methods by @orionarcher in #2973
  • Revert to Yb_2 on pre-PBE_54 input sets by @janosh in #2972
  • Enable flake8-pytest-style via ruff by @janosh in #2975
  • Enable all ruff pylint rules (excl. PLR) by @janosh in #2977
  • only return unique point group operations by @mueslo in #2942

New Contributors

Full Changelog: v2023.3.23...v2023.5.8

v2023.3.23

23 Mar 14:37
Compare
Choose a tag to compare
  • Misc bug fixes.
  • Enable Structure relaxations with TrajectoryObserver (@janosh)

v2023.3.10

10 Mar 21:52
Compare
Choose a tag to compare
Update docs