Dear all,
After following the MP tutorials, I struggle to see if it is possible to query the database for molecules using the MPRester client? My first guess would be something like mp.summary.search(molecule_ids=[‘’]) but that didnt work. Inspecting the search method in summary.py doesn’t reveal anything about molecules either.
I am importing the wrong classes or is this not possbile?
Regards,
Jurn
mpr.molecules.search()
should give you access to what you need.
with MPRester(API_KEY) as mpr:
mpr.molecules.search(fields=['smiles','IE','EA'])
MPRestError: HTTPSConnectionPool(host='api.materialsproject.org', port=443):
Max retries exceeded with url: /molecules/core/?_limit=1000&_fields=smiles%2CIE%2CEA&_skip=113000
(Caused by ReadTimeoutError("HTTPSConnectionPool(host='api.materialsproject.org', port=443): Read timed out. (read timeout=20)"))
Hi @mario_Chiaparini, thank you for reporting this. We are working on fixing the timeout issue @munrojm. FYI, the mpr.molecules
is a brand new and much larger dataset released last Monday. The legacy dataset is accessible via mpr.molecules.jcesr
until fully incorporated with the new dataset.
@mario_Chiaparini, let me know if you are getting the same timeout issues with mpr.molecules.jcesr
. The data you are trying to access has moved there.
– Jason