github materialsproject/pymatgen v2026.9.23

latest release: v2026.9.24
3 hours ago

Requires pymatgen-core>=2026.9.23. See the (pymatgen-core) entries below for changes to the core data structures and IO.

  • PR #4684 XRDCalculator.get_pattern: compute atomic form factors once per unique element instead of once per atom, replacing the (M, N_atoms, n_coeff) broadcast with per-element (M, n_coeff) work and occupancy-weighted phase sums; cuts both runtime and peak memory on large structures. (by @mkphuthi)
  • PR #4678 Vectorize the neutron get_pattern path and expand its test coverage. (by @Bud-Macaulay)
  • PR #4661 Vectorize get_pattern in the xrd module; fix a hang at high tolerance. (by @Bud-Macaulay)
  • PR #4655 Genericise AflowPrototypeMatcher so it is no longer tied to AFLOW-specific prototype data. (by @CompRhys)
  • PR #4699 MagneticStructureEnumerator gains whole-motif flip orderings (origin ferri_by_motif_{symbols}_flip) under the ferrimagnetic_by_motif strategy: each magnetic Wyckoff motif stays internally ferromagnetic and one or more motifs are flipped as rigid blocks, e.g. the Néel ground state of a spinel ferrimagnet such as Fe3O4, which the existing order-parameter constraints could only reach incidentally. The orderings are built directly (no enumeration), n motifs give 2^(n-1) - 1 of them, and all retain full crystal symmetry. Magnetic Wyckoff symbols are now iterated in a sorted order, so recorded origins no longer vary with PYTHONHASHSEED. (by @Luguza)
  • PR #4704 MaterialsProjectDFTMixingScheme.process_entries is now reproducible. Entries were ordered via list(EntrySet(...)), i.e. set iteration order, so the result varied with PYTHONHASHSEED, and the greedy, directional StructureMatcher.group_structures then paired GGA and r²SCAN entries differently from run to run (a different Si–Se hull on 3 of 8 hash seeds). Entries are now sorted with a total order and grouped with symmetric=True (pymatgen-core #133). Primitive and conventional cells of one material are no longer split before StructureMatcher sees them, which had silently discarded r²SCAN entries. Fixes #3113 and #4261. (by @kavanase)
  • PR #4702 MagneticStructureEnumerator duplicate-ordering pruning now runs: the guard was inverted (if len(structures_to_remove) == 0), so detected duplicates were logged and then kept. Behavior change: inputs that produce symmetry-equivalent orderings now return fewer structures, and the O(N²) matches_ordering pass has a real cost. Fixes #4697. (by @fronzi)
  • PR #4682 MagneticStructureEnumerator._generate_ordered_structures: honor the configured truncate_by_symmetry count instead of the hardcoded [:5] slice. (by @steps-re)
  • PR #4685 TEMCalculator.get_interplanar_angle returned wrong angles (off by several degrees) for monoclinic and triclinic cells: the k·l reciprocal cross term used cos γ* instead of cos α*, and the h·l term had an index typo. Cubic, tetragonal and hexagonal results are unchanged. (by @steps-re)
  • MPRester.get_entries normalizes entry_id values that newer Materials Project API responses serialize as a dict (identifier/suffix/separator) back to the canonical string form (e.g. mp-1234-GGA+U), so entry IDs stay hashable and comparable. (by @shyuep)
  • PR #4693 Fix pmg analyze --mag All. Fixes #4691. (by @DanielYang59)
  • PR #4666 Fix HeisenbergModel MSON round-trip: from_dict now accepts the jsanitized dict form of ex_mat (previously literal_eval raised ValueError), tolerates the legacy string form, and falls back to an empty matrix. (by @vasa-develop)
  • PR #4658 Strip H/O from the PourbaixDiagram composition dict. (by @SAY-5)
  • PR #4687 Document that CoherentInterfaceBuilder's label_index controls termination deduplication: without it, terminations sharing the same space-group symmetry are merged, which can silently drop physically inequivalent terminations. Fixes #4572. (by @khanaiml)
  • PR #4672 Fix typo and docstring in polarization.py. (by @mminotaki)

Don't miss a new pymatgen release

NewReleases is sending notifications on new releases.