NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4512 most downloaded on PyPI
Python Materials Genomics is a robust materials analysis code that defines core object representations for structures and molecules with support for many electronic structure codes. It is currently the core analysis code powering the Materials Project (https://materialsproject.org).
Last release 11 days ago
23 Sep 2026
Release timing varies
gaps range from 9 days to 6 months
Nearly every release is documented
notes for 59 of the last 60 stable releases
9 versions withdrawn
withdrawn after publishing
15 years old
414 releases · first in 2011
Re-release of v2026.9.23 (no code changes). The v2026.9.23 sdist exceeded PyPI's size limit because setuptools-scm pulled every tracked file (test fil
Re-release of v2026.9.23 (no code changes). The v2026.9.23 sdist exceeded PyPI's size limit because setuptools-scm pulled every tracked file (test files, docs) into it, so v2026.9.23 is available on PyPI as a wheel only. A MANIFEST.in now restricts the sdist to src/ and metadata.
Requires pymatgen-core>=2026.9.23 . See the (pymatgen-core) entries below for changes to the core data structures and IO.
Requires pymatgen-core>=2026.9.23. See the (pymatgen-core) entries below for changes to the core data structures and IO.
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)get_pattern path and expand its test coverage. (by @Bud-Macaulay)get_pattern in the xrd module; fix a hang at high tolerance. (by @Bud-Macaulay)AflowPrototypeMatcher so it is no longer tied to AFLOW-specific prototype data. (by @CompRhys)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)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)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)MagneticStructureEnumerator._generate_ordered_structures: honor the configured truncate_by_symmetry count instead of the hardcoded [:5] slice. (by @steps-re)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)pmg analyze --mag All. Fixes #4691. (by @DanielYang59)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)PourbaixDiagram composition dict. (by @SAY-5)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)polarization.py. (by @mminotaki)One column per quarter.
PR #4649 Deprecate LobsterEnv constructors that mixed file paths and objects; prefer object-only initialization (by @naik-aakash )
energy_adjustments correctly in clean mode to avoid skipped removals (by @irishmango)pmg CLI startup with lazy imports (by @hheei)get_phase_separation_energy docstring (by @irishmango)PR #4531 Deprecate CifParser init support of filename as StringIO (by @DanielYang59 )
process_entries arguments to solid_compat in MaterialsProjectAqueousCompatibility (by @lkkmpn)io.vasp.outputs.Wavecar and io.wannier90.Unk (by @mturiansky)CifParser init support of filename as StringIO (by @DanielYang59)VolumetricData.copy preserve subclass type (by @DanielYang59)io.common (by @DanielYang59)Incar.proc_val reuse incar_parameters.json to determine types (by @DanielYang59)! as comment marker (by @DanielYang59)Ion.as_reduced_dict doesn't reduce charge (by @DanielYang59)PR #4476 patch ReDOS vulnerability in GaussianInput.from_string by @lbluque Major changes:
PROCAR (for example, the double-counting of symmetry points when using a k-path for plotting bandstructure).print with logging by @DanielYang59
print with logging, I assume pymatgen as a lib code shouldn't use print...projected_magnetisation with projected_magnetization (US spelling) by @DanielYang59Composition.get_wt_fraction return float instead of FloatWithUnit by @DanielYang59__rtruediv__ for FloatWithUnit, fix ArrayWithUnit loses unit_type when unpickled by @DanielYang59
ArrayWithUnit behaviourArrayWithUnit loses unit_typecore.units, https://app.codecov.io/gh/materialsproject/pymatgen/blob/master/pymatgen%2Fcore%2Funits.pylinear_assignment with scipy linear_sum_assignment by @DanielYang59
linear_assignment with scipy linear_sum_assignment n | avg_time (s) | std_dev (s)
------------------------------------
100 | 0.000104 | 0.000018
500 | 0.004302 | 0.002333
1000 | 0.018374 | 0.006702
5000 | 1.049615 | 0.327349
n | avg_time (s) | std_dev (s)
------------------------------------
100 | 0.000121 | 0.000030
500 | 0.005082 | 0.002957
1000 | 0.018487 | 0.006484
5000 | 1.062805 | 0.332552
JDFTXOutfileSlice.vibrational_modes and JDFTXOutfileSlice.vibrational_energy_components by @benrich37JDFTXOutfileSlicelist[dict], where each dict containsstr"Imaginary", "Zero", or "Real"intintmode["Degeneracy"] == 2, than there is one other mode in the list with the same frequency)float | complexfloatNDArray[float]JDFTXOutfileSlicedict[str, float], containingTranslateSitesTransformation class. Both index variables in apply_transformation are named identically. The test case did not capture this error. I changed the existing test case to fail when run with the old code and renamed the variables.has_cobicar when NcICOBILIST is present by @tomdemeyereicobiBetween is activated lobster prints out the NcICOBILIST.lobster file. In the lobster output we find "Writing COBICAR.lobster, ICOBILIST.lobster and NcICOBILIST.lobster..." instead of the regular line. The current parser then returns False even if the COBICAR.lobster is present.has_cohpcar and has_coopcar are flipped?\n split) would allow much greater flexbility, performance and robustness.ruff.mypy.duecredit @due.dcite decorators to reference relevant papers by DOI (example)pre-commit hooks to auto-check types and linting before every commit:pip install -U pre-commit
pre-commit installrequests lower pin, fix pre-commit errors by @DanielYang59
requests upper pin, current pin seems too strict and might cause unresolvable dependencyruff errors from pre-commitsets.py file with one new class, JdftxInputSet, which does little more than wrap the other JDFTx I/o classes. The only minor change to the original atomate2 code is that the __init__ method now accepts a pymatgen Structure instead of a JDFTXStructure.BaseJdftxSet.yaml was also moved from atomate2.JdftxInfile are working and that the file written by the input set yields the expected JdftxInfile.NEBAnalysis by @DanielYang59
To close #4465
glob now would use exact match first (['path_1_Li_sv2004_test/00/POSCAR.xyz', 'path_1_Li_sv2004_test/00/POSCAR', 'path_1_Li_sv2004_test/00/POSCAR.vasp'])https://github.com/materialsproject/pymatgen/blob/f01009c390a3df02d4d45b8f0225cf59305ee7bf/src/pymatgen/analysis/transition_state.py#L261spline_options dict with boolean flag zero_slope_saddle as there's only one boolean config available: https://github.com/materialsproject/pymatgen/blob/f01009c390a3df02d4d45b8f0225cf59305ee7bf/src/pymatgen/analysis/transition_state.py#L70str.splitlines(keepends=False):Unlike split() when a delimiter string sep is given, this method returns an empty list for the empty string, and a terminal line break does not result in an extra line:
cc @JaGeo @naik-aakash
Element properties: density_of_solid and Molar volume by @DanielYang59
Element properties, to close #4453Structure by @DanielYang59
Structure, to fix #4460json and orjson, also check round trip?site.species in pymatgen.symmetry.analyser.SpacegroupAnalyzer.get_primitive_standard_structure()site.species in pymatgen.symmetry.analyser.SpacegroupAnalyzer.get_primitive_standard_structure()__str__() methods by @kavanaseSpecies.__str__, which can become a bottleneck in some workflows which e.g. subselect sites in a structure based on the species, before doing further processing (e.g. defect site matching in doped).getattr calls.Treat LATTICE_CONSTRAINTS as is for INCARs.
JDFTXOutfileSlice.trajectory revision by @benrich37JDFTXOutfileSlice.trajectory is now initialized with frame_properties setJOutStructure.properties filled with relevant data for frame_propertiesJOutStructure.site_propertiesJOutStructure now redundant to data stored in JOutStructure.properties and JOutStructure.site_propertiespymatgen.io.vasp.inputs to close #4430. Possibly breaking from the CLI side (the directory structure will change)is_periodic_image algorithm by @kavanasedoped testing workflows, SpacegroupAnalyzer.get_primitive_standard_structure() is one of the main bottlenecks (as to be expected). One of the dominant cost factors here is the usage of is_periodic_image, which can be expensive for large structures due to many np.allclose() calls.is_periodic_image (and thus SpacegroupAnalyzer.get_primitive_standard_structure()) from 35s to 10s.io.vasp.outputs.get_band_structure_from_vasp_multiple_branches by @DanielYang59
io.vasp.outputs.get_band_structure_from_vasp_multiple_branches, to fix #4060NanoscaleStability.plot_one_stability_map and plot_all_stability_map. by @kmuax.xlabel() and ax.ylabel() calls with correct ax.set_xlabel() and ax.set_ylabel().ax.legend() to plot_all_stability_map so that labels passed via ax.plot(..., label=...) are displayed.test_plot() to test_surface_analysis.py.EnergyAdjustment by @DanielYang59
== or != for possible float comparisonEnergyAdjustment cannot generate repr:from pymatgen.entries.computed_entries import EnergyAdjustment
print(EnergyAdjustment(10, uncertainty=0))Traceback (most recent call last):
File "/Users/yang/developer/pymatgen/test_json.py", line 25, in <module>
print(EnergyAdjustment(10, uncertainty=0))
File "/Users/yang/developer/pymatgen/src/pymatgen/entries/computed_entries.py", line 108, in __repr__
return f"{type(self).__name__}({name=}, {value=:.3}, {uncertainty=:.3}, {description=}, {generated_by=})"
^^^^^^^^^^^^^^^^^
ValueError: Precision not allowed in integer format specifier
Lattice property (lengths/angles/volume) for much faster Structure.as_dict by @DanielYang59
lengths/angles/volume of Lattice would now be cached, related to #4385verbosity in as_dict of PeriodicSite/Lattice now explicitly requires literal 0 or 1 to be consistent with docstring, instead of checking if verbosity > 0 (currently in grace period, only warning issued) https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/lattice.py#L904-L905Lattice propertieslength/angles/volume is not cached and is frequently used, for example accessing all lattice parameter related property would lead to length/angles being repeatedly calculated: https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/lattice.py#L475-L524structure.as_dict now around 8x fasterTotal time: 3.29617 s
File: create_dummp_json_structure.py
Function: generate_and_save_structures at line 34
Line # Hits Time Per Hit % Time Line Contents
==============================================================
34 @profile
35 def generate_and_save_structures(n, output_dir):
36 1 20.0 20.0 0.0 os.makedirs(output_dir, exist_ok=True)
37
38 1001 222.0 0.2 0.0 for i in range(n):
39 1000 291789.0 291.8 8.9 structure = generate_dummy_structure()
40 1000 583.0 0.6 0.0 filename = f"structure_{i:04d}.json.gz"
41 1000 1942.0 1.9 0.1 filepath = os.path.join(output_dir, filename)
42
43 2000 224549.0 112.3 6.8 with gzip.open(filepath, "wb") as f:
44 1000 2761900.0 2761.9 83.8 dct = structure.as_dict()
45 1000 15163.0 15.2 0.5 f.write(orjson.dumps(dct))
Total time: 0.949622 s
File: create_dummp_json_structure.py
Function: generate_and_save_structures at line 34
Line # Hits Time Per Hit % Time Line Contents
==============================================================
34 @profile
35 def generate_and_save_structures(n, output_dir):
36 1 37.0 37.0 0.0 os.makedirs(output_dir, exist_ok=True)
37
38 1001 195.0 0.2 0.0 for i in range(n):
39 1000 286696.0 286.7 30.2 structure = generate_dummy_structure()
40 1000 511.0 0.5 0.1 filename = f"structure_{i:04d}.json.gz"
41 1000 1843.0 1.8 0.2 filepath = os.path.join(output_dir, filename)
42
43 2000 214130.0 107.1 22.5 with gzip.open(filepath, "wb") as f:
44 1000 431677.0 431.7 45.5 dct = structure.as_dict()
45 1000 14533.0 14.5 1.5 f.write(orjson.dumps(dct))
lattice (the performance bottleneck) is not used in the dict for site: https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/structure.py#L2856-L2857as_dict to control whether lattice would be generated at allTotal time: 0.867376 s
IcohpCollection instance is not serialized correctly, thus I added custom from_dict and as_dict methods here.Unrelated: Reduce bloat in outputs module -- Remove references to deprecated fields -- Begin phasing out redundant fields
orjson as required dependency as default JSON handler when custom encoder/decoder is not needed by @DanielYang59JDFTXOutfileSlice Durability Improvement by @benrich37JDFTXOutfileSlice._from_out_slice method (less likely to error out on unexpected termination)JOutStructure in initializing a JOutStructures with a try/except blockinit_structure in JOutStructureJOutStructureJDFTXOutfileSlice.infile can be initializedJDFTXInfile Comparison Methods by @benrich37JDFTXInfile objectsJDFTXInfile.is_comparable_toexclude_tags, exclude_tag_categories, ensure_include_tags to ignore certain tags in the comparisonexclude_tag_categories defaults to ["export", "restart", "structure"] as "export" and "restart" are very rarely pertinent to comparability, "structure" as subtags of this category are generally the one thing being intentionally changed in comparisons (ie different local minima or a slab with/without an adsorbate)JDFTXInfile.get_filtered_differing_tagsJDFTXInfile.is_comparable_to to get filtered differing tags between JDFTXInfile objectsJDFTXInfile.is_comparable_toAbstractTag.is_equal_to and AbstractTag._is_equal_toAbstractTag._is_equal_to is an abstract method that must be implemented for each AbstractTag inheritorJDFTXInfile object pymatgen.io.jdftx.inputs.ref_infilepymatgen.io.jdftx.jdftxinfile_default_inputs.default_inputs: dictJDFTXInfile.get_differing_tags_from for tags in self missing from other that are identical to the default settingJDFTXInfile to follow the order: magic methods -> class methods / transformation methods -> validation methods -> properties -> private methods'selective_dynamics' in site_properties for a Structure passed in JDFTXInfile.from_structure (used if selective_dynamics argument left as None)TagContainers to their default valuesTagContainer needs to be filled with the default values before comparing to the full default value'fluid-minimize', so an improved mapping for dynamic default values needs to be implementedJDFTXOutputs.bandstructure: BandStructure by @benrich37bandstructure attribute to JDFTXOutputsBandStrucure objectstore_var, but functions slightly differentlystore_vars and then is deletedprojections field if also has stored 'bandProjections'wk_list to JDFTXOutputsElecData initializing in crawfishBandStructureSymmLine(s) for calculations with explicitly defined 'kpoint' tags, as using 'kpoint's instead of kpoint-folding is most likely an indicator of a band-structure calculationStructure objects by preventing hash collisions in the lru_cache of get_el_sp and increasing its maxsize. The issue is that currently Element objects are hashed to the same value as the integer atomic numbers (e.g., Element[H] maps to the same hash as int(1)). This forces the lru_hash to perform an expensive __eq__ comparison between the two, which reduces the performance of instantiating many Structure objects. Also here we increase the maxsize of get_el_sp's lru_cache to 1024 for further performance improvements.Structure objects from 31 seconds to 8.7s (avoid hash collisions) to 6.1s (also increase maxsize to 1024).validate_value_bounds method to AbstractTag, that by default always returns True, ""AbstractNumericTag that inherits AbstractTag to implement validate_value_bounds properlyub and lbNone, or some value to indicate an upper or lower boundub_incl and lb_incl>= instead of > in comparative checks on upper and lower boundsFloatTag and IntTag from AbstractTag to AbstractNumericTagvalidate_value_bounds for TagContainer to dispatch checking for contained subtagsvalidate_boundaries to JDFTXInfile to run validate_value_bounds on all contained tags and valuesvalidate_value_boundaries argument for initialization methods of JDFTXInfile, which will run validate_boundaries after initializing JDFTXInfile but before returning when TrueJDFTXInfile from the input summary in a JDFTXOutfileSlice - boundary values may exist internally in JDFTx for non-inclusive bounded tags as the default values, but cannot be passed in the input file. For this reason, errors on boundary checking must be an easily disabled feature for the construction and manipulation of a JDFTXInfile, but out-of-bounds values must never be written when writing a file for passing to JDFTx.JDFTXInfile objectJDFTXInfile.__setitem__ is too extreme as it would require adding an attribute to JDFTXInfile to allow disabling the checkto_jdftxinfile method for JDFTXOutfile by @benrich37to_jdftxinfile for JDFTXOutfile(Slice)JDFTXInfile and Structure to create a new JDFTXInfile object that can be ran to restart a calculationstrip_structure_tags for JDFTXInfileJDFTXInfile for creating equivalent JDFTXInfile objects with updated associated structuresFloatTag to an IntTagminval field for certain FloatTags which prevent writing error-raising valuesto_jdftxinfile>= operatorJDFTXOutfile.lattice redundant to JDFTXOutfile.structure.lattice.matrixgrad_K are part of a broad group of values that can be logged for an optimization step, and the fields present in each log varies a lot more than I previously thought when I initially wrote the JDFTx outputs module. Generalizing how these are stored into a dictionary of arbitrary keys should make the outputs module more robust, as well as helping reduce the bloat in the outputs module.__add__) method tweak by @benrich37if subval in params[key] check is done to avoid adding duplicate values. This seems like something the set built-in could help with, but since the sub-values are dictionaries, using set is a little more difficultjif1 = jif2 + jif3) no longer requires each jif2 and jif3 to have a unique set of tagsjif1['key'] == jif3['key']jif1['key'] = jif2['key'] + [val for val in jif3['key'] if not val in jif2['key']src/pymatgen/io/jdftx/inputs.pytests/io/jdftx/test_jdftxinfile.py{"End": {"State": True}} is technically already in a list that contains something like {"End": {"State": True, "Berry": True}}{'dump': [{"End": {"State": True, "BGW": True}}, {"End": {"State": True, "Berry": True}}] into {'dump': [{"End": {"State": True, "BGW": True, "Berry": True}}] would fix this bloat riskSpacegroupAnalyzer, the standardisation attempts to reorder the lattice vectors depending on whether the alpha angle is >90 degrees or <90 degrees. If it is exactly 90 degrees, it defaults to the original lattice, however there was an issue with this implementation where it assumed that the beta and gamma angles were also 90 degrees (and so set the lattice matrix as [[a, 0, 0], [0, b, 0], [0, 0, c]]), which may not (and in most cases should not) be the case.SpacegroupAnalyzer was different to Structure.find_primitive() (by a non-integer factor). I've added a test for this case, and also confirmed that the general implementation here works for the failure case noted in #1929UFloat update by @kavanaseUFloat(0, 0) were already present in ComputedEntry.energy_adjustments, avoiding the updated handling of setting std_dev to np.nan when it is 0 (and avoiding the UFloat warning about std_dev being 0).symmetrized_structures = True in OrderDisorderedStructureTransformation. Also allow for passing distance/angle precision kwargs to do on-the-fly symmetrization. Add testspymatgen.io.jdftx.inputs.JDFTXStructureJDFTXStructure.from_jdftxinfile no longer assumes 'lattice' tag is provided in 3x3 matrix formattests/io/jdftx/test_jdftxinfile.py for Structure <-> JDFTXStructure <-> JDFTXInfile conversion for JDFTXInfile with newly implemented special case values for 'lattice' tagJDFTXStructure.from_jdftxinfile for JDFTXInfile with special case tag 'lattice' value and non-identity value for 'latt-scale' tagnp.nan instead of 0 for no uncertainty with ufloat, to avoid unnecessary warnings by @kavanasenone_on_error oversight fix by @benrich37
pymatgen/io/jdftx/outputs.py that causes construction of a JDFTXOutfile to fail if none_on_error is turned on and the final JDFTXOutfileSlice in slices is None (ie a very common issue when parsing an interrupted job that hasn't restarted yet).mypy criteriageneric_tags helper module by @benrich37TagContainer.multiline_tag attributejdftxinfile_master_format.py, but all the tests still pass. Just in case, I will be prioritizing finishing merges for the JDFTx inputs module to avoid any untested consequences)TagContainer.writebreak_on_tol option to BruteForceOrderMatcher, which allows one to massively speed up the molecule matching in cases where one just cares if the molecules match within a given RMSD (rather than screening over all possible permutations, to get the lowest possible RMSD).get_colon_var_t1get_colon_val, but keeping an alias until renaming is updated outside this modulenp.nan instead of None when "nan" is the valuecorrect_geom_opt_type for working with JDFTx AIMD out filesRemove lxml since it is slower for many Vasprun parsing situations.
lxml is now used for faster Vasprun parsing.
Structure now has a calc_property method that enables one to get a wide range of elasticity, EOS, and phonon properties using matcalc. Requires matcal
merge_sites on a structure with only one site. For example:John R. Rumble, ed., CRC Handbook of Chemistry and Physics, 105th Edition (Internet Version 2024), CRC Press/Taylor & Francis, Boca Raton, FL. If a specific table is cited, use the format: "Physical Constants of Organic Compounds," in CRC Handbook of Chemistry and Physics, 105th Edition (Internet Version 2024), John R. Rumble, ed., CRC Press/Taylor & Francis, Boca Raton, FL.
Updated perturb method to be in parity for Structure and Molecule.
perturb method to be in parity for Structure and Molecule.periodic_table.json by @DanielYang59PR #4212 Deprecate PymatgenTest, migrate tests to pytest from unittest by @DanielYang59
pybtex with bibtexparser by @DanielYang59actual_kpoints_weights is list[float] and add test by @kavanasecore.periodic_table.json by @DanielYang59PymatgenTest, migrate tests to pytest from unittest by @DanielYang59Bug fix for list based searches in MPRester.
Major new feature and breaking change: Legacy MP API is no longer supported. Pymatgen also no longer support mp-api in the backend. Instead, Pymatgen'…
Vasprun parsing by @kavanaseiupac_ordering entries in core.periodic_table.json by @DanielYang59SymmOp by @DanielYang59Deprecate to_dict with as_dict, to close #4351
AseAtomsAdaptor by @yantar92
to_dict with as_dict by @DanielYang59
to_dict with as_dict, to close #4351contributing.md to note preferred naming conventiondocs
The recent additional of JDFTx IOs have a relatively short grace period of 6 months, and others have one yearcore.periodic_table.json by @DanielYang59
core.periodic_table.json
Our csv parser should copy the high spin ionic radii to the base entry:
<img width="858" alt="image" src="https://github.com/user-attachments/assets/00f3ecff-3c78-4583-90b8-106ed362b78b" />
https://github.com/materialsproject/pymatgen/blob/4c7892f5c9dcc51a1389b3ad2ada77632989a13e/dev_scripts/update_pt_data.py#L84-L8710<sup>-8</sup> Ω m as the unit), and our parser would interpret it to:from pymatgen.core import Element
print(Element.Se.electrical_resistivity) # 1e-08 m ohm
This is the only data as "high" in periodic_table.json AFAIK.
After this, it would be None with a warning:/Users/yang/developer/pymatgen/debug/test_elements.py:3: UserWarning: No data available for electrical_resistivity for Se
print(Element.Se.electrical_resistivity)
None
monty imports, enhance test for Outcar parser to cover uncompressed format by @DanielYang59
monty fix for reverse readline, close #4033 and close #4237reverse_readline with faster reverse_readfilemonty importsfrom_cube function in io.common.VolumetricData to significantly improve performance. When processing large .cube files, the original implementation took minutes to read and set Pymatgen objects. The optimized version incorporates several key improvements: file reading is now handled with readlines() instead of multiple readline() calls, reducing I/O operations. Voxel data parsing has been rewritten to use NumPy vectorized parsing instead of loops, making numerical processing faster. Atom site parsing has been improved by replacing the loop-based readline() approach with list comprehensions. Additionally, volumetric data parsing now leverages np.fromstring() instead of converting lists to NumPy arrays.aviary to use these functions.from_ase_atoms constructor for (I)Structure/(I)Molecule returns the corresponding type by @DanielYang59
from_ase_atoms for Molecule, to close #4320SymmetrizedStructure MSONable by @DanielYang59
SymmetrizedStructure MSONable, to fix #3018Direct configuration= 2
-0.63265286-0.11227753 -0.15402785
-0.12414874 -0.01213420 -0.28106824
...
In some cases, this issue is reparable (a negative sign separates coordinates). This PR implements a fix when it is reparable and adds a few Trajectory-like convenience features to XdatcarPR #3680 - Add support for vaspout.h5, improvements to POTCAR handling by @esoteric-ephemera
PR #3680 - Add support for vaspout.h5, improvements to POTCAR handling by @esoteric-ephemera
vaspout.h5 and improvements in POTCAR handling.vaspout.h5 and ensuring compatibility with existing VASP I/O infrastructure.PR #4319 - Update abitimer in io.abinit by @gpetretto
pandas > 2 and includes test files for validation.PR #4315 - Patch to allow pyzeo integration by @daniel-sintef
zeo++ with pyzeo, which is a more actively maintained version.PR #4281 - Add method to get the Pearson symbol to SpaceGroupAnalyzer by @CompRhys
SpaceGroupAnalyzer.PR #4295 - Pass kwargs to IStructure.to method in JSON format by @DanielYang59
json.dumps behavior during format conversion.PR #4306 - IStructure.to defaults to JSON when filename is unspecified by @DanielYang59
PR #4297 - Bugfix for Structure/ase.Atoms interconversion by @wolearyc
Atoms.info and Structure.properties.PR #4304 - MagneticStructureEnumerator: Expose max_orderings argument by @mkhorton
max_orderings configurable via keyword argument.PR #4299 - Update inequality in get_linear_interpolated_value by @kavanase
PR #4291: Remove deprecated memory units from core by @DanielYang59
PR #4288: Dos.get_cbm_vbm updates by @kavanase
emmet-core tests.PR #4278: [Breaking] Fix valence electron configuration parsing by @DanielYang59
PotcarSingle.electron_configuration, resolving #4269.PR #4275: Fix default transformation_kwargs in MagneticStructureEnumerator by @DanielYang59
transformation_kwargs to close #4184, with additional comment and type cleanup.PR #4274: Move occ_tol to init in OrderDisorderedStructureTransformation by @Tinaatucsd
StandardTransmuter by moving occ_tol to class initialization.PR #4276: Fix timeout in EnumlibAdaptor by @DanielYang59
PR #4280: Pre-commit autoupdate by @pre-commit-ci[bot]
PR #4290: Migrate type annotation tweaks from #4100 by @DanielYang59
PR #4291: Remove deprecated memory units from core by @DanielYang59
core for clarity.PR #4292: Fix for plotly PDPlotter/ChemicalPotentialDiagram.get_plot() by @kavanase
titlefont issue in plotly v6, updating dependency requirements.PR #4283: Composition support formula strings with curly brackets by @janosh
PR #4279: Fix P1 SymmOp string for CifParser.get_symops by @DanielYang59
PR #4265: Clarify return type for core.Composition.reduced_composition by @DanielYang59
core.Composition.PR #4268: Add Structure.get_symmetry_dataset method by @janosh
moyopy symmetry analysis with a new optional dependency set.PR #4271: Add missing parenthesis to BoltztrapAnalyzer.get_extreme.is_isotropic by @DanielYang59
PR #4270: Add seed: int = 0 parameter to Structure.perturb() by @janosh
New NEBSet and CINEBSet for NEB calculations. These replace the old MITNEBSet. @shyuep
Objective: Enhance the reliability and efficiency of float comparison in the codebase.
PR #4159 by @DanielYang59
== for float comparisons to fix issue #4158.assert_array_equal with suitable alternatives like assert_allclose for floating-point arrays to accommodate numerical imprecision._proj function implementation, resulting in approximately a threefold speed increase.== in list/tuple/dict structures.PR #4190 by @benrich37
JDFTXOutputs, JDFTXOutfile, JDFTXOutfileSliceJOutStructures, JElSteps, etc.outputs.py: Provides a robust Pythonic representation of a JDFTx output file.jdftxoutfileslice.py: Represents a “slice” of a JDFTx output file.joutstructures.py: Represents a series of structures within an output file slice.joutstructure.py: Represents a single structure within an output file.jelstep.py: Manages SCF steps and convergence data.jminsettings.py: Abstract class for managing input minimization settings, with subclasses for various settings types.PR #4189 by @benrich37
inputs.py module introducing JDFTXInfile class.generic_tags.py: Includes "Tag" objects to define structures expected by JDFTx inputs.jdftxinfile_master_format.py: Facilitates the creation of appropriate "Tag" objects.jdftxinfile_ref_options.py: Contains lists of valid inputs for various tags, such as XC functionals for the "elec-ex-corr" tag.PR #4159 by @DanielYang59
== to compare float values to address issue #4158.assert_allclose over assert_array_equal for float arrays due to numerical imprecision._proj implementation.== for list/tuple/dict as referenced here.PR #4190 by @benrich37
JDFTXOutputs
JDFTXOutputs.outfileJDFTXOutfileJDFTXOutfile.slices[i]JDFTXOutfileSlice, etc.outputs.py module with JDFTXOutfile for representing a JDFTx out file.jdftxoutfileslice.py module with JDFTXOutfileSlice for file slices of a single JDFTx call.joutstructures.py with JOutStructures for representing structures from an out file slice.joutstructure.py with JOutStructure for each single structure within an out file.jelstep.py with JElStep and JElSteps for SCF steps and convergences.jminsettings.py with JMinSettings for minimization settings representations.PR #4189 by @benrich37
inputs.py module containing JDFTXInfile for Pythonic representation of JDFTx calculation inputs.generic_tags.py module with "Tag" objects (AbstractTag and its inheritors) for JDFTx input structure representation.jdftxinfile_master_format.py for creating proper "Tag" objects for inputs.jdftxinfile_ref_options.py for holding lists of acceptable strings for input tags.PR #4255 by @peikai: This PR resolves an inconsistency in the run_type for entries in a mixing scheme. The entry type was changed to 'r2SCAN', but the
PR #4255 by @peikai: This PR resolves an inconsistency in the run_type for entries in a mixing scheme. The entry type was changed to 'r2SCAN', but the MaterialsProjectDFTMixingScheme() expected 'R2SCAN', causing errors and ignored entries in GGA(+U)/R2SCAN mixing scheme corrections.
PR #4160 by @DanielYang59: Enhancements and clarifications were made to the io.vasp.outputs.Outcar docstring/comment. This includes more specific type annotations for parsers and updating the default value in getattr to False for condition checks.
PR #4257 by @njzjz: This PR covers the intention to build Linux arm64 wheels, referencing the availability of free hosted runners for public repositories. However, specific features and fixes were not detailed.
PR #4240 by @kavanase: A minor fix in FermiDos improves the robustness of the get_doping method, addressing issues with handling rare cases with minimal energy increments between VBM and CBM indices.
PR #4254 by @tpurcell90: Adjustments regarding the use of libxc with FHI-aims to automatically add an override warning call, ensuring the process behaves as expected.
PR #4256 by @kavanase: Addresses a behavior issue with Composition for mixed species and element compositions, providing a fix that ensures compositions are interpreted correctly, avoiding incorrect results in representations and calculations.
PR #4253 by @esoteric-ephemera: This PR introduces the ability to convert between ASE and pymatgen trajectories, maintaining additional data such as energies, forces, and stresses, thus improving integration between the two programs and addressing related issues.
These updates range from bug fixes and enhancements to new features aimed at improving the functionality and reliability of the codebase.
Iterating Element no longer contains isotopes (D and T). (@DanielYang59)
Fix borg.hive.SimpleVaspToComputedEntryDrone.assimilate ValueError when core file missing (@DanielYang59)
…support of all IO classes. Note that this is a backwards incompatible change. It should not affect many users since VaspDir was introduced only in the…
Bug fix for parsing of dielectric calculations from vasprun.xml.
VaspDir now supports nest directories. Also, supports non-object string returns.
Replace deprecated ExpCellFilter with FrechetCellFilter (@ab5424)
pyamtgen.io.vasp.VaspDir class for easy navigation of VASP directories as pymatgen objects.Enable parsing of "SCF energy" and "Total energy" from QCOutput for Q-chem 6.1.1+. (@Jaebeom-P)
Emergency release No. 2 to fix yet another regression in chempot diagram. (Thanks @yang-ruoxi for fixing.)
Emergency release to fix broken phase diagram plotting due to completely unnecessary refactoring. (Thanks @yang-ruoxi for fixing.)
💥 Breaking: NumPy/Cython integer type changed from np.long/np.int_ to int64 on Windows to align with NumPy 2.x, changing the default integer type to i
💥 Breaking: NumPy/Cython integer type changed from np.long/np.int_ to int64 on Windows to align with NumPy 2.x, changing the default integer type to int64 on Windows 64-bit systems in favor of the platform-dependent np.int_ type.
Recommendation: Please explicitly declare dtype=np.int64 when initializing a NumPy array if it's passed to a Cythonized pymatgen function like find_points_in_spheres. You may also want to test downstream packages with NumPy 1.x on Windows in CI pipelines.
PWInput by @jsukpark in https://github.com/materialsproject/pymatgen/pull/4001PROCAR parsing functionalities by @kavanase in https://github.com/materialsproject/pymatgen/pull/3890sum over len+if by @janosh in https://github.com/materialsproject/pymatgen/pull/4012int64 in Numpy/cython code to avoid OS inconsistency by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3992FermiDos.get_doping() to be more robust by @kavanase in https://github.com/materialsproject/pymatgen/pull/3879/src in doc links to source code by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4032LNONCOLLINEAR match in Outcar parser by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4034VaspInput.incar updates having no effect if incar is dict (not Incar instance) by @janosh in https://github.com/materialsproject/pymatgen/pull/4052Cp2kOutput.parse_hirshfeld add_site_property("hirshf[i->'']eld") by @janosh in https://github.com/materialsproject/pymatgen/pull/4055apply_operation(fractional=True) by @kavanase in https://github.com/materialsproject/pymatgen/pull/4057PMG_VASP_PSP_DIR_Error by @janosh in https://github.com/materialsproject/pymatgen/pull/4048io.vasp.inputs and format tweaks for some other parts by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3996from pytest import raises/mark by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4021Lobster.outputs.Cohpcar docstring by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4039strict=True with zip to ensure length equality by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4011skip mark for test_delta_func by @njzjz in https://github.com/materialsproject/pymatgen/pull/4014pytest.mark.skip instead by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4027io.vasp.help by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4020PT001 on master by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4003ruff rules by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4015S101, replace all assert in code base (except for tests) by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4017ruff PLC0206 and PLR6104 by @janosh in https://github.com/materialsproject/pymatgen/pull/4035pymatgen directly by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/4053kpoints in from_str method as integer in auto Gamma and Monkhorst modes by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3994io.lobster.{lobsterenv/outputs} by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3887Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.8.9...v2024.9.10
Revert bad split of sets.py, which broke downstream code.
numpydependency in pyproject by @janosh in https://github.com/materialsproject/pymatgen/pull/3970io.pwscf.PWInput.from_str() by @jsukpark in https://github.com/materialsproject/pymatgen/pull/3931Element/Species: order full_electron_structure by energy by @rkingsbury in https://github.com/materialsproject/pymatgen/pull/3944CubicSupercell transformation to also be able to look for orthorhombic cells by @JaGeo in https://github.com/materialsproject/pymatgen/pull/3938.pmgrc.yaml location via new PMG_CONFIG_FILE env var by @janosh in https://github.com/materialsproject/pymatgen/pull/3949mp-api installed. by @AntObi in https://github.com/materialsproject/pymatgen/pull/3950get_projection_on_elements docstring under Procar class by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3945Incar check_params for Union type by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3958electronic_structure.{bandstructure/cohp} by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3873electronic_structure.{core/dos} by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3880issue-metrics on forks by @ab5424 in https://github.com/materialsproject/pymatgen/pull/3962Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.7.18...v2024.8.8
Add multiwfn QTAIM parsing capabilities by @espottesmith in https://github.com/materialsproject/pymatgen/pull/3926
numpydependency in pyproject by @janosh in https://github.com/materialsproject/pymatgen/pull/3970io.pwscf.PWInput.from_str() by @jsukpark in https://github.com/materialsproject/pymatgen/pull/3931Element/Species: order full_electron_structure by energy by @rkingsbury in https://github.com/materialsproject/pymatgen/pull/3944CubicSupercell transformation to also be able to look for orthorhombic cells by @JaGeo in https://github.com/materialsproject/pymatgen/pull/3938.pmgrc.yaml location via new PMG_CONFIG_FILE env var by @janosh in https://github.com/materialsproject/pymatgen/pull/3949mp-api installed. by @AntObi in https://github.com/materialsproject/pymatgen/pull/3950get_projection_on_elements docstring under Procar class by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3945Incar check_params for Union type by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3958electronic_structure.{bandstructure/cohp} by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3873electronic_structure.{core/dos} by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3880issue-metrics on forks by @ab5424 in https://github.com/materialsproject/pymatgen/pull/3962layout: default title: Change Log
layout: default title: Change Log
setuptools for packaging (#3934)spglib to new SpglibDataset format with version 2.5.0 (#3923)layout: default title: Change Log
layout: default title: Change Log
update_charge_from_potcar (#3866)strict_anions option to MaterialsProject2020Compatibility (@mkhorton)MSONAtoms handling (@Andrew-S-Rosen)Species (@esoteric-ephemera)<!-- Release notes generated using configuration in .github/release.yml at v2024.6.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v2024.6.4 -->
uv resolution strategies: highest and lowest-direct by @janosh in https://github.com/materialsproject/pymatgen/pull/3852io.cif by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3853.pmgrc.yaml setting PMG_VASP_PSP_SUB_DIRS: dict[str, str] by @janosh in https://github.com/materialsproject/pymatgen/pull/3858shift for SlabGenerator.get_slab by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3748'optional' deps installed by @janosh in https://github.com/materialsproject/pymatgen/pull/3857Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.5.31...v2024.6.4
[Deprecation] Replace Element property is_rare_earth_metal with is_rare_earth to include Y and Sc by @DanielYang59 in https://github.com/materialsproj…
<!-- Release notes generated using configuration in .github/release.yml at v2024.5.31 -->
Beautifulsoup optional by @ab5424 in https://github.com/materialsproject/pymatgen/pull/3774BSPlotterProjected.get_projected_plots_dots() by @janosh in https://github.com/materialsproject/pymatgen/pull/3798_get_dipole_info for DDEC6 ChargemolAnalysis and add test case by @JonathanSchmidt1 in https://github.com/materialsproject/pymatgen/pull/3801Cp2kOutput.parse_initial_structure() use regex for line matching to allow arbitrary white space between Atom/Kind/Element/... by @janosh in https://github.com/materialsproject/pymatgen/pull/3810POTCAR Setup. by @hongyi-zhao in https://github.com/materialsproject/pymatgen/pull/3834isclose over == for overlap position check in SlabGenerator.get_slabs by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3825Element property is_rare_earth_metal with is_rare_earth to include Y and Sc by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3817is_radioactive property to Element class by @AntObi in https://github.com/materialsproject/pymatgen/pull/3804from_ase_atoms() method to Structure by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3812get_... method and @property doc strings by @janosh in https://github.com/materialsproject/pymatgen/pull/3802core.(molecular_orbitals|operations|sites|spectrum|tensor|xcfunc) by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3829util directory by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3831core.(trajectory/units) by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3832core.periodic_table/bonds/composition/ion/lattice/libxcfunc, new type MillerIndex and fix Lattice hash by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3814TYPE_CHECKING only imports by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3827io.cif by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3820core.structure by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3837io.vasp.outputs by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3776ruff 0.4.3 auto-fixes by @janosh in https://github.com/materialsproject/pymatgen/pull/3808ruff rules by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3813pandas.read_csv: replace deprecated delim_whitespace=True with sep="\s+" by @ab5424 in https://github.com/materialsproject/pymatgen/pull/3846CifParser and add missing site label if not check_occu by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3819Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.5.1...v2024.5.31
Fix OPTIMADE rester URL contruction and improve testing by @ml-evs in https://github.com/materialsproject/pymatgen/pull/3756
vasprun.converged_ionic logic when EDIFFG=0, REDO of PR #3765 by @matthewkuner in https://github.com/materialsproject/pymatgen/pull/3783tests/io/test_zeopp.py by @AntObi in https://github.com/materialsproject/pymatgen/pull/3784CifWriter by @stefsmeets in https://github.com/materialsproject/pymatgen/pull/3767Lattice.get_points_in_sphere to always be np.array(s) by @janosh in https://github.com/materialsproject/pymatgen/pull/3797pyright fixes for ext/io/phonon/symmetry/transformations/util/vis/dev_scripts and improve io.lobster by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3757csv/cif into folders by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3746gulp from package data, code base and CI tests by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3789io.vasp.inputs/optics by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3740pyright fixes by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3777kpts in Kpoints to Sequence[tuple] and set it as property by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3758get_string->get_str alias for Poscar by @timurbazhirov in https://github.com/materialsproject/pymatgen/pull/3763ruff FURB192 by @janosh in https://github.com/materialsproject/pymatgen/pull/3785Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.4.13...2024.5.1
Hot fix release for v2024.4.12 to be yanked on PyPI due to https://github.com/materialsproject/pymatgen/issues/3751.
Hot fix release for v2024.4.12 to be yanked on PyPI due to https://github.com/materialsproject/pymatgen/issues/3751.
Cohp.has_antibnd_states_below_efermi rename by @JaGeo in https://github.com/materialsproject/pymatgen/pull/3750typing_extension ImportError in downstream packages by @janosh in https://github.com/materialsproject/pymatgen/pull/3752pyproject.toml by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3755Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.4.12...v2024.4.13
Remove deprecated analysis.interface, rename classes to PascalCase and rename with_* to from_* by @DanielYang59 in https://github.com/materialsproject…
<!-- Release notes generated using configuration in .github/release.yml at v2024.4.12 -->
pymatgen.io.openff module by @orionarcher in https://github.com/materialsproject/pymatgen/pull/3729io.res.ResWriter by @stefsmeets in https://github.com/materialsproject/pymatgen/pull/3671Structure.replace_species() by @stefsmeets in https://github.com/materialsproject/pymatgen/pull/3672phonopy.get_pmg_structure site_properties key for magmoms by @JonathanSchmidt1 in https://github.com/materialsproject/pymatgen/pull/3679staticmethod to classmethod by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3710raise Exception and add missing raise keyword by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3728ChemicalPotentialDiagram 2D plot not respecting formal_chempots setting by @uliaschauer in https://github.com/materialsproject/pymatgen/pull/3734core.surface comments and docstrings by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3691io.cp2k.input.DataFile by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3745MSONAtoms is indeed MSONable when Atoms.info is loaded with goodies by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3670needs_u_correction(comp: CompositionLike) -> set[str] utility function by @janosh in https://github.com/materialsproject/pymatgen/pull/3703PhononDOSPlotter and PhononBSPlotter by @ab5424 in https://github.com/materialsproject/pymatgen/pull/3700ElementType enum in core/periodic_table.py by @janosh in https://github.com/materialsproject/pymatgen/pull/3726plt.Axes by @janosh in https://github.com/materialsproject/pymatgen/pull/3749xyz, mcif, cssr, exciting, wannier90 by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3681LatticeTestCase -> TestLattice by @janosh in https://github.com/materialsproject/pymatgen/pull/3693if TYPE_CHECKING: block by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3711Self type in Method Signatures by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3705analysis.interface, rename classes to PascalCase and rename with_* to from_* by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3725EntrySet.ground_states and CIF writing in NEBSet.write_input by @janosh in https://github.com/materialsproject/pymatgen/pull/3732pip to uv by @janosh in https://github.com/materialsproject/pymatgen/pull/3675__hash__ for BalancedReaction by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3676unittest.TestCase subclassing by @janosh in https://github.com/materialsproject/pymatgen/pull/3718exec in code by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3736eval, replace manual offset in enumerate and rename single letter variables by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3739Self return type on from_dict methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3702self from Structure methods replace, substitute, remove_species, remove_sites by @janosh in https://github.com/materialsproject/pymatgen/pull/3706Self return type on Lattice methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3707os.path.(exists->isfile) by @janosh in https://github.com/materialsproject/pymatgen/pull/3690Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.3.1...v2024.4.12
Deprecate _parse_atomic_densities in BaderAnalysis and fix Bader test setup by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3656
<!-- Release notes generated using configuration in .github/release.yml at v2024.3.1 -->
BSPlotterProjected.get_projected_plots_dots_patom_pmorb fix set & list intersect by @janosh in https://github.com/materialsproject/pymatgen/pull/3651get_niggli_reduced_lattice if entering A1 case by @packer-jp in https://github.com/materialsproject/pymatgen/pull/3657Kpoint.__eq__ and PhononBandStructureSymmLine.__eq__ methods + tests by @janosh in https://github.com/materialsproject/pymatgen/pull/3650np.eye(3) instead of [[1, 0, 0], [0, 1, 0], [0, 0, 1]] for identies by @janosh in https://github.com/materialsproject/pymatgen/pull/3659_parse_atomic_densities in BaderAnalysis and fix Bader test setup by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3656bader_caller from altering compressed file in place by @DanielYang59 in https://github.com/materialsproject/pymatgen/pull/3660Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.2.23...v2024.3.1
<!-- Release notes generated using configuration in .github/release.yml at v2024.2.23 -->
<!-- Release notes generated using configuration in .github/release.yml at v2024.2.23 -->
BadInputSetWarning logic for relaxations of a likely metal by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3634MSONAtoms definition behind ASE package availability by @ml-evs in https://github.com/materialsproject/pymatgen/pull/3645VaspInputSet to VaspInputGenerator by @janosh in https://github.com/materialsproject/pymatgen/pull/3566Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.2.20...v2024.2.23
<!-- Release notes generated using configuration in .github/release.yml at master -->
<!-- Release notes generated using configuration in .github/release.yml at master -->
This release addresses an important security issue that might affect some users of pymatgen who are parsing untrusted user input, for example a server using pymatgen to parse a user-uploaded CIF file. More information is available in the associated CVE. Thank you to William Khem-Marquez (@SteakEnthusiast) for the discovery and responsible disclosure of this issue.
TransformedStructure.__getattr__ by @mjwen in https://github.com/materialsproject/pymatgen/pull/3617MPSCANRelaxSet.yaml parameters and alphabetize by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3615bader_analysis_from_path using warning as file path and reinstate test by @janosh in https://github.com/materialsproject/pymatgen/pull/3632self from all SiteCollection/Structure/Molecule in-place modification methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3623get_nn_info in local_env.py by @ftherrien in https://github.com/materialsproject/pymatgen/pull/3635CODEOWNERS by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3616MSONAtoms class that's an MSONable form of an ASE Atoms object by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3619Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.2.8...v2024.2.20
Minor update to avoid deprecation warning by @kavanase in https://github.com/materialsproject/pymatgen/pull/3601
<!-- Release notes generated using configuration in .github/release.yml at v2024.2.8 -->
Vasprun.get_potcars search method; tweak fake POTCARs by @esoteric-ephemera in https://github.com/materialsproject/pymatgen/pull/3587SiteCollection.reduced_formula property by @janosh in https://github.com/materialsproject/pymatgen/pull/3610Entry.(formula|reduced_formula) by @janosh in https://github.com/materialsproject/pymatgen/pull/3611copy() methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3602bug_report.yaml by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3589Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.1.27...v2024.2.8
Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.1.26...v2024.1.27
Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2024.1.26...v2024.1.27
Deprecate Structure.ntypesp replaced by Structure.n_elems by @janosh in https://github.com/materialsproject/pymatgen/pull/3562
<!-- Release notes generated using configuration in .github/release.yml at v2024.1.26 -->
Symmetry.from_spacegroup by @stefsmeets in https://github.com/materialsproject/pymatgen/pull/3527zval to be an integer to avoid improper syntax in .cri file by @wladerer in https://github.com/materialsproject/pymatgen/pull/3502Path objects as filename in IStructure.to() by @janosh in https://github.com/materialsproject/pymatgen/pull/3553Structure.properties in structure_from_abivars()/structure_to_abivars() round trip by @janosh in https://github.com/materialsproject/pymatgen/pull/3552magmoms in get_phonopy_structure() by @tomdemeyere in https://github.com/materialsproject/pymatgen/pull/3555ValueError: Invalid fmt with Structure.to(fmt='yml') by @janosh in https://github.com/materialsproject/pymatgen/pull/3557Structure.ntypesp replaced by Structure.n_elems by @janosh in https://github.com/materialsproject/pymatgen/pull/3562Composition by @janosh in https://github.com/materialsproject/pymatgen/pull/3569PhononBandStructure.has_imaginary_gamma_freq() by checking for negative freqs at all q-points close to Gamma by @janosh in https://github.com/materialsproject/pymatgen/pull/3530PhononDos.r2_score method by @janosh in https://github.com/materialsproject/pymatgen/pull/3535write_site_properties = False in CifWriter for writing Structure.site_properties as _atom_site_{prop} by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3550pymatgen.io.pwmat module by @lhycms in https://github.com/materialsproject/pymatgen/pull/3512pandas in Structure.as_dataframe() to improve startup speed by @janosh in https://github.com/materialsproject/pymatgen/pull/3568self in SiteCollection spin/oxi state add/remove methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3573(to|from|as|get)_string methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3561NEBAnalysis.get_plot() by @janosh in https://github.com/materialsproject/pymatgen/pull/3570tests/io/aims use numpy.testing.assert_allclose and pytest.MonkeyPatch by @janosh in https://github.com/materialsproject/pymatgen/pull/3575PolarizationLattice which inherited from Structure (antipattern) by @janosh in https://github.com/materialsproject/pymatgen/pull/3585Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.12.18...v2024.1.26
<!-- Release notes generated using configuration in .github/release.yml at v2023.12.18 -->
<!-- Release notes generated using configuration in .github/release.yml at v2023.12.18 -->
pymatgen/symmetry/groups.py module-scoped SymmOp import causing circular import by @janosh in https://github.com/materialsproject/pymatgen/pull/3486PhononBSPlotter.plot_compare() by @janosh in https://github.com/materialsproject/pymatgen/pull/3510PBE64Base.yaml for new VASP PBE_64 POTCARs by @janosh in https://github.com/materialsproject/pymatgen/pull/3470(Structure|Molecule).alphabetical_formula by @janosh in https://github.com/materialsproject/pymatgen/pull/3478PhononDosPlotter and PhononBSPlotter by @janosh in https://github.com/materialsproject/pymatgen/pull/3479PhononDosPlotter.plot_dos() add support for existing plt.Axes by @janosh in https://github.com/materialsproject/pymatgen/pull/3487pymatgen.io.qchem.outputs by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3483CifParser only warn about primitive default value change to False if not passed to parse_structures explicitly by @janosh in https://github.com/materialsproject/pymatgen/pull/3505PhononBSPlotter.plot_compare() add legend labels by @janosh in https://github.com/materialsproject/pymatgen/pull/3507__add__ __sub__ __mul__ __neg__ __eq__ for PhononDos with tests by @janosh in https://github.com/materialsproject/pymatgen/pull/3511Phonon(Dos|BS)Plotter colors, allow custom plot settings per-DOS by @janosh in https://github.com/materialsproject/pymatgen/pull/3514latexify by @janosh in https://github.com/materialsproject/pymatgen/pull/3516Composition raise ValueError if formula string is only numbers and spaces by @janosh in https://github.com/materialsproject/pymatgen/pull/3517ValueError for float('NaN') in Composition by @janosh in https://github.com/materialsproject/pymatgen/pull/3519PhononDos.mae() and PhononBandStructure.has_imaginary_gamma_freq() methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3520PhononDos.get_smeared_densities return unchanged for sigma=0 by @janosh in https://github.com/materialsproject/pymatgen/pull/3524PhononDos.get_last_peak() by @janosh in https://github.com/materialsproject/pymatgen/pull/3525MPRester requests by @tschaume in https://github.com/materialsproject/pymatgen/pull/3496__str__ tests across pymatgen by @janosh in https://github.com/materialsproject/pymatgen/pull/3472ruff automatic type annotations by @janosh in https://github.com/materialsproject/pymatgen/pull/3498Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.11.12...v2023.12.18
Hot fix: pymatgen package missing potcar-summary-stats.json.bz2 by @janosh in https://github.com/materialsproject/pymatgen/pull/3468
pymatgen package missing potcar-summary-stats.json.bz2 by @janosh in https://github.com/materialsproject/pymatgen/pull/3468Composition.charge and charge_balanced properties by @janosh in https://github.com/materialsproject/pymatgen/pull/3471Deprecate CifParser.get_structures() in favor of new parse_structures in which primitive defaults to False by @janosh in https://github.com/materialsp…
LobsterMatrices calculated incorrectly by @naik-aakash in https://github.com/materialsproject/pymatgen/pull/3407test_relax_chgnet by @janosh in https://github.com/materialsproject/pymatgen/pull/3417Species with matching Element in Composition.__getitem__ by @janosh in https://github.com/materialsproject/pymatgen/pull/3427BSPlotterProjected.get_elt_projected_plots by @janosh in https://github.com/materialsproject/pymatgen/pull/3451Atoms.cluster_from_file() in io.feff.inputs giving wrong number of atoms by @kaifengZheng in https://github.com/materialsproject/pymatgen/pull/3426bader is run without the AECCARs by @janosh in https://github.com/materialsproject/pymatgen/pull/3458LobsterMatrices parser to lobster.io.outputs by @naik-aakash in https://github.com/materialsproject/pymatgen/pull/3361SymmetrizedStructure() by @stefsmeets in https://github.com/materialsproject/pymatgen/pull/3423summary_stats key to Vasprun.potcar_spec by @esoteric-ephemera in https://github.com/materialsproject/pymatgen/pull/3434CifParser.get_structures() in favor of new parse_structures in which primitive defaults to False by @janosh in https://github.com/materialsproject/pymatgen/pull/3419Poscar.from_file() check_for_POTCAR to check_for_potcar by @janosh in https://github.com/materialsproject/pymatgen/pull/3406black for ruff format by @janosh in https://github.com/materialsproject/pymatgen/pull/3420pymatgen/core/__init__.py where no risk of circular imports by @janosh in https://github.com/materialsproject/pymatgen/pull/3461from_(str|file) (static->class)methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3429Remove deprecated module pymatgen/util/convergence.py by @janosh in
setup.py find_namespace_packages and add test_egg_sources_txt_is_complete by @janosh in https://github.com/materialsproject/pymatgen/pull/3374release.yml add option to publish to TestPyPI by @janosh in https://github.com/materialsproject/pymatgen/pull/3375get_band_(skewness|kurtosis) doc string by @janosh in https://github.com/materialsproject/pymatgen/pull/3383MatPESStaticSet.yaml set LMAXMIX: 6 by @janosh in https://github.com/materialsproject/pymatgen/pull/3400OBAlign(includeH=False, symmetry=False) can't take keywords by @janosh in https://github.com/materialsproject/pymatgen/pull/3403NcICOBILIST.lobster files by @QuantumChemist in https://github.com/materialsproject/pymatgen/pull/2878inplace: bool=True arg to Structure.apply_strain() by @janosh in https://github.com/materialsproject/pymatgen/pull/3376Structure.to_(conventional|primitive|cell) methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3384SiteCollection.to_ase_atoms() by @janosh in https://github.com/materialsproject/pymatgen/pull/3389mode: Literal["w", "a", "wt", "at"] = "w" keyword to CifWriter.write_file() by @janosh in https://github.com/materialsproject/pymatgen/pull/3399docs/fetch_pmg_contributors.py script by @janosh in https://github.com/materialsproject/pymatgen/pull/3387FURB violations by @janosh in https://github.com/materialsproject/pymatgen/pull/3382pymatgen/util/convergence.py by @janosh in https://github.com/materialsproject/pymatgen/pull/3388pylint: disable comments by @janosh in https://github.com/materialsproject/pymatgen/pull/3390ruff N806 by @janosh in https://github.com/materialsproject/pymatgen/pull/3394incar_parameters.json to allow ISIF=8 by @matthewkuner in https://github.com/materialsproject/pymatgen/pull/3381test_potcar_summary_stats() by @janosh in https://github.com/materialsproject/pymatgen/pull/3395MPScanRelaxSet.test_kspacing edge case coverage by @janosh in https://github.com/materialsproject/pymatgen/pull/3396FiestaInput keywords and class attributes by @janosh in https://github.com/materialsproject/pymatgen/pull/3386Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.10.4...v2023.10.11
<!-- Release notes generated using configuration in .github/release.yml at v2023.10.4 -->
<!-- Release notes generated using configuration in .github/release.yml at v2023.10.4 -->
potcar_summary_stats.json.gz in setup.package_data by @janosh in https://github.com/materialsproject/pymatgen/pull/3372Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.10.3...v2023.10.4
potcar_summary_stats.json.gz in setup.package_data by @janosh in https://github.com/materialsproject/pymatgen/pull/3372Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.10.3...v2023.10.4
<!-- Release notes generated using configuration in .github/release.yml at v2023.10.3 -->
<!-- Release notes generated using configuration in .github/release.yml at v2023.10.3 -->
openbabel.OBAlign() in molecule_matcher.py to use positional args for includeH, symmetry by @janosh in https://github.com/materialsproject/pymatgen/pull/3353TestMPResterNewBasic + AseAtomsAdaptor test errors and TransformedStructure.from_snl overwriting hist variable by @janosh in https://github.com/materialsproject/pymatgen/pull/3362TypeError: can only join an iterable with AECCAR in VolumetricData.write_file by @chiang-yuan in https://github.com/materialsproject/pymatgen/pull/3343jsanitize in Atoms <--> Structure object interconversion by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3359.to_file() for .to() method of structures and molecules by @QuantumChemist in https://github.com/materialsproject/pymatgen/pull/3356dev_script utils for future updates by @esoteric-ephemera in https://github.com/materialsproject/pymatgen/pull/3370Targe(tt->t)edPenaltiedAbundanceChemenvStrategy by @janosh in https://github.com/materialsproject/pymatgen/pull/3360numpy to v1.25.0 by @janosh in https://github.com/materialsproject/pymatgen/pull/3352Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.9.25...v2023.10.3
Fix breaking change to CoherentInterfaceBuilder.get_interfaces by @janosh in https://github.com/materialsproject/pymatgen/pull/3337
<!-- Release notes generated using configuration in .github/release.yml at v2023.9.25 -->
MPSOCSet raising ValueError on structure=None by @janosh in https://github.com/materialsproject/pymatgen/pull/3310AttributeError in BSPlotter.get_plot() by @janosh in https://github.com/materialsproject/pymatgen/pull/3327ax = fig.add_subplot(projection='3d') to create Axes3D by @janosh in https://github.com/materialsproject/pymatgen/pull/3330CoherentInterfaceBuilder.get_interfaces by @janosh in https://github.com/materialsproject/pymatgen/pull/3337properties @property/docstring to IStructure by @mkhorton in https://github.com/materialsproject/pymatgen/pull/3338Composition.oxi_state_guesses() of diatomic molecules by @janosh in https://github.com/materialsproject/pymatgen/pull/3332TestMITMPRelaxSet.test_nelect claimed to but wasn't testing disordered structure by @janosh in https://github.com/materialsproject/pymatgen/pull/3344calculate_ng with a custom ENCUT and PREC values for VASP input sets by @matthewkuner in https://github.com/materialsproject/pymatgen/pull/3314TestPotcar.test_write polluting git repo on failure by @janosh in https://github.com/materialsproject/pymatgen/pull/3347get_ax3d_fig_plt->get_ax3d_fig and get_ax_fig_plt->get_ax_fig plus no longer return plt by @janosh in https://github.com/materialsproject/pymatgen/pull/3329SymmOp.from_xyz_string and MagSymmOp.from_xyzt_string deprecation warnings by @janosh in https://github.com/materialsproject/pymatgen/pull/3315ruff A001 violations: Variable is shadowing a Python builtin by @janosh in https://github.com/materialsproject/pymatgen/pull/3331pymatgen.util.num by @janosh in https://github.com/materialsproject/pymatgen/pull/3333Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.9.10...v2023.9.25
Fix code comment in ASE adapter by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3298
Kpoints.automatic_density_by_lengths by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3299setup.py and bump monty in requirements.txt by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3303py.typed to package root by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3307setup->setUp across test classes by @janosh in https://github.com/materialsproject/pymatgen/pull/3305Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.9.2...v2023.9.10
Kpoints.automatic_density_by_lengths by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3299setup.py and bump monty in requirements.txt by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3303py.typed to package root by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3307setup->setUp across test classes by @janosh in https://github.com/materialsproject/pymatgen/pull/3305Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.9.2...v2023.9.10
Kpoints.automatic_density_by_lengths by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3299setup.py and bump monty in requirements.txt by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3303py.typed to package root by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3307setup->setUp across test classes by @janosh in https://github.com/materialsproject/pymatgen/pull/3305Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.9.2...v2023.9.10
Breaking: remove deprecated keyword properties from Species by @janosh in https://github.com/materialsproject/pymatgen/pull/3243
Lattice property params_dict by @janosh in https://github.com/materialsproject/pymatgen/pull/3239test_from_boundary_distance by @janosh in https://github.com/materialsproject/pymatgen/pull/3242properties from Species by @janosh in https://github.com/materialsproject/pymatgen/pull/3243Vasprun.converged_electronic check if ALGO=CHI in INCAR by @janosh in https://github.com/materialsproject/pymatgen/pull/3250plt.Axes object, not matplotlib module by @janosh in https://github.com/materialsproject/pymatgen/pull/3237ruff D212 by @janosh in https://github.com/materialsproject/pymatgen/pull/3251mag from OSZICAR by @chiang-yuan in https://github.com/materialsproject/pymatgen/pull/3146numpy.testing.assert_allclose over assert np.allclose by @janosh in https://github.com/materialsproject/pymatgen/pull/3253pymatgen repo by @janosh in https://github.com/materialsproject/pymatgen/pull/3255compatibility.md by @mbercx in https://github.com/materialsproject/pymatgen/pull/3260check_occu: bool = True to CifParser.get_structures() by @jonathanjdenney in https://github.com/materialsproject/pymatgen/pull/2836Procar.get_projection_on_elements for structures with multiple same-element ionic sites by @Na-Kawa in https://github.com/materialsproject/pymatgen/pull/3261TestMPScanStaticSet.test_as_from_dict() by @janosh in https://github.com/materialsproject/pymatgen/pull/3266TestMPStaticSet using MPRelaxSet in test_user_incar_kspacing and test_kspacing_override by @janosh in https://github.com/materialsproject/pymatgen/pull/3268nelectrons not updating when replacing species in Molecule by @janosh in https://github.com/materialsproject/pymatgen/pull/3269properties to Structure and Molecule by @gpetretto in https://github.com/materialsproject/pymatgen/pull/3264CifParser.get_structures(check_occu=False) by @janosh in https://github.com/materialsproject/pymatgen/pull/3272PotcarSingle.__repr__ by @janosh in https://github.com/materialsproject/pymatgen/pull/3273__str__ to __repr__ by @janosh in https://github.com/materialsproject/pymatgen/pull/3274MatPESStaticSet by @SophiaRuan in https://github.com/materialsproject/pymatgen/pull/3254test_valid_magmom_struct() error message regex by @janosh in https://github.com/materialsproject/pymatgen/pull/3276AseAtomsAdaptor to handle Structure.properties/Molecule.properties by @Andrew-S-Rosen in https://github.com/materialsproject/pymatgen/pull/3270bandgap_tol: float = 1e-4 to MPScanRelaxSet by @janosh in https://github.com/materialsproject/pymatgen/pull/3287np.(arange->linspace) in io/vasp/optics.py get_delta, get_setp and epsilon_imag by @LucasGVerga in https://github.com/materialsproject/pymatgen/pull/3286from/as_..._string methods by @janosh in https://github.com/materialsproject/pymatgen/pull/3295Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.8.10...v2023.9.2
Deprecate get_string() methods in favor of get_str() by @janosh in https://github.com/materialsproject/pymatgen/pull/3231
estimate_nbands function by @matthewkuner in https://github.com/materialsproject/pymatgen/pull/3149CifParser.get_structures(on_error='warn') by @janosh in https://github.com/materialsproject/pymatgen/pull/3175ruff . --fix by @janosh in https://github.com/materialsproject/pymatgen/pull/3176AseAtomsAdaptor: Retain tags property when interconverting Atoms and Structure/Molecule by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3151from_string should be classmethod by @njzjz in https://github.com/materialsproject/pymatgen/pull/3177pymatviz interactive plotly version of periodic table heatmap if available by @janosh in https://github.com/materialsproject/pymatgen/pull/3180repr by @janosh in https://github.com/materialsproject/pymatgen/pull/3182Element in Composition if Species.symbol matches Element by @janosh in https://github.com/materialsproject/pymatgen/pull/3184LMAXMIX "fix" added in #3041 by @janosh in https://github.com/materialsproject/pymatgen/pull/3189bader_exe_path keyword to BaderAnalysis and run bader tests in CI by @janosh in https://github.com/materialsproject/pymatgen/pull/3191packmol tests by @janosh in https://github.com/materialsproject/pymatgen/pull/3195Structure tests by @janosh in https://github.com/materialsproject/pymatgen/pull/3197class XYZ edge cases by @janosh in https://github.com/materialsproject/pymatgen/pull/3206EnergyAdjustment.__repr__ by @janosh in https://github.com/materialsproject/pymatgen/pull/3207pytest-split durations by @janosh in https://github.com/materialsproject/pymatgen/pull/3211automatic_density_by_lengths and add tests for it by @janosh in https://github.com/materialsproject/pymatgen/pull/3218len(structure) over structure.num_sites by @janosh in https://github.com/materialsproject/pymatgen/pull/3219PhaseDiagram method get_reference_energy by @janosh in https://github.com/materialsproject/pymatgen/pull/3222Structure.elements property by @janosh in https://github.com/materialsproject/pymatgen/pull/3223in_place: bool = True to SiteCollection.replace_species by @janosh in https://github.com/materialsproject/pymatgen/pull/3224BVAnalyzer.get_valences error message by @janosh in https://github.com/materialsproject/pymatgen/pull/3225Entry.elements property by @janosh in https://github.com/materialsproject/pymatgen/pull/3226PymatgenTest.TEST_FILES_DIR attribute into module scope by @janosh in https://github.com/materialsproject/pymatgen/pull/3227os.path.join(...) by @janosh in https://github.com/materialsproject/pymatgen/pull/3229bader_caller and chargemol_caller by @chiang-yuan in https://github.com/materialsproject/pymatgen/pull/3192ruff PYI041 and ignore PYI024 by @janosh in https://github.com/materialsproject/pymatgen/pull/3232get_string() methods in favor of get_str() by @janosh in https://github.com/materialsproject/pymatgen/pull/3231Structure/Molecule.to() now always return same string written to file by @janosh in https://github.com/materialsproject/pymatgen/pull/3236Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.7.20...v2023.8.10
Unreadable string concat ops to f-string by @janosh in https://github.com/materialsproject/pymatgen/pull/3162
mp-api<0.34.0 pin by @janosh in https://github.com/materialsproject/pymatgen/pull/3165"pdentries_test.csv" not found by @janosh in https://github.com/materialsproject/pymatgen/pull/3168Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.7.17...v2023.7.20
Deprecate from_string by @janosh in https://github.com/materialsproject/pymatgen/pull/3158
MagOrderingTransformation by enforcing implicit-zero magnetic moments in SpaceGroupAnalyzer by @mattmcdermott in https://github.com/materialsproject/pymatgen/pull/3070CollinearMagneticAnalyzer should not fail when Species.spin = None by @mattmcdermott in https://github.com/materialsproject/pymatgen/pull/3157from_string by @janosh in https://github.com/materialsproject/pymatgen/pull/3158Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.7.14...v2023.7.17
MagneticStructureEnumerator failing. This is apparently due to
creating structures where only some Species.spin properties are defined, causing
CollinearMagneticStructureEnumerator` to fail.SpaceGroupAnalyzer. This was encountered when
performing magnetic ordering enumeration, as the previous default behavior for MagOrderingTransformation does not implicitly yield spins of 0 on the nonmagnetic sites. This has now
been fixed.Don't waste pytest.approx() function calls on integers by @janosh in https://github.com/materialsproject/pymatgen/pull/3150
pytest.approx() function calls on integers by @janosh in https://github.com/materialsproject/pymatgen/pull/3150check_potcar: bool = True to MaterialsProject2020Compatibility, MaterialsProjectDFTMixingScheme and PotcarCorrection by @janosh in https://github.com/materialsproject/pymatgen/pull/3143PMG_DISABLE_POTCAR_CHECKS to PMG_POTCAR_CHECKS by @janosh in https://github.com/materialsproject/pymatgen/pull/3153Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.7.11...v2023.7.14
PMG_POTCAR_CHECKS provides means to disable all POTCAR checking.Deprecate pymatgen.util.convergence by @janosh in https://github.com/materialsproject/pymatgen/pull/3123
SpaceGroup.__repr__ by @janosh in https://github.com/materialsproject/pymatgen/pull/3122pymatgen.util.convergence by @janosh in https://github.com/materialsproject/pymatgen/pull/3123pymatgen.io.openmm package to addons.rst by @orionarcher in https://github.com/materialsproject/pymatgen/pull/3124warnings.catch_warnings(record=True) to pytest.warns() by @janosh in https://github.com/materialsproject/pymatgen/pull/3125ruff + fix PERF402 violations by @janosh in https://github.com/materialsproject/pymatgen/pull/3129ruff PT011 by @janosh in https://github.com/materialsproject/pymatgen/pull/3133analysis/graphs.py using dict.pop() by @janosh in https://github.com/materialsproject/pymatgen/pull/3139[SomeCode]ParserError to [SomeCode]ParseError and inherit from SyntaxError by @janosh in https://github.com/materialsproject/pymatgen/pull/3140Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.6.28...v2023.7.11
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 su…
SQSTransformation initDictSet class.find_points_in_spheres, getting ~5x faster runtime.We're pleased to ship the latest and greatest Pymatgen v2023.06.23 today! 🎉 👨💻 🌮
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 https://github.com/materialsproject/pymatgen/pull/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
DictSet to allow direct initialization by @kavanase in https://github.com/materialsproject/pymatgen/pull/3031bandgap==0 check in the r2SCAN workflow by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3036PDPlotter: unary plots, 2D ternaries, better defaults, and highlight entries by @mattmcdermott in https://github.com/materialsproject/pymatgen/pull/3032DictSet by @janosh in https://github.com/materialsproject/pymatgen/pull/3035dict["key"] if "key" in dict else None to dict.get("key") by @janosh in https://github.com/materialsproject/pymatgen/pull/3038IcohpValue.__str__ don't return None by @janosh in https://github.com/materialsproject/pymatgen/pull/3052PourbaixDiagram wrong composition bug fix by @montoyjh in https://github.com/materialsproject/pymatgen/pull/3053(Structure|Molecule).calculate() + Molecule.relax(), improve Structure.relax() by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3044Molecule.relax() tests by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3060ValueError: Unexpected atomic number Z=0 by @janosh in https://github.com/materialsproject/pymatgen/pull/3066tmp_path fixture (replaces ScratchDir) by @janosh in https://github.com/materialsproject/pymatgen/pull/3067AseAtomsAdaptor: Ensure Molecule.charge and Molecule.spin_multiplicity aren't lost upon interconversion by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3056None assignment by @janosh in https://github.com/materialsproject/pymatgen/pull/3074Composition bad key error type from TypeError to KeyError by @janosh in https://github.com/materialsproject/pymatgen/pull/3075ase tests not running due to pymatgen/io/ase.py shadowing ase package by @janosh in https://github.com/materialsproject/pymatgen/pull/3077AseAtomsAdaptor dictionary key ordering by @arosen93 in https://github.com/materialsproject/pymatgen/pull/3076test_apply_scissor_(insulator|spin_polarized) by @janosh in https://github.com/materialsproject/pymatgen/pull/3082DosPlotterTest.test_get_plot_limits() assert floats equal not using approx by @janosh in https://github.com/materialsproject/pymatgen/pull/3089pytest.raises() by @janosh in https://github.com/materialsproject/pymatgen/pull/3091ValueError when parsing vasprun.xml with only some atom force constants by @janosh in https://github.com/materialsproject/pymatgen/pull/3092test_babel_pc_with_ro_depth_0_vs_depth_10 by @janosh in https://github.com/materialsproject/pymatgen/pull/3093hashlib.md5(usedforsecurity=False) when computing POTCAR hashes by @janosh in https://github.com/materialsproject/pymatgen/pull/3094get_zmatrix from GaussianInput to Molecule by @JaGeo in https://github.com/materialsproject/pymatgen/pull/3095Full Changelog: https://github.com/materialsproject/pymatgen/compare/v2023.05.31...v2023.06.23
SQSTransformation initDictSet class, which was possible before but broke in https://github.com/materialsproject/pymatgen/pull/2972 due to the Yb_2 check querying self.CONFIG, which is only defined if DictSet was being initialised from a subclass and not directly.find_points_in_spheres, getting ~5x faster runtime.Your coding agent can read these notes before it upgrades. Set up the MCP server →