Skip to content

materialsinnovation/mks-tutorial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyMKS logo

MKS Tutorial

Gitter Chat Travis CI License Binder

Versions

Location Date Tag Presentation
Northwestern 2017-08-03 northwestern-2017-08-03 presentation1
NIST 2017-09-27 nist-2017-09-27 presentation2

Overview

This is the repository for the Materials Knowledge System (MKS) tutorial. The tutorial will explore materials informatics using the PyMKS package. The primary focus will be on demonstrating how PyMKS is used to create process-structure-property relationships. In no particular order the tutorial will try to cover some of the following (time permitting),

  • Decomposing microstructure into a digital signal

  • Quantifying microstructure using 2 point statistics

  • Learning from a Cahn-Hilliard simulation

  • Using Dask to make PyMKS work in a threaded or multiprocessing environment

  • Using Scikit-Learn to cross-validate results

Some reading:

  • Materials Knowledge Systems in Python—a Data Science Framework for Accelerated Development of Hierarchical Materials, D. B. Brough, D. Wheeler and S. R. Kalidindi; Integrating Materials and Manufacturing Innovation, 2017, vol. 6, issue 1, pp 36-52, doi:10.1007/s40192-017-0089-0.

  • See the PyMKS theory documentation.

How it works

The tutorial will involve live coding. To follow along participants will either need to (a) follow the instructions below or (b) use the live notebooks via the web. Option (b) requires no prior installation and will be explained during the setup stage of the tutorial. However, this environment will not be available to the participants for future use.

(a) Installation

Participants will need PyMKS installed, a running Jupyter notebook and Dask. The easiest way to install these requirements is to build an Anaconda Python environment. See https://www.continuum.io/downloads to install Anaconda Python on your platform. Any version of Python should work (either 2.7, 3.5 or 3.6), but this repository is only tested with Python 3.6.

Once you have a working Python environment and a Conda build environment then try installing the following packages,

$ conda install -c conda-forge pymks
$ conda install jupyter
$ conda install dask
$ conda install -c conda-forge dask-searchcv

Optional Installation

If you would like to do more fancy plots during the tutorial (not strictly necessary), install bqplot:

$ conda install -c conda-forge bqplot
$ jupyter nbextension enable --py --sys-prefix widgetsnbextension
$ jupyter nbextension enable --py --sys-prefix bqplot

(b) Live Notebooks

For those that are unable to follow the instructions above, there will be live Jupyter notebooks with the environment preinstalled. These will be hosted via MATIN. User IDs and passwords will be distributed at the start of the tutorial.

Alternatively, try launching binder badge link above. This can be unreliable, but has been working recently.

Testing

To check that you have things working correctly, try launching a Jupyter notebook using,

$ jupyter notebook

For more information on setting up and using the notebook, see the Jupyter Notebook Quckstart. If you have a working notebook then try importing PyMKS and Dask in the notebook with,

In []: import pymks
In []: import dask

Hit Shift + Enter to run a cell. If that works, try running the PyMKS tests using,

In []: pymks.test()

The tests will print a lot of text to the screen, but should indicate success on the final line.

Issues

If you have problems with any of the above instructions, please raise them in the Gitter channel or raise an issue in this repository. These instructions are a moving target so will likely change if people report issues on various platforms. Also, please try and go through these installation instructions a few days before the tutorial to give time to iron out any issues.

About

MKS Tutorial at the CHiMaD Phase Field Meeting

Resources

License

Stars

Watchers

Forks

Packages

No packages published