Retro-Blockblaster: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
 
(3 intermediate revisions by the same user not shown)
Line 3: Line 3:
== Introduction ==
== 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.
[[File:Web-interface.png|thumb]]
[[File:Ex._Results_.png|thumb]]
[[File:Example results.png|thumb]]
[[File:Ex results with building blocks.png|thumb]]


The current backend runs on Cluster 2 using epyc.
As of 7/13/26, Retro-Blockbalster is an internal Irwin Lab web tool for submitting a compound in SMILES format and receiving retro/analoging reaction results (also enumeration)--all info is from Chemistry Commons and uses RDKit.


== How to Login ==
The current backend runs on Cluster 2 using epyc (port 8001)


=== Off Site ===
== How to Open Website (MUST USE) With SwitchyOmega ==


Start the portal SSH/SOCKS tunnel from your laptop:
Start the portal SSH/SOCKS tunnel from your laptop:
Line 18: Line 21:


Leave this terminal open.
Leave this terminal open.
In a second terminal, log into gimel:
<pre>
ssh -p 2222 USER@localhost
</pre>
Then log into epyc:
<pre>
ssh epyc
</pre>
Confirm location:
<pre>
hostname
</pre>
=== On Site ===
If on the UCSF/lab network, direct login may work:
<pre>
ssh -o HostKeyAlgorithms=+ssh-rsa bromero@gimel.compbio.ucsf.edu
ssh epyc
</pre>
== How to Open Website (MUST USE) With SwitchyOmega ==
Start the portal SSH/SOCKS tunnel:
<pre>
ssh -vNL localhost:2222:gimel:22 -D1080 USER@portal3.ucsf.bkslab.org
</pre>


In Chrome, set SwitchyOmega to:
In Chrome, set SwitchyOmega to:
Line 67: Line 35:
http://epyc:8001
http://epyc:8001
</pre>
</pre>
When finished, switch SwitchyOmega back to Direct.


== Where The Website Lives ==
== Where The Website Lives ==
Line 183: Line 149:
SMTP_PORT=587
SMTP_PORT=587
SMTP_USER=retro-blockbalster@gmail.com
SMTP_USER=retro-blockbalster@gmail.com
SMTP_PASSWORD=GOOGLE_APP_PASSWORD
SMTP_PASSWORD=abcdefghijklmnop
FROM_EMAIL=retro-blockbalster@gmail.com
FROM_EMAIL=retro-blockbalster@gmail.com
BASE_URL=http://epyc:8001
BASE_URL=http://epyc:8001
Line 202: Line 168:
</pre>
</pre>


RDKit works on epyc. RDKit may fail on gimel.
RDKit works on epyc.
 
== Final Result ==
 
Web interface
 
[[File:Screenshot 2026-06-29 at 1.27.35 PM.png|thumb]]
 
Finished job
 
[[File:FinalJobEx.png|thumb]]


== Troubleshooting ==
== Troubleshooting ==
Line 247: Line 203:
* SMTP_USER and FROM_EMAIL are the same account.
* SMTP_USER and FROM_EMAIL are the same account.
* The app password belongs to that 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.

Latest revision as of 22:09, 13 July 2026

Retro-Blockbalster (BenZinc26)

Introduction

Web-interface.png
Ex. Results .png
Example results.png
Ex results with building blocks.png

As of 7/13/26, Retro-Blockbalster is an internal Irwin Lab web tool for submitting a compound in SMILES format and receiving retro/analoging reaction results (also enumeration)--all info is from Chemistry Commons and uses RDKit.

The current backend runs on Cluster 2 using epyc (port 8001)

How to Open Website (MUST USE) With SwitchyOmega

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 Chrome, set SwitchyOmega to:

Protocol: SOCKS5
Host: localhost
Port: 1080

Then open:

http://epyc:8001

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=abcdefghijklmnop
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.

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.