GithubHelp home page GithubHelp logo

aspirincode / conditionalcgvae Goto Github PK

View Code? Open in Web Editor NEW

This project forked from drigoni/conditionalcgvae

0.0 1.0 0.0 44 KB

Conditional Constrained Graph Variational Autoencoders (CCGVAE) for Molecule Design

License: MIT License

Python 98.74% Shell 1.26%

conditionalcgvae's Introduction

Conditional Constrained Graph Variational Autoencoders (CCGVAE) for Molecule Design

This repository contains the code used to generate the results reported in the paper: Conditional Constrained Graph Variational Autoencoders for Molecule Design.

@article{rigoni2020conditional,
  title={Conditional Constrained Graph Variational Autoencoders for Molecule Design},
  author={Rigoni, Davide and Navarin, Nicol{\`o} and Sperduti, Alessandro},
  journal={arXiv preprint arXiv:2009.00725},
  year={2020}
}

All the files related to the CCGVAE model will be uploaded soon.

Dependencies

This project uses the conda environment. In the root folder you can find, for each model, the .yml file for the configuration of the conda environment and also the .txt files for the pip environment. Note that some versions of the dependencies can generate problems in the configuration of the environment. For this reason, although the setup.bash file is present for the configuration of each project, it is better to configure them manually.

Structure

The project is structured as follows:

  • data: contains the code to execute to make the dataset;
  • results: contains the checkpoints and the results;
  • model: contains the code about the model;
  • utils: contains all the utility code;
  • histogramAnalysis: contains all the code necessary to print the images about the histogram distribution.

Usage

Data Download

First you need to download the necessary files and configuring the environment by running the following commands:

sh setup.bash install
conda activate givae

Data Pre-processing

In order to make de datasets type the following commands:

cd data
python make_dataset.py --dataset [dataset]

Where dataset can be:

  • qm9
  • zinc

Model Training

In order to train the model use:

python CCGVAE.py --dataset [dataset] --config '{"generation":0, "log_dir":"./results", "use_mask":false}'

Model Test

In order to generate new molecules:

python CCGVAE.py --dataset [dataset] --restore results/[checkpoint].pickle --config '{"generation":1, "log_dir":"./results", "use_mask":false}'

While, in order to reconstruct the molecules:

python CCGVAE.py --dataset [dataset] --restore results/[checkpoint].pickle --config '{"generation":2, "log_dir":"./results", "use_mask":true}'

In order to analyze the results, we used the following environmet: ComparisonsDGM.

Information

For any questions and comments, contact Davide Rigoni.

NOTE: Some functions are extracted from the following source code.

Licenze

MIT

conditionalcgvae's People

Contributors

drigoni avatar

Watchers

James Cloos 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.