From 3614221ae306a1a5b2f62dd8423075b6561eae19 Mon Sep 17 00:00:00 2001 From: Evgeny Blokhin Date: Tue, 5 Jul 2022 17:05:14 +0200 Subject: [PATCH 1/3] Polish text --- index.html | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index af69dd7..24da357 100755 --- a/index.html +++ b/index.html @@ -920,7 +920,7 @@

§1.4. JSON schemata of the MPDS entries

§1.5. Example scripts

-

Below are simple examples for the MPDS data retrieval in two programming languages: Python and JavaScript. More languages can be added by request. Note, that here the Python example requires an external package httplib2. We provide more convenient Python client library, so these examples here serve demonstration purposes only.

+

Below are simple examples for the MPDS data retrieval in two programming languages: Python and JavaScript. More languages can be added by request. Note, that here the Python example requires an external package httplib2. We provide more convenient Python client library (see the next sections), so these examples here serve demonstration purposes only.

#!/usr/bin/env python
@@ -1033,7 +1033,7 @@ 

§2.1. Overview

§2.2. Client library

-

As mentioned, any programming language, able to execute HTTP requests and handle the JSON output, can be employed. However, one of the most frequently used languages in data processing is Python. Therefore we provide a client library for Python versions 2.7 and 3.6. This library takes care of many aspects of the MPDS API, such as pagination, error handling, validation, proper data extraction and more. We encourage our users to adopt this library for their needs. It is installed as any other Python library:

+

As mentioned, any programming language, able to execute HTTP requests and handle the JSON output, can be employed. However, one of the most frequently used languages in data processing is Python. Therefore we provide a Python library, taking care of many aspects of the MPDS API, such as pagination, error handling, validation, proper data extraction and more. We encourage our users to adopt this library for their needs. It is installed as any other Python library:

pip install mpds_client
@@ -1339,7 +1339,7 @@

§2.6. Visualizations

Although the reader is encouraged to visualize the data using his habitual tools, we provide a set of helper utilities. Using a simple exporting toolbox in our Python client library each of the exercises considered above may output two files for the further plotting: CSV and JSON.

-

By default these two files are written in a system-wide temporary directory /tmp (subdirectory _MPDS). CSV is commonly used in the electronic sheets (such as OpenOffice Calc or Excel), and JSON has a custom self-explanatory layout suitable for Vis-à-vis web-viewer. This is quite unsophisticated browser-based JavaScript application, heavily used inside the MPDS GUI. It employs Plotly and D3 visualization libraries. JSON produced with the exporting toolbox may be simply drag-n-dropped in the browser window with the loaded Vis-à-vis.

+

By default these two files are written in a system-wide temporary directory /tmp (subdirectory _MPDS). CSV is commonly used in the electronic sheets (such as OpenOffice Calc), and JSON has a custom self-explanatory layout suitable for Vis-à-vis web-viewer. This is quite unsophisticated browser-based JavaScript application, heavily used inside the MPDS GUI. It employs Plotly and D3 visualization libraries. JSON produced with the exporting toolbox may be simply drag-n-dropped in the browser window with the loaded Vis-à-vis.

We thank the reader for the time and interest! Any questions or feedback is very welcomed and greatly appreciated.

From efebb1ca1e1a82b7c3437fdbf96d24528d9dc589 Mon Sep 17 00:00:00 2001 From: Evgeny Blokhin Date: Thu, 21 Jul 2022 14:00:28 +0200 Subject: [PATCH 2/3] Update phase ID wording --- index.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/index.html b/index.html index 24da357..fce66f9 100755 --- a/index.html +++ b/index.html @@ -632,7 +632,7 @@

§1.1. MPDS data structure

The standard unit of the MPDS data is an entry. All the MPDS entries are subdivided into three kinds: crystalline structures, physical properties, and phase diagrams. They are called S-, P- or C-entries, correspondingly. Entries have persistent identifiers (similar to DOIs), e.g. S377634, P600028, C100027.

-

Another dimension of the MPDS data is the distinct phases. The three kinds of entries are interlinked via the distinct materials phases they belong. A tremendous work was done by the PAULING FILE team in the past 20 years to manually distinguish about 200 000 inorganic materials phases, appearing in the literature. Each phase has a unique combination of (a) chemical formula, (b) space group, (c) Pearson symbol. Each phase has an integer identifier called phase_id.

+

Another dimension of the MPDS data is the distinct phases. The three kinds of entries are interlinked via the distinct materials phases they belong. A tremendous work was done by the PAULING FILE team in the past 20 years to manually distinguish about 200 000 inorganic materials phases, appearing in the literature. Each phase has a unique combination of (a) chemical formula, (b) space group, (c) Pearson symbol. Each phase has the permanent integer identifier called phase_id.

Consider the following example of the entries and distinct phases. There can be the following distinct phases for the titanium dioxide: rutile with the space group 136 (let us say, phase_id 1), anatase with the space group 141 (phase_id 2), and brookite with the space group 61 (phase_id 3). Then the S- and P-entries for the titanium dioxide must refer to either 1, or 2, or 3, and the C-entries must refer to 1, 2, and 3 simultaneously.

From 71e71f287ccbb4eec51ee88e6ea4250cf4f77fbf Mon Sep 17 00:00:00 2001 From: Evgeny Blokhin Date: Tue, 20 Sep 2022 22:22:28 +0200 Subject: [PATCH 3/3] Add more comments --- kickoff/miner_ab_etransport.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/kickoff/miner_ab_etransport.py b/kickoff/miner_ab_etransport.py index 98bbc03..31ce5ab 100755 --- a/kickoff/miner_ab_etransport.py +++ b/kickoff/miner_ab_etransport.py @@ -7,7 +7,7 @@ from etransport_raw import analyze_raw # this is given in the supplied file "etransport_raw.py" -# the raw data on the MPDS are in 7z format +# the raw simulation data on the MPDS are in 7z format # so we need the latest dev version of pylzma # pip install git+https://github.com/fancycode/pylzma # then py7zlib is available @@ -19,7 +19,7 @@ for entry in mpds_api.get_data({'props': 'electrical conductivity'}, fields={}): - archive_url = entry['sample']['measurement'][0]['raw_data'] # this is the raw data archive location + archive_url = entry['sample']['measurement'][0]['raw_data'] # this is the raw data archive field in the MPDS JSON P-entries p = requests.get(archive_url) if p.status_code != 200: @@ -31,7 +31,7 @@ archive = Archive7z(io.BytesIO(p.content)) for virtual_path in archive.files: - if virtual_path.filename != 'TRANSPORT/SIGMA.DAT': + if virtual_path.filename != 'TRANSPORT/SIGMA.DAT': # raw simulation output log file continue # this is how we extract data from the 7z-archive @@ -40,4 +40,4 @@ result = analyze_raw(rawdata) rawdata.seek(0) - print(entry['sample']['material']['phase'], result) \ No newline at end of file + print(entry['sample']['material']['phase'], result)