Retro-Blockblaster: Difference between revisions
| Line 182: | Line 182: | ||
SMTP_HOST=smtp.gmail.com | SMTP_HOST=smtp.gmail.com | ||
SMTP_PORT=587 | SMTP_PORT=587 | ||
SMTP_USER= | SMTP_USER=retro-blockbalster@gmail.com | ||
SMTP_PASSWORD=GOOGLE_APP_PASSWORD | SMTP_PASSWORD=GOOGLE_APP_PASSWORD | ||
FROM_EMAIL= | FROM_EMAIL=retro-blockbalster@gmail.com | ||
BASE_URL=http://epyc:8001 | BASE_URL=http://epyc:8001 | ||
</pre> | </pre> | ||
Revision as of 20:47, 29 June 2026
Retro-Blockbalster (BenZinc26)
Introduction
As of 6/29/26, Retro-Blockbalster is an internal Irwin Lab web tool for submitting a compound in SMILES format and receiving retro/analoging reaction results.
The current backend runs on Cluster 2 using epyc.
How to Login
Off Site
Start the portal SSH/SOCKS tunnel from your laptop:
ssh -vNL localhost:2222:gimel:22 -D1080 USER@portal3.ucsf.bkslab.org
Leave this terminal open.
In a second terminal, log into gimel:
ssh -p 2222 USER@localhost
Then log into epyc:
ssh epyc
Confirm location:
hostname
On Site
If on the UCSF/lab network, direct login may work:
ssh -o HostKeyAlgorithms=+ssh-rsa bromero@gimel.compbio.ucsf.edu ssh epyc
How to Open Website (MUST USE) With SwitchyOmega
Start the portal SSH/SOCKS tunnel:
ssh -vNL localhost:2222:gimel:22 -D1080 USER@portal3.ucsf.bkslab.org
In Chrome, set SwitchyOmega to:
Protocol: SOCKS5 Host: localhost Port: 1080
Then open:
http://epyc:8001
When finished, switch SwitchyOmega back to Direct.
Where The Website Lives
Project directory on epyc:
~/Initial-BenZinc26-website
Important files:
index.html run_job.py backend/server_old.py .env
.env Setup
SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=...@...com SMTP_PASSWORD=....(GOOGLE_APP_PASSWORD) FROM_EMAIL=...@....com
How to Start Backend
On epyc:
cd ~/Initial-BenZinc26-website python3 backend/server_old.py
The backend currently runs on:
http://0.0.0.0:8001
Test from epyc:
curl http://127.0.0.1:8001
How to Keep Backend Running
Use screen:
cd ~/Initial-BenZinc26-website screen -S benzinc26 python3 backend/server_old.py
Detach:
Ctrl-A D
Reconnect:
screen -r benzinc26
List screens:
screen -ls
Stop backend:
screen -r benzinc26 Ctrl-C exit
Test Input
A test molecule that returns reaction rows:
CN(C)C(=O)NC1=CC=CC=C1
Test with curl from epyc:
curl -X POST http://127.0.0.1:8001/hello-job \
-H "Content-Type: application/json" \
-d '{"user_input":"CN(C)C(=O)NC1=CC=CC=C1 urea_test","email":"your_email@gmail.com"}'
Environment
The backend needs a `.env` file in the project root.
Do not commit `.env` to GitHub.
Example:
SMTP_HOST=smtp.gmail.com SMTP_PORT=587 SMTP_USER=retro-blockbalster@gmail.com SMTP_PASSWORD=GOOGLE_APP_PASSWORD FROM_EMAIL=retro-blockbalster@gmail.com BASE_URL=http://epyc:8001
RDKit Environment
The retro reaction script uses RDKit through:
/nfs/exj/Fe/scripts/common_db/arthor-env/bin/python
Test on epyc:
/nfs/exj/Fe/scripts/common_db/arthor-env/bin/python -c "from rdkit import Chem; print('rdkit works')"
RDKit works on epyc. RDKit may fail on gimel.
Final Result
Web interface
Finished job
Troubleshooting
Site Cannot Be Reached
Check that:
- Backend is running on epyc.
- The SSH/SOCKS tunnel is running.
- SwitchyOmega is set to SOCKS5 localhost port 1080.
- The browser is using http://epyc:8001.
Port Already In Use
Check port 8001:
ss -ltnp | grep 8001
Only kill processes owned by you:
kill PID_NUMBER
Email Not Sending
Check that:
- `.env` exists.
- Gmail app password is correct.
- SMTP_USER and FROM_EMAIL are the same account.
- The app password belongs to that same account.
Notes
For office-wide use without SSH/SOCKS tunnels, Retro-Blockblaster will eventually be placed behind an internal hostname or proxy.