MoleGuLAR-Web

This repository contains a web app implementation of MoleGuLAR.

It contains three microservices - the server, trainer and evaluator implemented in FastAPI. All the requests from the client go to the server which then accordingly sends a request to the trainer or evaluator.

Setup

To setup the app locally for development

git clone https://github.com/manangoel99/MoleGuLAR-Web
git submodule update --init --recursive

This will clone the repository locally and fetch the AutoDock-GPU package required for docking calculations. For running the app, you will need to setup docker and docker-compose. The documentation for those are available here and here respectively. To build and run the app, use the following command

docker-compose up --build

This will build each microservice in seperate docker containers and link them all on a common network for interacting with each other. The database of choice is PostgreSQL again pulled from a docker image so does not require any local setup.

Architecture

The client will send requests to the server. If the user requests a training job or status of all jobs, the request is sent to the trainer. The trainer processes the training jobs asynchronously using ray. All training jobs use only 1 GPU and if the machine possesses more than 1 GPU, the submitted jobs are distributed accordingly. The trained models are saved after every iteration during training.

If the user requests an evaluation job, the evaluator service will receive a request from the server to generate the number of molecules requested by the user. This is a blocking operation and the response will be a list of generated SMILES and their corresponding properties.