Code Monkey home page Code Monkey logo

ml_b-c-n's Introduction

Description

This respository is the machine learning implementation to predict mechanical properties (bulk modulus, shear modulus, and Vickers hardness) for a given compound. Find more information in our paper "Machine learning and evolutionary prediction of superhard B-C-N compounds": https://www.nature.com/articles/s41524-021-00585-7

The folder "includes" has a module for generating 60 features used in our study.

Data

The data used in our paper is from Materials Project DFT database (https://materialsproject.org/). The data.json can be found in https://github.com/weichihuab/ML_B-C-N_data.

Codes

Building ML model

  • python rf_bulk_modulus.py
  • python rf_shear_modulus.py

rf_bulk_modulus.py and rf_shear_modulus.py, can generate the following files:

    formula_K.json               --  data of chemical formula and bulk modulus
    formula_G.json               --  data of chemical formual and shear modulus
    features.csv                 --  60 features of corresponding chemical formula in formula_K.json an formula_G.json
    rf_bulk_modulus.joblib       --  trained random forests model for bulk modulus
    rf_shear_modulus.joblib      --  trained random forests model for shear modulus

NOTE: The trained random forests models would depend on the random seed, which can be set manually in rf_bulk_modulus.py and rf_shear_modulus.py using argument "random_state". 

ML model prediction

  • python rf_prediction.py

The code rf_prediction.py loads rf_bulk_modulus.joblib and rf_shear_modulus.joblib to predict hardness, bulk modulus, and shear modulus of given chemical compositions in "formula_list".

Citation

Wei-Chih Chen, Joanna N. Schmidt, Da Yan, Yogesh K. Vohra, and Cheng-Chien Chen, "Machine Learning and Evolutionary Prediction of Superhard B-C-N Compounds", npj Comput Mater 7, 114 (2021). https://doi.org/10.1038/s41524-021-00585-7

Environment

  • python 3.7
  • pymatgen 2021.2.16
  • sklearn 0.23.2

ml_b-c-n's People

Contributors

weichihuab avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.