This is the code repository for our ICLR 2021 paper MARS: Markov Molecular Sampling for Multi-objective Drug Discovery. AND I edit this code to excute for another data and objective.
The conda
environment is exported as environment.yml
. You can also manually install these packages:
conda install -c conda-forge rdkit
conda install tqdm tensorboard scikit-learn
conda install pytorch cudatoolkit=11.1 -c pytorch -c conda-forge
conda install -c dglteam dgl-cuda11.1
# for cpu only
conda install pytorch cpuonly -c pytorch
conda install -c dglteam dgl
Note: Run the commands outside the
MARS
directory.
To extract molecular fragments from a database:
python -m MARS.datasets.prepro_vocab
To sample molecules:
python -m MARS.main --train --run_dir runs/RUN_DIR
The generated molecules are evaluated at each step and the results are stored in runs/RUN_DIR
(runs/debug
by default). Please refer to tensorboard files for the evaluation results and mols.txt
for all the molecules generated during sampling.
The experiment results we listed in the paper are obtained by averaging the outcomes of 10 independent sampling paths. For each sampling path, we record the evaluation results of the step that produces the highest PM score.