How srichandra30/protein2smiles works
Protein2SMILES is a web application that predicts a molecular SMILES string from a protein sequence and returns a rendered structure image. The user enters a sequence in the React interface; its page submits it to Flask, which invokes the inference module and renders the returned string with RDKit. Inference uses a Transformer and the saved vocabularies and checkpoint. Source excerpts support this runtime flow; the tree also contains a training notebook, but its behavior is not sampled, so it is not mapped as a workflow.
Main entry points: predict.py SMILES inference · protein2smiles.jsx Sequence form · app.py Flask API · App.jsx App shell
Components 12
Web interface
- React entry
prot2smil/frontend/src/main.jsx - App shell
prot2smil/frontend/src/App.jsx - Sequence form
prot2smil/frontend/src/pages/protein2smiles.jsx - SMILES and image
prot2smil/frontend/src/pages/protein2smiles.jsx
Prediction API
- Flask API
prot2smil/backend/app.py
Model inference
- SMILES inference
prot2smil/backend/predict.py - Transformer model
prot2smil/backend/models/Transformer.py - Protein vocabulary
prot2smil/backend/utils/protein-vocab.pt - SMILES vocabulary
prot2smil/backend/utils/smiles-vocab.pt - Model checkpoint
prot2smil/backend/checkpoints/checkpoint.pth
Structure rendering
- RDKit
Other components
- User
Connections 12
- User → Sequence form: enters sequence
- React entry → App shell: renders
- App shell → Sequence form: mounts
- Sequence form → Flask API: posts sequence
- Flask API → SMILES inference: requests prediction
- SMILES inference → Protein vocabulary: loads vocabulary
- SMILES inference → SMILES vocabulary: loads vocabulary
- SMILES inference → Model checkpoint: loads weights
- SMILES inference → Transformer model: runs generation
- Flask API → RDKit: renders molecule
- Flask API → Sequence form: returns JSON
- Sequence form → SMILES and image: displays result