Releases: materialsproject/pymatgen
Releases · materialsproject/pymatgen
v2025.10.7
- PR #4502 Fix: indexing error in Procar._read() by @finnrk
Major changes:- Fixes a bug related to indices when skipping repeated k-points while reading
PROCAR(for example, the double-counting of symmetry points when using a k-path for plotting bandstructure).
Previously, projections, eigenvalues, occupations and weights would be attributed to the wrong k-points. Also, the k-point following the skipped k-point would have complex projections of NaN, as well as an occupation, weight, eigenvalue and squared projections of 0.
- Fixes a bug related to indices when skipping repeated k-points while reading
- PR #4503 Replace
printwith logging by @DanielYang59- replace
printwith logging, I assume pymatgen as a lib code shouldn't use print... - remove some print from tests
- replace
- PR #4510 suppress runtime warning from boltztrap2 by @DanielYang59
close #2317 - PR #4512 Fix missing sdist from PyPI by @DanielYang59
fix #4509
tested in my fork: https://github.com/DanielYang59/pymatgen/actions/runs/18279908313/job/52040659228 - PR #4491 Deprecate
projected_magnetisationwithprojected_magnetization(US spelling) by @DanielYang59
fix #4382 - PR #4493
Composition.get_wt_fractionreturn float instead ofFloatWithUnitby @DanielYang59
fix #4492 - PR #4496 Overwrite
__rtruediv__forFloatWithUnit, fixArrayWithUnitlosesunit_typewhen unpickled by @DanielYang59- fix #4495
- Check
ArrayWithUnitbehaviour - Fix unpickle
ArrayWithUnitlosesunit_type - Add some tests for
core.units, https://app.codecov.io/gh/materialsproject/pymatgen/blob/master/pymatgen%2Fcore%2Funits.py
- PR #4490 Replace
linear_assignmentwithscipylinear_sum_assignmentby @DanielYang59- Replace
linear_assignmentwithscipylinear_sum_assignment - Speed benchmark
Benchmark
WSL2 Ubuntu 24.04 (AMD64)
Master branch:Current branch: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.327349n | 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 - Replace
- PR #4440
JDFTXOutfileSlice.vibrational_modesandJDFTXOutfileSlice.vibrational_energy_componentsby @benrich37
Major changes:- feature 1: Parsing and storage of vibrational modes within a
JDFTXOutfileSlice
-- Stored as alist[dict], where eachdictcontains
--- "Type":str
---- either"Imaginary","Zero", or"Real"
--- "Type index":int
---- (Base 1) index of the mode among other modes of the same frequency type
--- "Degeneracy":int
---- Degeneracy of the mode (ie ifmode["Degeneracy"] == 2, than there is one other mode in the list with the same frequency)
--- "Frequency":float|complex
---- Frequency of the vibration in eV
--- "IR intensity":float
---- IR intensity of the vibrational mode in e^2/amu as derived from dipole of the vibration
--- "Displacements":NDArray[float]
---- Displacement vector representing the vibrational mode (converted from Bohr to Angstrom as magnitude of vector is a input variable for vibrational analysis in JDFTx)
-- Testing for vibrational mode parsing - feature 2: Parsing and storage of vibration energy components within a
JDFTXOutfileSlice
-- Stored as adict[str, float], containing
--- "T" : Temperature at which free energy was evaluated (in K)
--- Dumped free energy components in eV
-- Testing for vibrational energy components parsing
- feature 1: Parsing and storage of vibrational modes within a
- PR #4487 Fix TranslateSitesTransformation by @Rastow
There was a bug in theTranslateSitesTransformationclass. Both index variables inapply_transformationare 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. - PR #4447 Fix
has_cobicarwhen NcICOBILIST is present by @tomdemeyere
WhenicobiBetweenis activated lobster prints out theNcICOBILIST.lobsterfile. In the lobster output we find "Writing COBICAR.lobster, ICOBILIST.lobster and NcICOBILIST.lobster..." instead of the regular line. The current parser then returnsFalseeven if the COBICAR.lobster is present.
Also, it seems thathas_cohpcarandhas_coopcarare flipped?
Switching to a regex approach on the whole files (not\nsplit) would allow much greater flexbility, performance and robustness.
@JaGeo @naik-aakash- Google format doc strings added. Check with
ruff. - Type annotations included. Check with
mypy. - Tests added for new features/fixes.
- If applicable, new classes/functions/modules have
duecredit@due.dcitedecorators to reference relevant papers by DOI (example)
Tip: Installpre-commithooks to auto-check types and linting before every commit:
pip install -U pre-commit pre-commit install
- Google format doc strings added. Check with
- PR #4469 Loosen
requestslower pin, fixpre-commiterrors by @DanielYang59Summary
- Loosen
requestsupper pin, current pin seems too strict and might cause unresolvable dependency - Fix a few deprecation warnings
- Fix some new
rufferrors frompre-commit
- Loosen
- PR #4479 Move JDFTx sets from atomate2 to pymatgen by @cote3804
Following a request by @utf in an atomate2 PR, I am moving our input set from atomate2 to pymatgen.
This PR adds asets.pyfile 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 pymatgenStructureinstead of aJDFTXStructure.
A yaml defining the base input set,BaseJdftxSet.yamlwas also moved from atomate2.
I added two basic tests to check that both loading from an input file and from aJdftxInfileare working and that the file written by the input set yields the expectedJdftxInfile. - PR #4484 Fix jdftx.outputs usage of 3.11+ only syntax by @DanielYang59
Fix the following 3.11+ only syntax: - PR #4473 Fix label in
NEBAnalysisby @DanielYang59 To close #4465- Incorrect label (and value)
-
globnow 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#L261 - Deprecate
spline_optionsdict with boolean flagzero_slope_saddleas there's only one boolean config available: https://github.com/materialsproject/pymatgen/blob/f01009c390a3df02d4d45b8f0225cf59305ee7bf/src/pymatgen/analysis/transition_state.py#L70
- PR #4260 Use external Package for FHI-aims IO interface by @tpurcell90
Major changes:- moved FHI-aims specific content into a separate package (pyfhiaims) for ease of maintenance (stop multiple libraries from implementing the same basic interface)
Todos
If this is work in progress, what else needs to be done?- Workout how to best test the aims io interface/dependency tracker
- check with community this does not break their setups
- PR #4476 patch ReDOS vulnerability in GaussianInput.from_string by @lbluque
Major changes:- Patches ReDOS vulnerability mentioned in #2755
- PR #4448 Remove LOBSTER output file trailing line sensitivity by @DanielYang59
- Remove LOBSTER output file trailing line sensitivity, fix #4215
str.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 - Remove LOBSTER output file trailing line sensitivity, fix #4215
- PR #4454 Fix unit for
Elementproperties:density_of_solidandMolar volumeby @DanielYang59Summary
- Remove unit in docstring for
Elementproperties, to close #4453 - Check other units in docstring
- Remove unit in docstring for
- PR #4461 Handle numpy array for selective dynamics in
Structureby @DanielYang59Summary
- Handle numpy array for selective dynamics in
Structure, to fix #4460 - Double check consistent behaviour from
jsonandorjson, also check round trip? - Unit test
- Handle numpy array for selective dynamics in
- PR #4464 Update analyzer.py by @boyoungzheng
Missing a letter "s" forsite.speciesin pymatgen.symmetry.analyser.SpacegroupAnalyzer.get_primitive_standard_structure()
Major changes:- feature 0:
- fix 1: Missing a letter "s" for
site.speciesin pymatgen.symmetry.analyser.SpacegroupAnalyzer.get_primitive_standard_structure()
- PR #4446 Efficiency updates for
__str__()methods by @kavanase
Small change to improve the efficiency ofSpecies.__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 indoped).
Improves efficiency by reducing redundantgetattrcalls. - PR #4438 Add basic S3 object retrieval to the pymatgen user agent by @esoteric-ephemera
The MP API has changed to accommodate incre...
v2025.6.14
- Treat LATTICE_CONSTRAINTS as is for INCARs.
- PR #4425
JDFTXOutfileSlice.trajectoryrevision by @benrich37
Major changes:- feature 1:
JDFTXOutfileSlice.trajectoryis now initialized withframe_propertiesset
--JOutStructure.propertiesfilled with relevant data forframe_properties
-- More properties added toJOutStructure.site_properties
Todos
- Remove class attributes in
JOutStructurenow redundant to data stored inJOutStructure.propertiesandJOutStructure.site_properties
- feature 1:
- PR #4431 Single source of truth for POTCAR directory structure by @esoteric-ephemera
Modifies the pymatgen CLI to use the same POTCAR library directory structure as inpymatgen.io.vasp.inputsto close #4430. Possibly breaking from the CLI side (the directory structure will change)
Pinging @mkhorton since #4424 was probably motivated by similar concerns? - PR #4433 Speed up symmetry functions with faster
is_periodic_imagealgorithm by @kavanase
I noticed that in some of ourdopedtesting 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 ofis_periodic_image, which can be expensive for large structures due to manynp.allclose()calls.
This PR implements a small change to instead use an equivalent (but faster) pure Python loop, which also breaks early if the tolerance is exceeded.
In my test case, this reduced the time spent onis_periodic_image(and thusSpacegroupAnalyzer.get_primitive_standard_structure()) from 35s to 10s. - PR #4432 Fingerprint sources by @JaGeo
Add correct papers to tanimoto fingerprints - PR #4061 Fix branch directory check in
io.vasp.outputs.get_band_structure_from_vasp_multiple_branchesby @DanielYang59Summary
- Fix branch directory check in
io.vasp.outputs.get_band_structure_from_vasp_multiple_branches, to fix #4060 - Improve unit test (waiting for data, I don't have experience with "VASP multi-branch bandstructure calculation")
- Fix branch directory check in
- PR #4409 Packmol constraints by @davidwaroquiers
Added possibility to set individual constraints in packmol.
Added some sanity checks.
Added unit tests. - PR #4428 Fixes a bug in
NanoscaleStability.plot_one_stability_mapandplot_all_stability_map. by @kmu
Major changes:- Replaced incorrect
ax.xlabel()andax.ylabel()calls with correctax.set_xlabel()andax.set_ylabel(). - Added
ax.legend()toplot_all_stability_mapso that labels passed viaax.plot(..., label=...)are displayed. - Added
test_plot()totest_surface_analysis.py.
- Replaced incorrect
- PR #4424 Add additional name mappings for new LDA v64 potcars by @mkhorton
As title. - PR #4426 Fix uncertainty as int for
EnergyAdjustmentby @DanielYang59- Avoid
==or!=for possible float comparison - Fix uncertainty as int for
EnergyAdjustmentcannot generate repr:
Gives: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 - Avoid
- PR #4421 Cache
Latticeproperty (lengths/angles/volume) for much fasterStructure.as_dictby @DanielYang59Summary
lengths/angles/volumeofLatticewould now be cached, related to #4385verbosityinas_dictofPeriodicSite/Latticenow explicitly requires literal 0 or 1 to be consistent with docstring, instead of checkingif verbosity > 0(currently in grace period, only warning issued) https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/lattice.py#L904-L905
Cache frequently used
CurrentlyLatticepropertieslength/angles/volumeis not cached and is frequently used, for example accessing all lattice parameter related property would lead tolength/anglesbeing repeatedly calculated: https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/lattice.py#L475-L524
structure.as_dictnow around 8x faster
Before (1000 structure, each has 10-100 atoms):Now:Total 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))
Also notelattice(the performance bottleneck) is not used in the dict for site: https://github.com/materialsproject/pymatgen/blob/34608d0b92166e5fc4a9dd52ed465ae7dccfa525/src/pymatgen/core/structure.py#L2856-L2857
So we could modifyas_dictto control whether lattice would be generated at all
This could reduce the runtime slightly so I guess it's not worth the effort:Total time: 0.867376 s - PR #4391 Add custom as_dict/from_dict method for proper initialization of attributes of IcohpCollection by @naik-aakash
CurrentlyIcohpCollectioninstance is not serialized correctly, thus I added custom from_dict and as_dict methods here.
v2025.5.28
- PR #4411 Add
orjsonas required dependency as default JSON handler when custom encoder/decoder is not needed by @DanielYang59 - PR #4417 adding radd dunder method to Volumetric data + test_outputs by @wladerer
- PR #4418
JDFTXOutfileSliceDurability Improvement by @benrich37
Major changes:- feature 1: Improved durability of
JDFTXOutfileSlice._from_out_slicemethod (less likely to error out on unexpected termination)
-- So long as one step of electronic minimization has started on an out file slice, parsing shouldn't error out - fix 1: Allow partially dumped eigstats
- fix 2: Added missing optical band gap dumped by eigstats
- fix 3: Protect the final
JOutStructurein initializing aJOutStructureswith a try/except block - fix 4: Detect if positions were only partially dumped and revert to data from
init_structureinJOutStructure - fix 5: Prevent partially dumped matrices from being used in initializing a
JOutStructure
Todos
- feature 1: Ensure parse-ability as long as a
JDFTXOutfileSlice.infilecan be initialized
- feature 1: Improved durability of
- PR #4419 Fix Molecule.get_boxed_structure when reorder=False by @gpetretto
- PR #4416
JDFTXInfileComparison Methods by @benrich37
Major changes:- feature 1: Convenience methods for comparing
JDFTXInfileobjects
--JDFTXInfile.is_comparable_to
--- Returns True if at least one tag is found different
--- Optional argumentsexclude_tags,exclude_tag_categories,ensure_include_tagsto ignore certain tags in the comparison
----exclude_tag_categoriesdefaults 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_tags
--- What is used inJDFTXInfile.is_comparable_toto get filtered differing tags betweenJDFTXInfileobjects
--- Convenient as a "verbose" alternative toJDFTXInfile.is_comparable_to
--AbstractTag.is_equal_toandAbstractTag._is_equal_to
--- Used in tag comparison for finding differing tags
---AbstractTag._is_equal_tois an abstract method that must be implemented for eachAbstractTaginheritor - feature 2: Default
JDFTXInfileobjectpymatgen.io.jdftx.inputs.ref_infile
-- Initialized from reading default JDFTx settings frompymatgen.io.jdftx.jdftxinfile_default_inputs.default_inputs: dict
-- Used inJDFTXInfile.get_differing_tags_fromfor tags inselfmissing fromotherthat are identical to the default setting - fix 1: Re-ordered contents of
JDFTXInfileto follow the order: magic methods -> class methods / transformation methods -> validation methods -> properties -> private methods - fix 2: Checking for
'selective_dynamics'insite_propertiesfor aStructurepassed inJDFTXInfile.from_structure(used ifselective_dynamicsargument left asNone)
Todos
- feature 1: Add examples to documentation on how to properly use new comparison methods
- feature 2: Improve the mapping of
TagContainers to their default values
-- The current implementation of comparison for tags to default values only works if the tag as written exactly matches the full default value - at the very least the missing subtags of a partially filledTagContainerneeds to be filled with the default values before comparing to the full default value
-- Some subtags also change depending on the other subtags present for a particular tag (ie convergence threshold depending on algorithm specified for'fluid-minimize', so an improved mapping for dynamic default values needs to be implemented
- feature 1: Convenience methods for comparing
- PR #4413
JDFTXOutputs.bandstructure: BandStructureby @benrich37
Major changes:- feature 1: Added 'kpts' storable variable to JDFTXOutputs
-- Currently only able to obtain from the 'bandProjections' file - feature 2: Added
bandstructureattribute to JDFTXOutputs
-- Standard pymatgenBandStrucureobject
-- Request-able as astore_var, but functions slightly differently
--- Ensures 'eigenvals' and 'kpts' are instore_varsand then is deleted
-- Initialized if JDFTXOutputs has successfully stored at least 'kpts' and 'eigenvals'
-- Fillsprojectionsfield if also has stored 'bandProjections' - feature 3: Added
wk_listtoJDFTXOutputs
-- List of weights for each k-point
-- Currently doesn't have a use, but will be helpful forElecDatainitializing incrawfish
Todos
- feature 1: Add reading 'kpts' from the standalone 'kPts' file dumped by JDFTx
- feature 2: Outline how we might initialize
BandStructureSymmLine(s) for calculations with explicitly defined 'kpoint' tags, as using 'kpoint's instead ofkpoint-foldingis most likely an indicator of a band-structure calculation
- feature 1: Added 'kpts' storable variable to JDFTXOutputs
- PR #4415 speed-up Structure instantiation by @danielzuegner
This PR speeds up the instantiation ofStructureobjects by preventing hash collisions in thelru_cacheofget_el_spand increasing itsmaxsize. The issue is that currentlyElementobjects are hashed to the same value as the integer atomic numbers (e.g.,Element[H]maps to the same hash asint(1)). This forces thelru_hashto perform an expensive__eq__comparison between the two, which reduces the performance of instantiating manyStructureobjects. Also here we increase themaxsizeofget_el_sp'slru_cacheto 1024 for further performance improvements.
This reduces time taken to instantiate 100,000Structureobjects from 31 seconds to 8.7s (avoid hash collisions) to 6.1s (also increasemaxsizeto 1024). - PR #4410 JDFTx Inputs - boundary value checking by @benrich37
Major changes:- feature 1: Revised boundary checking for input tags
-- Added avalidate_value_boundsmethod toAbstractTag, that by default always returnsTrue, ""
-- Added an alternateAbstractNumericTagthat inheritsAbstractTagto implementvalidate_value_boundsproperly
--- Changed boundary storing to the following fields
----ubandlb
----- Can either beNone, or some value to indicate an upper or lower bound
----ub_inclandlb_incl
----- If True, applies>=instead of>in comparative checks on upper and lower bounds
-- Switched inheritance ofFloatTagandIntTagfromAbstractTagtoAbstractNumericTag
-- Implementedvalidate_value_boundsforTagContainerto dispatch checking for contained subtags
-- Added a methodvalidate_boundariestoJDFTXInfileto runvalidate_value_boundson all contained tags and values
-- Addedvalidate_value_boundariesargument for initialization methods ofJDFTXInfile, which will runvalidate_boundariesafter initializingJDFTXInfilebut before returning when True
--- Note that this is explicitly disabled when initializing aJDFTXInfilefrom the input summary in aJDFTXOutfileSlice- 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 aJDFTXInfile, but out-of-bounds values must never be written when writing a file for passing to JDFTx.
Todos
- feature 1
-- Implement some way boundary checking can run when adding tags to a pre-existingJDFTXInfileobject
--- boundary checking is currently only run when initializing from a pre-existing collection of input tags
--- writing this intoJDFTXInfile.__setitem__is too extreme as it would require adding an attribute toJDFTXInfileto allow disabling the check
--- the better solution would be to implement a more obvious user-friendly method for reading in additional inputs so that the user doesn't need to learn how to properly write out the dictionary representation of complicated tag containers.
-- Fill out reference tags for other unimplemented boundaries
- feature 1: Revised boundary checking for input tags
- PR #4408
to_jdftxinfilemethod for JDFTXOutfile by @benrich37
Major changes:- feature 1: Method
to_jdftxinfilefor JDFTXOutfile(Slice)
-- Uses internalJDFTXInfileandStructureto create a newJDFTXInfileobject that can be ran to restart a calculation - feature 2: Method
strip_structure_tagsforJDFTXInfile
-- Strips all structural tags from aJDFTXInfilefor creating equivalentJDFTXInfileobjects with updated associated structures - fix 1: Changing 'nAlphaAdjustMax' shared tag from a
FloatTagto anIntTag - fix 2: Adding an optional
minvalfield for certainFloatTags which prevent writing error-raising values
-- Certain tag options in JDFTx can internally be the minimum value, but trying to pass the minimum value will raise an error
Todos
- feature 1: Testing for the
to_jdftxinfile
-- I know the function works from having used it, but I haven't written in an explicit test for it yet. - fix 2: Look through JDFTx source code and identify all the numeric tag value boundaries and add them to the FloatTag. This will likely require generalizing how boundaries are tested as a quick glance (see here) shows there are tags that actually do use the
>=operator - Unrelated: Reduce bloat in outputs module
-- Remove references to deprecated fields
-- Begin phasing out redundant fields
--- i.e.JDFTXOutfile.latticeredundant toJDFTXOutfile.structure.lattice.matrix
-- Generalize how optimization logs are stored in outputs module objects
--- Fields likegrad_Kare part of a broad group of values that can be logged for an optimization step, and...
- feature 1: Method
v2025.5.2
v2025.5.1
- lxml is now used for faster Vasprun parsing.
- Minor bug fix for MPRester.get_entries summary_data for larger queries.
- New JSON for ptable with better value/unit handling (also slightly faster) (@DanielYang59)
- Handle missing trailing newline in ICOHPLIST.lobster (@alibh95)
- Updated MVLSlabSet with MPSurfaceSet parameters from atomate1 (@abhardwaj73)
v2025.4.24
- Structure now has a calc_property method that enables one to get a wide range of elasticity, EOS, and phonon properties using matcalc. Requires matcalc to be
installed. - Bug fix and expansion of pymatgen.ext.matproj.MPRester. Now property_data is always consistent with the returned entry in get_entries. Summary data, which is not
always consistent but is more comprehensive, can be obtained via a summary_data kwarg. - PR #4378 Avoid merging if a structure has only one site by @kmu
This PR fixes an error that occurs when callingmerge_siteson a structure with only one site. For example: - PR #4372 Reapply update to ptable vdw radii CSV source and JSON with CRC handbook by @DanielYang59
- Update ptable vdw radii CSV source, to fix #4370
- Revert #4345 and apply changes to CSV
vdw radii data source:
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.
v2025.4.20
- Updated
perturbmethod to be in parity for Structure and Molecule. - PR #4226 Fix file existence check in ChargemolAnalysis to verify directory instead. by @lllangWV
- PR #4324 GibbsComputedStructureEntry update to handle float temperature values by @slee-lab
- PR #4303 Fix mcl kpoints by @dgaines2
Fixed errors in two of the k-points for the MCL reciprocal lattice (according to Table 16 in Setyawan-Curtarolo 2010)
M2 and D1 aren't included in the recommended k-point path, but third-party software that plots k-point paths using pymatgen labelled M2 in the path instead of M1 due to it being the "same" k-point. - PR #4344 Update "electron affinities" in
periodic_table.jsonby @DanielYang59 - PR #4365 Python 3.13 support by @DanielYang59
v2025.4.19
- MPRester.get_entries and get_entries_in_chemsys now supports property_data. inc_structure, conventional_only and
- PR #4367 fix perturb bug that displaced all atoms equally by @skasamatsu
- PR #4361 Replace
pybtexwithbibtexparserby @DanielYang59 - PR #4362 fix(MVLSlabSet): convert DIPOL vector to pure Python list before writing INCAR by @atulcthakur
- PR #4363 Ensure
actual_kpoints_weightsislist[float]and add test by @kavanase - PR #4345 Fix inconsistent "Van der waals radius" and "Metallic radius" in
core.periodic_table.jsonby @DanielYang59 - PR #4212 Deprecate
PymatgenTest, migrate tests topytestfromunittestby @DanielYang59
v2025.4.17
- Bug fix for list based searches in MPRester.
v2025.4.16
- 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's MPRester now
has nearly 100% feature parity with mp-api's document searches. One major difference is that pymatgen's MPRester will follow the documented REST API end points exactly, i.e., users just need to refer to https://api.materialsproject.org/docs for the exact field names. - PR #4360 Speed up
Vasprunparsing by @kavanase - PR #4343 Drop duplicate
iupac_orderingentries incore.periodic_table.jsonby @DanielYang59 - PR #4348 Remove deprecated grain boundary analysis by @DanielYang59
- PR #4357 Fix circular import of
SymmOpby @DanielYang59