Skip to content

Commit

Permalink
Update to v0.1.3
Browse files Browse the repository at this point in the history
  • Loading branch information
computron committed Sep 8, 2017
1 parent 68c101c commit 677a124
Show file tree
Hide file tree
Showing 29 changed files with 741 additions and 303 deletions.
13 changes: 13 additions & 0 deletions docs/_sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,19 @@ A few examples demonstrating usage can be found in the notebook hosted on `Jupyt
Changelog
---------

**v0.1.3**

* remove git-lfs
* refactor structure descriptors
* multiple fixes to cohesive energy
* fixes to data loaders
* fix complex Mongo retrieval queries, better logic for query projections
* more unit tests
* enforce lower case feature names
* sort data by atomic number not electronegativity in data getters, this will avoid pernicious behavior
* many minor cleanups, bug fixes, and consistency fixes


**v0.1.2**

* Several new structure fingerprint methods (L. Ward, K. Bostrom)
Expand Down
29 changes: 29 additions & 0 deletions docs/_sources/matminer.datasets.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
matminer.datasets package
=========================

Subpackages
-----------

.. toctree::

matminer.datasets.test_datasets

Submodules
----------

matminer.datasets.dataframe_loader module
-----------------------------------------

.. automodule:: matminer.datasets.dataframe_loader
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: matminer.datasets
:members:
:undoc-members:
:show-inheritance:
22 changes: 22 additions & 0 deletions docs/_sources/matminer.datasets.test_datasets.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
matminer.datasets.test_datasets package
=======================================

Submodules
----------

matminer.datasets.test_datasets.test_datasets module
----------------------------------------------------

.. automodule:: matminer.datasets.test_datasets.test_datasets
:members:
:undoc-members:
:show-inheritance:


Module contents
---------------

.. automodule:: matminer.datasets.test_datasets
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/_sources/matminer.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Subpackages
.. toctree::

matminer.data_retrieval
matminer.datasets
matminer.featurizers
matminer.figrecipes
matminer.learners
Expand Down
102 changes: 60 additions & 42 deletions docs/genindex.html

Large diffs are not rendered by default.

20 changes: 16 additions & 4 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>matminer (Materials Data Mining) &#8212; matminer 0.1.2 documentation</title>
<title>matminer (Materials Data Mining) &#8212; matminer 0.1.3 documentation</title>

<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.1.2',
VERSION: '0.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -37,7 +37,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">matminer 0.1.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">matminer 0.1.3 documentation</a> &#187;</li>
</ul>
</div>

Expand Down Expand Up @@ -202,6 +202,18 @@ <h3>Plotting tools<a class="headerlink" href="#plotting-tools" title="Permalink
</div>
<div class="section" id="changelog">
<h3>Changelog<a class="headerlink" href="#changelog" title="Permalink to this headline"></a></h3>
<p><strong>v0.1.3</strong></p>
<ul class="simple">
<li>remove git-lfs</li>
<li>refactor structure descriptors</li>
<li>multiple fixes to cohesive energy</li>
<li>fixes to data loaders</li>
<li>fix complex Mongo retrieval queries, better logic for query projections</li>
<li>more unit tests</li>
<li>enforce lower case feature names</li>
<li>sort data by atomic number not electronegativity in data getters, this will avoid pernicious behavior</li>
<li>many minor cleanups, bug fixes, and consistency fixes</li>
</ul>
<p><strong>v0.1.2</strong></p>
<ul class="simple">
<li>Several new structure fingerprint methods (L. Ward, K. Bostrom)</li>
Expand Down Expand Up @@ -298,7 +310,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="#">matminer 0.1.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="#">matminer 0.1.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down
134 changes: 73 additions & 61 deletions docs/matminer.data_retrieval.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>matminer.data_retrieval package &#8212; matminer 0.1.2 documentation</title>
<title>matminer.data_retrieval package &#8212; matminer 0.1.3 documentation</title>

<link rel="stylesheet" href="_static/nature.css" type="text/css" />
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: './',
VERSION: '0.1.2',
VERSION: '0.1.3',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
Expand All @@ -37,7 +37,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">matminer 0.1.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">matminer 0.1.3 documentation</a> &#187;</li>
</ul>
</div>

Expand All @@ -61,7 +61,11 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<code class="descname">__init__</code><span class="sig-paren">(</span><em>api_key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_Citrine.CitrineDataRetrieval.__init__" title="Permalink to this definition"></a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>api_key: (str) Your Citrine API key, or None if you&#8217;ve set the CITRINE_KEY environment variable</dd>
<dd><dl class="first last docutils">
<dt>api_key: (str) Your Citrine API key, or None if you&#8217;ve set the</dt>
<dd>CITRINE_KEY environment variable</dd>
</dl>
</dd>
</dl>
<p>Returns: None</p>
</dd></dl>
Expand All @@ -70,27 +74,35 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<dt id="matminer.data_retrieval.retrieve_Citrine.CitrineDataRetrieval.get_dataframe">
<code class="descname">get_dataframe</code><span class="sig-paren">(</span><em>formula=None</em>, <em>property=None</em>, <em>data_type=None</em>, <em>reference=None</em>, <em>min_measurement=None</em>, <em>max_measurement=None</em>, <em>from_record=None</em>, <em>data_set_id=None</em>, <em>max_results=None</em>, <em>show_columns=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_Citrine.CitrineDataRetrieval.get_dataframe" title="Permalink to this definition"></a></dt>
<dd><p>Gets data from Citrine in a dataframe format.
See client docs at <a class="reference external" href="http://citrineinformatics.github.io/api-documentation/">http://citrineinformatics.github.io/api-documentation/</a> for more details on these parameters.</p>
See client docs at
<a class="reference external" href="http://citrineinformatics.github.io/api-documentation/">http://citrineinformatics.github.io/api-documentation/</a> for more details
on these parameters.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>formula: (str) filter for the chemical formula field; only those results that have chemical formulas that</dt>
<dd>contain this string will be returned</dd>
<dt>formula: (str) filter for the chemical formula field; only those</dt>
<dd>results that have chemical formulas that contain this string
will be returned</dd>
</dl>
<p>property: (str) name of the property to search for
data_type: (str) &#8216;EXPERIMENTAL&#8217;/&#8217;COMPUTATIONAL&#8217;/&#8217;MACHINE_LEARNING&#8217;; filter for properties obtained from</p>
data_type: (str) &#8216;EXPERIMENTAL&#8217;/&#8217;COMPUTATIONAL&#8217;/&#8217;MACHINE_LEARNING&#8217;;</p>
<blockquote>
<div>experimental work, computational methods, or machine learning.</div></blockquote>
<div>filter for properties obtained from experimental work,
computational methods, or machine learning.</div></blockquote>
<dl class="docutils">
<dt>reference: (str) filter for the reference field; only those results that have contributors that</dt>
<dd>contain this string will be returned</dd>
<dt>reference: (str) filter for the reference field; only those results</dt>
<dd>that have contributors that contain this string will be returned</dd>
</dl>
<p class="last">min_measurement: (str/num) minimum of the property value range
<p>min_measurement: (str/num) minimum of the property value range
max_measurement: (str/num) maximum of the property value range
from_record: (int) index of the first record to return (indexed from 0)
data_set_id: (int) id of the particular data set to search on
from_record: (int) index of the first record to return (indexed</p>
<blockquote>
<div>from 0)</div></blockquote>
<p>data_set_id: (int) id of the particular data set to search on
max_results: (int) number of records to limit the results to
show_columns: (list) list of columns to show from the resulting dataframe</p>
show_columns: (list) list of columns to show from the resulting</p>
<blockquote class="last">
<div>dataframe</div></blockquote>
</dd>
</dl>
<p>Returns: (object) Pandas dataframe object containing the results</p>
Expand Down Expand Up @@ -153,51 +165,46 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
<dl class="class">
<dt id="matminer.data_retrieval.retrieve_MP.MPDataRetrieval">
<em class="property">class </em><code class="descclassname">matminer.data_retrieval.retrieve_MP.</code><code class="descname">MPDataRetrieval</code><span class="sig-paren">(</span><em>api_key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MP.MPDataRetrieval" title="Permalink to this definition"></a></dt>
<dd><p>MPDataRetrieval is used to retrieve data from the Materials Project database, print the results, and convert them
into an indexed/unindexed Pandas dataframe.</p>
<dd><p>MPDataRetrieval is used to retrieve data from the Materials Project
database, print the results, and convert them into an indexed Pandas
dataframe.</p>
<dl class="method">
<dt id="matminer.data_retrieval.retrieve_MP.MPDataRetrieval.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>api_key=None</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MP.MPDataRetrieval.__init__" title="Permalink to this definition"></a></dt>
<dd><dl class="docutils">
<dt>Args:</dt>
<dd>api_key: (str) Your Materials Project API key, or None if you&#8217;ve set the MAPI_KEY environment variable</dd>
<dd><dl class="first last docutils">
<dt>api_key: (str) Your Materials Project API key, or None if you&#8217;ve</dt>
<dd>set up your pymatgen config.</dd>
</dl>
</dd>
</dl>
<p>Returns: None</p>
</dd></dl>

<dl class="method">
<dt id="matminer.data_retrieval.retrieve_MP.MPDataRetrieval.get_dataframe">
<code class="descname">get_dataframe</code><span class="sig-paren">(</span><em>criteria</em>, <em>properties</em>, <em>mp_decode=False</em>, <em>index_mpid=True</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MP.MPDataRetrieval.get_dataframe" title="Permalink to this definition"></a></dt>
<dd><p>Gets data from MP in a dataframe format.
See API docs at <a class="reference external" href="https://materialsproject.org/wiki/index.php/The_Materials_API">https://materialsproject.org/wiki/index.php/The_Materials_API</a> for more details.</p>
See API docs at
<a class="reference external" href="https://materialsproject.org/wiki/index.php/The_Materials_API">https://materialsproject.org/wiki/index.php/The_Materials_API</a>
for more details.</p>
<dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>criteria: (str/dict) Criteria of the query as a string or mongo-style dict. If string, it supports a</dt>
<dd><p class="first">powerful but simple string criteria. E.g., &#8220;Fe2O3&#8221; means search for materials with reduced_formula
Fe2O3. Wild cards are also supported. E.g., &#8220;*2O&#8221; means get all materials whose formula can be formed
as *2O, e.g., Li2O, K2O, etc.</p>
<dl class="docutils">
<dt>Other syntax examples:</dt>
<dd>mp-1234: Interpreted as a Materials ID.
Fe2O3 or *2O3: Interpreted as reduced formulas.
Li-Fe-O or *-Fe-O: Interpreted as chemical systems.</dd>
<dd><dl class="first last docutils">
<dt>criteria: (str/dict) see MPRester.query() for a description of this</dt>
<dd>parameter. String examples: &#8220;mp-1234&#8221;, &#8220;Fe2O3&#8221;, &#8220;Li-Fe-O&#8217;,
&#8220;*2O3&#8221;. Dict example: {&#8220;band_gap&#8221;: {&#8220;$gt&#8221;: 1}}</dd>
<dt>properties: (list) see MPRester.query() for a description of this</dt>
<dd>parameter. Example: [&#8220;formula&#8221;, &#8220;formation_energy_per_atom&#8221;]</dd>
<dt>mp_decode: (bool) see MPRester.query() for a description of this</dt>
<dd>parameter. Whether to decode to a Pymatgen object where
possible.</dd>
<dt>index_mpid: (bool) Whether to set the materials_id as the dataframe</dt>
<dd>index.</dd>
</dl>
<p>You can mix and match with spaces, which are interpreted as &#8220;OR&#8221;. E.g. &#8220;mp-1234 FeO&#8221; means query for
all compounds with reduced formula FeO or with materials_id mp-1234.</p>
<p class="last">Using a full dict syntax, even more powerful queries can be constructed. For example,
{&#8220;elements&#8221;:{&#8220;$in&#8221;:[&#8220;Li&#8221;, &#8220;Na&#8221;, &#8220;K&#8221;], &#8220;$all&#8221;: [&#8220;O&#8221;]}, &#8220;nelements&#8221;:2} selects all Li, Na and K oxides.
{&#8220;band_gap&#8221;: {&#8220;$gt&#8221;: 1}} selects all materials with band gaps greater than 1 eV.</p>
</dd>
<dt>properties: (list) Properties to request for as a list. For example,</dt>
<dd>[&#8220;formula&#8221;, &#8220;formation_energy_per_atom&#8221;] returns the formula and formation energy per atom.</dd>
<dt>mp_decode: (bool) Whether to do a decoding to a Pymatgen object where possible. In some cases, it might be</dt>
<dd>useful to just get the raw python dict, i.e., set to False.</dd>
</dl>
<p class="last">index_mpid: (bool) Whether to set the materials_id as the dataframe index.</p>
</dd>
</dl>
<p>Returns: A Pandas dataframe object</p>
<p>Returns: A pandas Dataframe object</p>
</dd></dl>

</dd></dl>
Expand All @@ -214,10 +221,12 @@ <h2>matminer.data_retrieval.retrieve_MPDS module<a class="headerlink" href="#mat
<dd><dl class="method">
<dt id="matminer.data_retrieval.retrieve_MongoDB.MongoDataRetrieval.__init__">
<code class="descname">__init__</code><span class="sig-paren">(</span><em>coll</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MongoDB.MongoDataRetrieval.__init__" title="Permalink to this definition"></a></dt>
<dd><p>Tool to retrieve data from a MongoDB collection and reformat for data analysis
Args:</p>
<blockquote>
<div>coll: A MongoDB collection object</div></blockquote>
<dd><p>Tool to retrieve data from a MongoDB collection and put into a pandas
Dataframe object</p>
<dl class="docutils">
<dt>Args:</dt>
<dd>coll: A MongoDB collection object</dd>
</dl>
</dd></dl>

<dl class="method">
Expand All @@ -226,14 +235,16 @@ <h2>matminer.data_retrieval.retrieve_MPDS module<a class="headerlink" href="#mat
<dd><dl class="docutils">
<dt>Args:</dt>
<dd><dl class="first docutils">
<dt>projection: (list) - a list of str fields to grab; dot-notation is allowed.</dt>
<dd>Set to &#8220;None&#8221; to try to auto-detect the fields.</dd>
<dt>projection: (list) - a list of str fields to grab; dot-notation is</dt>
<dd>allowed. Set to &#8220;None&#8221; to try to auto-detect the fields.</dd>
</dl>
<p class="last">query: (JSON) - a pymongo-style query to restrict data being gathered
<p>query: (JSON) - a pymongo-style query to filter data records
sort: (tuple) - pymongo-style sort option
limit: (int) - int to limit the number of entries
idx_field: (str) - name of field to use as index field (must be unique)
strict: (bool) - if False, replaces missing values with NaN</p>
limit: (int) - max number of entries
idx_field: (str) - name of field to use as index (must have unique</p>
<blockquote>
<div>entries)</div></blockquote>
<p class="last">strict: (bool) - if False, replaces missing values with NaN</p>
</dd>
</dl>
</dd></dl>
Expand All @@ -243,21 +254,22 @@ <h2>matminer.data_retrieval.retrieve_MPDS module<a class="headerlink" href="#mat
<dl class="function">
<dt id="matminer.data_retrieval.retrieve_MongoDB.clean_projection">
<code class="descclassname">matminer.data_retrieval.retrieve_MongoDB.</code><code class="descname">clean_projection</code><span class="sig-paren">(</span><em>projection</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MongoDB.clean_projection" title="Permalink to this definition"></a></dt>
<dd><p>Projecting on e.g. &#8216;a.b.&#8217; and &#8216;a&#8217; is disallowed. Project inclusively.
<dd><p>Projecting on e.g. &#8216;a.b.&#8217; and &#8216;a&#8217; is disallowed in MongoDb, so project
inclusively. See unit tests for examples of what this is doing.
Args:</p>
<blockquote>
<div>projection: (list) - list of fields to grab; dot-notation is allowed.</div></blockquote>
</dd></dl>

<dl class="function">
<dt id="matminer.data_retrieval.retrieve_MongoDB.is_int">
<code class="descclassname">matminer.data_retrieval.retrieve_MongoDB.</code><code class="descname">is_int</code><span class="sig-paren">(</span><em>x</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MongoDB.is_int" title="Permalink to this definition"></a></dt>
<dd></dd></dl>

<dl class="function">
<dt id="matminer.data_retrieval.retrieve_MongoDB.remove_ints">
<code class="descclassname">matminer.data_retrieval.retrieve_MongoDB.</code><code class="descname">remove_ints</code><span class="sig-paren">(</span><em>projection</em><span class="sig-paren">)</span><a class="headerlink" href="#matminer.data_retrieval.retrieve_MongoDB.remove_ints" title="Permalink to this definition"></a></dt>
<dd></dd></dl>
<dd><p>Transforms a string like &#8220;a.1.x&#8221; to &#8220;a.x&#8221; - for Mongo projection purposes
Args:</p>
<blockquote>
<div>projection: (str) the projection to remove ints from</div></blockquote>
<p>Returns:</p>
</dd></dl>

</div>
<div class="section" id="module-matminer.data_retrieval">
Expand Down Expand Up @@ -314,7 +326,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="index.html">matminer 0.1.2 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="index.html">matminer 0.1.3 documentation</a> &#187;</li>
</ul>
</div>
<div class="footer" role="contentinfo">
Expand Down

0 comments on commit 677a124

Please sign in to comment.