In [1]:
from mdf_forge.forge import Forge
In [2]:
mdf = Forge()
In [3]:
mdf.match_source_names("oqmd")
Out[3]:
In [4]:
res = mdf.search(limit=10)
res[0]
Out[4]:
In [5]:
mdf.match_records("cip", [1003, 1006])
Out[5]:
In [6]:
res = mdf.search()
res[0]
Out[6]:
In [7]:
mdf.match_elements(["Al", "Cu"])
Out[7]:
In [8]:
res = mdf.search(limit=10)
res[0]
Out[8]:
In [9]:
mdf.match_resource_types("record")
Out[9]:
In [10]:
res = mdf.search(limit=10)
res[0]
Out[10]:
In [11]:
mdf.match_titles('"The Open Quantum Materials Database"')
Out[11]:
In [12]:
mdf.search()
Out[12]:
In [13]:
mdf.match_years(["2015", 2010])
Out[13]:
In [14]:
res = mdf.search(limit=10)
res[0]
Out[14]:
You can also specify a range of years.
In [15]:
mdf.match_years(start=2014, stop=2016, inclusive=True)
Out[15]:
In [16]:
res = mdf.search(limit=10)
res[0]
Out[16]:
In [17]:
# Organizations are currently migrating from the old "repositories" field, so some may not be set up correctly just yet.
# mdf.match_organizations(["NIST", "DOE"], match_all=False)
In [18]:
# res = mdf.search(limit=10)
# res[0]
In [19]:
mdf.match_dois("https://dx.doi.org/10.13011/M3B36G")
Out[19]:
In [20]:
res = mdf.search()
res[0]
Out[20]:
In [21]:
res = mdf.search_by_elements(["Al", "Cu"], source_names=["oqmd"])
res[0]
Out[21]:
In [22]:
res = mdf.search_by_titles(['"High-throughput Ab-initio Dilute Solute Diffusion Database"'])
res[0]
Out[22]:
In [23]:
res = mdf.search_by_dois("https://dx.doi.org/10.13011/M3B36G")
res[0]
Out[23]:
aggregate_source_names() fetches and returns all the records for a provided "mdf.source_name" value. Calling search() or aggregate() is not required, as this helper function does that for you. Please note that it is not possible to use the limit argument with this helper function, so you may get back a large number of results.
In [24]:
res = mdf.aggregate_sources("ge_nanoparticles")
res[0]
Out[24]:
In [ ]: