Skip to content

mpr.materials.elasticity.search() does not return all results #932

@fxcoudert

Description

@fxcoudert

Python version

Python 3.10.14

Pymatgen version

2024.8.9

Operating system version

macOS 14

Current behavior

data = mpr.materials.elasticity.search(fields=["material_id", "formula_pretty", "structure", "elastic_tensor"])
print("Number of materials retrieved:", len(data))

You can see that it expects 12392 results (in line with what the website shows, roughly) but only downloads 10733.

Capture d’écran 2024-09-11 à 15 24 30

Expected Behavior

The search should download all available records.

Minimal example

from pymatgen.ext.matproj import MPRester
mpr = MPRester(mpapikey)
data = mpr.materials.elasticity.search(fields=["material_id", "formula_pretty", "structure", "elastic_tensor"])
print("Number of materials retrieved:", len(data))

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions