Giter VIP home page Giter VIP logo

om-diff's Introduction

OM-Diff: Inverse-design of organometallic catalysts with guided equivariant denoising diffusion

This repository is the official implementation of the OM-Diff paper.

This repository builds on the lightning-hydra-template. Explanations on e.g. how the config files are resolved can be found in the original template.

Getting started

After creating an environment and installing the requirements, the repo can either be installed as a package or be used without being installed by adding the path to root of the project to the PYTHONPATH environment variable.

Setting the environment variables

A .env file has to be placed at the root of the project. It is used to contain environment variables that can be accessed in the config files.

An example is provided in .env.example.

At this point, it is only used for defining:

  • PROJECT_ROOT: pointing to the root of the project;
  • SCRATCH_PATH: pointing to where the logs/checkpoints etc. should be dumped;
  • SCRATCH_COMPUTE_PATH: pointing to where the dataset should be copied during training (e.g. a fast-access disk on a compute node).

Usage

How to train models?

There is a unique entry point for training the different models: src/train.py.

A training run can be launched using: python src/train.py experiment=<experiment-name> where <experiment-name>is the name of the experiment to be run.

The description of the experiment to be run should be placed in config/experiment/<experiment-name>.yaml.

A couple of experiment config files are provided and allow to:

  • train a diffusion model;
  • train a time-conditioned regressor;
  • train a property predictor.

All experiments are by default run on the cross-coupling dataset investigated in the paper.

Train a diffusion model

python src/train.py experiment=train_diffusion_suzuki

Train a time-conditioned regressor

python src/train.py experiment=train_time_regressor_suzuki

Train a property predictor

python src/train.py experiment=train_regressor_suzuki

Train models using your own data

While a lot of the provided code/configs is overly specific to the experiments reported in the paper, training using your own data should be straightforward.

Provided that you have saved the data in an ase database, you can easily interface to it using the generic ASEDataset and ASEDataModule.

How to sample from a trained diffusion model?

Unconditional sampling

This can be done using src/sample_from_ckpt.py.

Conditional sampling

This can be done using src/cond_sample_from_ckpt.py.

How to evaluate the properties of complexes using a trained property predictor?

This can be done using src/predict_on_samples.py.

om-diff's People

Contributors

frcnt avatar

Watchers

 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.