Documentation on Github here
$ python3 -m pip install mofdb_client
from mofdb_client import fetch
# Fetch all mofs with void fraction >= 0.5 and <= 0.99
# Convert all isotherm loading units to mmol/g and all pressures to atmospheres
for mof in fetch(vf_min=0.5, vf_max=0.99, loading_unit="mmol/g", pressure_unit="atm"):
print(f"Mof {mof.name} has {len(mof.isotherms)} isotherms and elements {[str(e) for e in mof.elements]}")
print(f"This mof's cif file starts with: '{mof.cif.splitlines()[1]}'")
Mof hMOF-6 has 6 isotherms and elements ['Zn', 'O', 'C', 'H', 'F']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
Mof hMOF-0 has 6 isotherms and elements ['Zn', 'O', 'C', 'H']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
Mof hMOF-3 has 6 isotherms and elements ['Zn', 'O', 'C', 'H', 'F']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
Mof hMOF-9 has 6 isotherms and elements ['Zn', 'O', 'C', 'H', 'F']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
Mof hMOF-12 has 6 isotherms and elements ['Zn', 'O', 'C', 'H', 'F']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
Mof hMOF-15 has 6 isotherms and elements ['Zn', 'O', 'C', 'H', 'F']
This mof's cif file starts with: '_audit_creation_method 'MofGen! by Chris Wilmer''
...
This python package is at least 3x faster than using the paginated API and we HIGHLY recommend you use it. If the package doesn't fit your needs for some reason
You can see a full list of the units available here
Header | Values |
---|---|
loading | cm3(STP)/g, cm3(STP)/cm3, g/l, mg/g, mmol/g, mol/kg |
pressure | atm, bar, kPa, mbar, mmHg, MPa, Pa, psi, Torr |
Returns at most 200 MOFs per page
Param Name | Type | Example |
---|---|---|
page | integer | default is 1, if you want to see the next 200 results increment the page, (400 error if page # too lage) |
mofid | string | Returns exact mofid matches |
mofkey | string | Returns exact mofkey matches |
vf_min | float | |
vf_max | float | |
lcd_min | float | |
lcd_max | float | |
pld_min | float | |
pld_max | float | |
sa_m2g_min | float | |
sa_m2g_max | float | |
sa_m2cm3_min | float | |
sa_m2cm3_max | float | |
name | string | Matches any name starting with string supplied. Eg as a regex: /name.+/ |
database | enum | database: CoREMOF 2014, CoREMOF 2019, CSD, hMOF, IZA, PCOD-syn, Tobacco |
hashkey | string | (50 characters exactly) hash of the cif file. NOT a good unique id used only to help prevent duplicate uploads. See mofid/mofkey for a better primary key. |
gases | array | eg. mofs.json?gases[]=Nitrogen&gases[]=Carbon+Dioxide |
elements | array | You specify the query param as many times as elements you want to list: eg. mofs.json?elements[]=C&elements[]=Ar |
DOI | string | Any mof whose isotherm's mof whose doi EXACTLY matches the given string. If you want to download all of a database use the databases page instead of a doi search. (Matching strings is a slow operation!) |
cifs | boolean | ?cifs=true, Return a zip of the cifs satisfying the other params. When this is set results are not paginated. This can be quite slow for large #s of mofs. |
bulk | boolean | ?bulk=true, Return a zip file of the cifs + json representation of mofs. |
Returns at most 200 isotherms per page
Param Name | Type | Example |
---|---|---|
page | integer | default is 1, if you want to see the next 200 results increment the page, (400 error if page # too lage) |
mof_id | integer | ?mof_id=123 |
mof_hashkey | string | ?hashkey=123...abc (50 characters exactly) |
Returns a JSON array of strings for all FFs mofdb knows about. Eg:
[ { name: 'UFF', id: 1}, { name: 'TraPPE', id: 2}, { name: 'Michels-Degraaff-Tenseldam with Darkrim-Levesque partial charges', id: 3}, { name: 'Darkrim-Levesque', id: 4}, { name: 'Hirschfelder, Molecular Theory of Gases and Liquids & Talu, Colloids Surf., A, 2001, 187-188, 83-93', id: 5}, { name: 'Talu et al., Colloids Surf A 2001 187-188, 83', id: 6}, { name: 'TraPPE-zeo', id: 7}, { name: 'TraPPE-H2-3SM', id: 8}, { name: 'UFF (ε = 93.08 K and σ = 3.45 Å)', id: 9} ]
Returns a JSON array of classification objects for all classifications
[ { name: "cm3/cm3", type: "loading" }, { name: "kPA", type: "pressure" }, { name: "wt%", type: "other" }, ... ]
Returns a JSON array of the available databases and their mof counts
[ { name: 'CoREMOF 2014', mofs: 4764}, { name: 'CoREMOF 2019', mofs: 12020}, { name: 'CSD', mofs: 0}, { name: 'hMOF', mofs: 137953}, { name: 'IZA', mofs: 216}, { name: 'PCOD-syn', mofs: 70}, { name: 'Tobacco', mofs: 13511} ]
Mofdb downloads are tagged with a version to help ensure results are reproducable even after content in mofdb changes. Each version corresponds to a git commit in this repository If you want to get an old version of mofdb simply clone that repo
git clone https://github.com/snurr-group/mofdb-x-archive.git git checkout YOUR_VERSIONVersions can be found in each mof's json file under the
mofdb_version
property as well as in the file name
of all bulk downloads and database downloads.