Giter Site home page Giter Site logo

wikgithub / crystalgan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from asmanouira/crystalgan

1.0 0.0 0.0 1.45 MB

Learning to Discover Crystallographic Structures with Generative Adversarial Networks

License: GNU General Public License v3.0

Python 9.18% Jupyter Notebook 90.82%

crystalgan's Introduction

CrystalGAN

Learning to Discover Crystallographic Structures with Generative Adversarial Networks

Description

This repository is a TensorFlow implementation of CrystalGAN : CrystalGAN: Learning to Discover Crystallographic Structures with Generative Adversarial Networks. AAAI Spring Symposium: Combining Machine Learning with Knowledge Engineering 2019

Requirements

Note: Experiments must be run using GPU with powerful graphics card.

Usage

Clone the repository with:

git clone https://github.com/asmanouira/CrystalGAN 

Then:

cd CrystalGAN/

CrystalGAN is based on three steps:

  • First and second steps are implemented in CrystalGAN_step1+2.py
  • Third and last step is implemented in CrystalGAN_step3.py

Launch jupyter notebook:

jupyter notebook
  • Open Step1+Step2_CrystalGAN.ipynb

Datasets

CrystalGAN takes as input two datasets of binary compounds and generates as output ternary compounds. We choose in this implementation as example Pd-H "Palladium - Hydrogen" and Ni-H "Nickel - Hydrogen", The aim is to generate novel ternary compounds of Pd-H-Ni "Palladium - Hydrogen - Nickel"

Samples in our datasets are POSCAR files and converted to 4D tensors as shown below:

Image description

In order to prepare the inputs for complexity augmentation , we add an empty placeholder for each dataset:

Image description

This procedure described above was implemented in Matlab: POSCAR2mat.m

Networks

CrystalGAN is composed basically of two cross-domain GANs.

Each encoder and decoder of the generators and the discriminators are composed of fully-connected layers.

Image description

The output datasets of the first network (including STEP1 and STEP2) will be trained by the second cross-domain GAN

Image description

To check the architecture of CrystalGAN network, we can use tensorboard:

tensorboard --logdir=graphs/

Image description

Results

CrystalGAN generates ternary compounds in 4D tensors and then print them as POSCAR files. We evaluate the generated crystal structures by:

  • Visualizing the lattice of the crystal VESTA using the generated POSCAR files.
  • Visualizing their distances histogram of first neighbors for all atoms in the cell.
  • Check if the first neighbors distances respect the reinforced constraints by printing them in tables

To compute neighbors of all atoms in a crystallographic structure using POSCAR file as input argument: see neighbors.py An example of a POSCAR file is in data/.

In our study, the penalized first neighbors distances are between the atoms Pd-Pd', Ni-Ni', Pd-Ni and H-H'.
Those distances fixed to be between d1 = 1.8 ร… and d2 = 3 ร…. Image description

crystalgan's People

Stargazers

Wiktoria Kasprzak 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.