Skip to content

Hebelag/peptide_optimizer

Repository files navigation

Peptide Optimizer

License: GPL v3 Python FastAPI React Mantine Docker RDKit HELM SMILES Peptide Optimizer CI Backend Peptide Optimizer CI Frontend

Welcome to my Master Thesis/ recently upgraded version of my Master Thesis without proprietary dependencies! I took this rather old code base to get used to molecule manipulation, python SQL coding, FastAPI ASGI routing and some front end basics. It is a huge learning opportunity for me. The main reason is that I don't want to lose my chemistry knowledge, and combining it with computer science is the best thing happening right now. Since Docker is the modern way to go, I provide three possible setups: With Docker (easy), Without Docker (Linux), Without Docker (Windows)

Inspirations

The world of computational molecule manipulation in 2026 is in a very advanced, if not, near perfect state. Also protein manipulations are covered to a near perfect state, just look at FASTA and the whole field of possible computations and software available. But peptide manipulations are in a tough spot. Why?

Technologies

Reinventing the wheel is not the way to go. I researched existing libraries to help me accelerate the development.

Frontend

  • React with Vite: Component-based architecture with HMR
  • Mantine: UI Components
  • Ketcher: Molecule Structure Editor developed by EPAM
  • RDKit-js: Molecular Structure Representation as SVGs

Backend

  • FastAPI: Modern ASGI framework
  • uvicorn: ASGI server implementation
  • Pydantic: Data validation library
  • SQLAlchemy with SQLite: ORM
  • RDKit: Cheminformatics tool for the manipulation of molecules

Setup With Docker

1. Clone the Repository

git clone https://github.com/Hebelag/peptide_optimizer.git
cd peptide_optimizer

2. Build the Images

The both Dockerfiles for backend and frontend already account for downloading the monomers (as written in Section "without Docker") and executing the initialize_database.py.

docker-compose up --build

3. Access Backend, Frontend, API endpoints

Backend: http://localhost:8000
Frontend: http://localhost:5173
API endpoints: http://localhost:8000/docs

Setup Without Docker

1. Download this repository and unpack

2. Backend: Create the virtual environment (venv) and install all needed libraries

  1. Change to the backend folder (cd backend)
  2. python -m venv .venv
  3. Activate environment: .\\.venv\Scripts\activate (You will see your powershell has a green "(venv)" prefix now)
  4. Install all libraries: pip install -e .

3. Monomer (Amino Acid Data) Download:

  1. Click this link to download ALL 40k+ monomers of the wwPDB (Size zip:28MB; Unzipped: 150MB as of Nov.2025)
  2. wwPDB-Link (Don't worry, no actual website will open, it will start the download immediately)
  3. Unzip and move the file (components-pub.sdf) to the /backend/data/monomers folder

4. Initialize database

  1. With the venv started in Step #2, execute python \src\database\initialize_db.py

5. Frontend: Install all needed libraries

  1. Change to the frontend folder (cd .. -> cd frontend)
  2. npm install

Run

Linux

  1. chmod +x startServer.sh && ./startServer.sh

Windows

  1. ./startServer.bat

Known Issues/Bugs

  • [Critical] Starting from MonomerEditor: Switching in the Navbar to PeptideEditor and Back results in MonomerEditor not finding the saved instance of KetcherEditor

Additional Info

Last updated: Feb 17th, 2026

About

Little (proprietary) webapp to generate/optimize a peptide for peptide-protein-complexes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors