MaMoMo: Masked Molecular Modeling with Graph Attention Networks
Ensure you have the following dependencies installed:
Install the required Python libraries using:
pip install -r requirements.txt
- NumPy (>=1.18.0)
- Matplotlib (>=3.1.0)
- Pytorch Lightning (>=1.8.0,<=2.0.0)
- matgl (==0.7.0)
- Hydra(>=1.3.1)
- pymatgen
This project is optimized for GPU acceleration. Ensure you have access to a compatible GPU and install the necessary CUDA toolkit and cuDNN library. Visit PyTorch's GPU support page for detailed instructions. Note that DGL supports CUDA up to 11.8 version, please make sure to check the compatibility with CUDA and pytorch versions.
Adjust the configuration parameters inside src/config/
files to customize the model training and evaluation settings.
Create and activate a virtual environment to isolate the project dependencies.
# Example: Create virtual environment
python -m venv venv
# Activate virtual environment
source venv/bin/activate # On Windows: .\venv\Scripts\activate
To run the training procedure, please ensure that you are in the src
folder, then run
python train_lightning.py
Hydra allows configuration parameters to be overriden by command line arguments:
#Example
python train_lightning.py train.num_epochs=500 train.batch_size==32 #hydra overrides are optional and refer to parameters in src/config files
Data visualization and model evaluation are contained in notebooks at the moment (see node_prediction.ipynb
, graph_prediction.ipynb
and node+graph_prediction.ipynb
) and are still a WIP.