github materialsproject/pymatgen v2023.06.23

latest releases: v2024.9.17.1, v2024.9.17, v2024.9.10...
15 months ago

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

Don't miss a new pymatgen release

NewReleases is sending notifications on new releases.