Coder Social home page Coder Social logo

unifiedmolpretrain's Introduction

Unified 2D and 3D Pre-Training of Molecular Representations

This repository contains the code for Unified 2D and 3D Pre-Training of Molecular Representations, which is introduced in KDD2022.

Dataset

We use the PCQM4Mv2 dataset for pre-training, which has 3.38M data.

Requirements and Installation

  • PyTorch
  • Torch-Geometric

You can build a Docker image with the Dockerfile. To install code and develop it locally

pip install -e . 

Pre-training

bash run_training.sh --num-layers 12 --batch-size 128 --enable-tb \
    --node-attn --use-bn --pred-pos-residual --mask-prob 0.25 \
    -c 0,1,2,3 --dist

Finetuning

bash run_finetune.sh --num-layers 12 --batch-size 128 \
        --dropout 0.3 --dataset ogbg-molpcba \
        --pooler-dropout 0.1 --epochs 50 --seed 42 \
        -m /yourpretrainedmodel \
        --lr 0.0005 --weight-decay 0.01 --grad-norm 1 --prefix molpcba

unifiedmolpretrain's People

Contributors

teslacool avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

unifiedmolpretrain's Issues

Bad Input File

It shows no input files, but in the "qcqm4m-v2" dataset, it doesn't consist of the "qcqm4m-v2_xyz", could you tell me how to get these missing files?
image

Generate 3D conformation molecules

In the paper, you describe the process to take 2D information for 3D conformation generation, however, the codebase does not have any examples on how to generate this. Could you add this?

num_graphs doesn't exit

Hi!
thanks for sharing your work!
I noticed that "num_graphs"doesn't exit (batch.num_graphs)
there is no num_graphs in dataset.py
could you please provide complete code or explain why?

thanks:)

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.