likefallwind / dflow101

2 stars 1 forks source link

Dflow_high throughput screening_machine learning #6

Open ZijianCai opened 2 years ago

ZijianCai commented 2 years ago

dflow-MP_cgcnn_jupyter

https://github.com/ZijianCai/dflow/tree/main/MP_cgcnn_jupyter This is a simple introduction to dflow, materials screening and machine learning.

Picture1

Setup

  1. Setup conda environment (assume you have conda installed)
    conda create -n dflow-helloworld python=3.9
  2. Activate conda environment and install jupyter notebook
    conda activate dflow-jupyter
    pip install notebook

How to use

  1. Clone this repository to local
    git clone https://github.com/git clone https://github.com/
  2. cd into the repo
    cd dflow_jupyter
  3. Start up jupyter notebook
    jupyter notebook
  4. Docker images should include python, pymatgen, PyTorch and scikit-learn.

Prepare your screening code

  1. Get your API key from materials project: https://legacy.materialsproject.org/open. Use it as your first argument (sys.argv[1])

  2. Write your criteria for screening. In the current version, the number of elements (nelements) are applied to screen as a demo. For your onwer purpose, you can write different screening criteria, such as must include certain elements, energy above hull must be smaller than a certain value, band gap must be smaller than a certain value, et al.

  3. Note: the screening code will output a csv file (id_prop.csv) to the designed folder (sys.argv[2])

Prepare CGCNN code

  1. The CGCNN code has been prepared, which is from: https://github.com/txie-93/cgcnn