<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.docking.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zdingman</id>
	<title>DISI - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.docking.org/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Zdingman"/>
	<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Special:Contributions/Zdingman"/>
	<updated>2026-08-24T18:32:52Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>http://wiki.docking.org/index.php?title=ADMET_Builder&amp;diff=17430</id>
		<title>ADMET Builder</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=ADMET_Builder&amp;diff=17430"/>
		<updated>2026-07-24T22:20:31Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Updated env paths for all users&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= ADMET Builder (OpenADMET) =&lt;br /&gt;
&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
As of 7/6/26, &#039;&#039;&#039;ADMET Builder&#039;&#039;&#039; is an internal Irwin Lab web tool for submitting one or more compounds in SMILES format and receiving OpenADMET prediction results.&lt;br /&gt;
&lt;br /&gt;
The current backend runs on C7 using the `openadmet-models` conda environment.&lt;br /&gt;
&lt;br /&gt;
ADMET Builder returns:&lt;br /&gt;
&lt;br /&gt;
* Molecular formula&lt;br /&gt;
* SMILES string&lt;br /&gt;
* RDKit-generated 2D structure image&lt;br /&gt;
* logD&lt;br /&gt;
* Caco-2 A to B permeability&lt;br /&gt;
* Caco-2 B to A permeability&lt;br /&gt;
* Mouse plasma protein binding&lt;br /&gt;
* Human plasma protein binding&lt;br /&gt;
* Downloadable CSV output&lt;br /&gt;
&lt;br /&gt;
[[File:ADMET builder.png|thumb]]&lt;br /&gt;
[[File:ADMET builder results.png|thumb]]&lt;br /&gt;
&lt;br /&gt;
Created by Benjamin &amp;quot;Ben&amp;quot; Romero (Undergrad Northwestern University &#039;29), Summer 2026.&amp;lt;br&amp;gt;&lt;br /&gt;
Developed in the Irwin Lab at UCSF.&lt;br /&gt;
&lt;br /&gt;
== How to Login ==&lt;br /&gt;
&lt;br /&gt;
Log into C7:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh USER@epsilon.compbio.ucsf.edu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If you do not have access to C7, you can [[Cluster 7|find more information here]].&lt;br /&gt;
&lt;br /&gt;
== How to Open Website With SwitchyOmega ==&lt;br /&gt;
&lt;br /&gt;
If using SwitchyOmega, use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Protocol: SOCKS5&lt;br /&gt;
Host: localhost&lt;br /&gt;
Port: 1074&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then open:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://169.230.26.173:8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the SOCKS proxy is not running, start it from a terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -f -N -D 1074 USER@epsilon.compbio.ucsf.edu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
When finished, switch SwitchyOmega back to Direct.&lt;br /&gt;
&lt;br /&gt;
== Where The Website Lives ==&lt;br /&gt;
&lt;br /&gt;
Project directory on C7:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
/nfs/home/bromero/openadmet/admet-builder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Important files:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
app.py&lt;br /&gt;
static/index.html&lt;br /&gt;
static/styles.css&lt;br /&gt;
static/app.js&lt;br /&gt;
.gitignore&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Repository ==&lt;br /&gt;
&lt;br /&gt;
GitLab repository:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
https://gitlab.docking.org/USERNAME/admet-builder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone using HTTPS:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone https://gitlab.docking.org/USERNAME/admet-builder.git&lt;br /&gt;
cd admet-builder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Clone using SSH:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
git clone git@gitlab.docking.org:USERNAME/admet-builder.git&lt;br /&gt;
cd admet-builder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Environment ==&lt;br /&gt;
&lt;br /&gt;
The backend uses the OpenADMET conda environment:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load anaconda3/2025.06.0&lt;br /&gt;
source &amp;quot;$(conda info --base)/etc/profile.d/conda.sh&amp;quot;&lt;br /&gt;
conda activate /nfs/home/bromero/.conda/envs/openadmet-models/&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Python dependencies include:&lt;br /&gt;
&lt;br /&gt;
* Flask&lt;br /&gt;
* pandas&lt;br /&gt;
* RDKit&lt;br /&gt;
* OpenADMET models package&lt;br /&gt;
&lt;br /&gt;
The OpenADMET model directory is expected at:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
~/openadmet/permeability-logd-ppb-chemeleon-baseline/anvil_training&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to Start Backend ==&lt;br /&gt;
&lt;br /&gt;
On C7:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load anaconda3/2025.06.0&lt;br /&gt;
source &amp;quot;$(conda info --base)/etc/profile.d/conda.sh&amp;quot;&lt;br /&gt;
conda activate /nfs/home/bromero/.conda/envs/openadmet-models/&lt;br /&gt;
cd /nfs/home/bromero/openadmet/admet-builder&lt;br /&gt;
python app.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The backend runs on:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://0.0.0.0:8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The browser URL is:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://169.230.26.173:8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Test from C7:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl http://127.0.0.1:8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== How to Keep Backend Running ==&lt;br /&gt;
&lt;br /&gt;
Use screen:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
screen -S admet-builder&lt;br /&gt;
module load anaconda3/2025.06.0&lt;br /&gt;
source &amp;quot;$(conda info --base)/etc/profile.d/conda.sh&amp;quot;&lt;br /&gt;
conda activate /nfs/home/bromero/.conda/envs/openadmet-models/&lt;br /&gt;
cd /nfs/home/bromero/openadmet/admet-builder&lt;br /&gt;
python app.py&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Detach:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Ctrl-A&lt;br /&gt;
D&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Reconnect:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
screen -r admet-builder&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
List screens:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
screen -ls&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Stop backend:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
screen -r admet-builder&lt;br /&gt;
Ctrl-C&lt;br /&gt;
exit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test Input ==&lt;br /&gt;
&lt;br /&gt;
Example SMILES input:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CCO&lt;br /&gt;
c1ccccc1&lt;br /&gt;
CC(=O)Oc1ccccc1C(=O)O&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Larger test molecule:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
CC(C)Cc1ccc(cc1)[C@@H](C)C(=O)O&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Test API With curl ==&lt;br /&gt;
&lt;br /&gt;
Test the API from C7:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
curl -X POST http://127.0.0.1:8501/predict-smiles \&lt;br /&gt;
  -H &amp;quot;Content-Type: application/json&amp;quot; \&lt;br /&gt;
  -d &#039;{&amp;quot;smiles&amp;quot;:[&amp;quot;CCO&amp;quot;,&amp;quot;c1ccccc1&amp;quot;,&amp;quot;CC(=O)Oc1ccccc1C(=O)O&amp;quot;]}&#039;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Current API Endpoint ==&lt;br /&gt;
&lt;br /&gt;
Main endpoint:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
POST /predict-smiles&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example JSON request:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;smiles&amp;quot;: [&lt;br /&gt;
    &amp;quot;CCO&amp;quot;,&lt;br /&gt;
    &amp;quot;c1ccccc1&amp;quot;,&lt;br /&gt;
    &amp;quot;CC(=O)Oc1ccccc1C(=O)O&amp;quot;&lt;br /&gt;
  ]&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example response contains:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
{&lt;br /&gt;
  &amp;quot;csv&amp;quot;: &amp;quot;...&amp;quot;,&lt;br /&gt;
  &amp;quot;rows&amp;quot;: [],&lt;br /&gt;
  &amp;quot;columns&amp;quot;: []&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The frontend uses this response to display the results table and automatically download the CSV.&lt;br /&gt;
&lt;br /&gt;
== How It Works ==&lt;br /&gt;
&lt;br /&gt;
ADMET Builder has three major parts:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Layer&lt;br /&gt;
! Technology&lt;br /&gt;
! Purpose&lt;br /&gt;
|-&lt;br /&gt;
| Frontend&lt;br /&gt;
| HTML, CSS, JavaScript&lt;br /&gt;
| User interface, SMILES input, results table, and structure image display&lt;br /&gt;
|-&lt;br /&gt;
| Backend API&lt;br /&gt;
| Flask&lt;br /&gt;
| Receives SMILES, runs predictions, and returns results&lt;br /&gt;
|-&lt;br /&gt;
| Prediction Engine&lt;br /&gt;
| OpenADMET&lt;br /&gt;
| Generates ADMET predictions from molecular input&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Backend flow:&lt;br /&gt;
&lt;br /&gt;
# Receives SMILES strings from the website.&lt;br /&gt;
# Converts the SMILES into a temporary CSV file.&lt;br /&gt;
# Runs the OpenADMET command-line prediction tool.&lt;br /&gt;
# Reads the OpenADMET output CSV.&lt;br /&gt;
# Uses RDKit to calculate molecular formulas.&lt;br /&gt;
# Uses RDKit to generate 2D molecular structure images.&lt;br /&gt;
# Sends results back to the web interface as JSON.&lt;br /&gt;
# Provides the same results as a downloadable CSV file.&lt;br /&gt;
&lt;br /&gt;
== Modularity ==&lt;br /&gt;
&lt;br /&gt;
ADMET Builder is modular by design. The frontend, backend, and prediction engine are separated so each part can be reused or replaced.&lt;br /&gt;
&lt;br /&gt;
This means:&lt;br /&gt;
&lt;br /&gt;
* The frontend can be redesigned without changing the model logic.&lt;br /&gt;
* The Flask backend can support new endpoints.&lt;br /&gt;
* Additional OpenADMET models can be added later.&lt;br /&gt;
* Other chemistry tools can be wrapped using the same backend pattern.&lt;br /&gt;
* The results table can be adapted for different prediction outputs.&lt;br /&gt;
* The SMILES-to-structure display can be reused in other cheminformatics apps.&lt;br /&gt;
* The app can serve as a template for future scientific web interfaces.&lt;br /&gt;
&lt;br /&gt;
Because of this structure, ADMET Builder can be used both as a working lab tool and as a starting point for other modular research software.&lt;br /&gt;
&lt;br /&gt;
== Output ==&lt;br /&gt;
&lt;br /&gt;
The output table includes:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! Column&lt;br /&gt;
! Meaning&lt;br /&gt;
|-&lt;br /&gt;
| Molecule&lt;br /&gt;
| Molecular formula calculated from the SMILES string&lt;br /&gt;
|-&lt;br /&gt;
| SMILES&lt;br /&gt;
| Input molecule string&lt;br /&gt;
|-&lt;br /&gt;
| Structure Image&lt;br /&gt;
| RDKit-generated 2D molecular structure&lt;br /&gt;
|-&lt;br /&gt;
| logD&lt;br /&gt;
| Predicted distribution coefficient&lt;br /&gt;
|-&lt;br /&gt;
| Caco-2 A to B&lt;br /&gt;
| Predicted apical-to-basolateral permeability&lt;br /&gt;
|-&lt;br /&gt;
| Caco-2 B to A&lt;br /&gt;
| Predicted basolateral-to-apical permeability&lt;br /&gt;
|-&lt;br /&gt;
| Mouse PPB&lt;br /&gt;
| Predicted mouse plasma protein binding&lt;br /&gt;
|-&lt;br /&gt;
| Human PPB&lt;br /&gt;
| Predicted human plasma protein binding&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
The CSV download contains the same prediction values in a machine-readable format.&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
=== Site Cannot Be Reached ===&lt;br /&gt;
&lt;br /&gt;
Check that:&lt;br /&gt;
&lt;br /&gt;
* Backend is running on C7.&lt;br /&gt;
* The app is running on port 8501.&lt;br /&gt;
* SwitchyOmega is set to SOCKS5 localhost port 1074.&lt;br /&gt;
* The browser is using:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
http://169.230.26.173:8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== SwitchyOmega Proxy Error ===&lt;br /&gt;
&lt;br /&gt;
If Chrome says the proxy failed, the SOCKS proxy may not be running.&lt;br /&gt;
&lt;br /&gt;
Start it from a Mac terminal:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ssh -f -N -D 1074 USER@epsilon.compbio.ucsf.edu&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
SwitchyOmega should be:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Protocol: SOCKS5&lt;br /&gt;
Host: localhost&lt;br /&gt;
Port: 1074&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Port Already In Use ===&lt;br /&gt;
&lt;br /&gt;
Check port 8501:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ss -ltnp | grep 8501&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Only kill processes owned by you:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
kill PID_NUMBER&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Missing pandas or Flask ===&lt;br /&gt;
&lt;br /&gt;
This usually means the conda environment is not active.&lt;br /&gt;
&lt;br /&gt;
Run:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
module load anaconda3/2025.06.0&lt;br /&gt;
source &amp;quot;$(conda info --base)/etc/profile.d/conda.sh&amp;quot;&lt;br /&gt;
conda activate openadmet-models&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== RDKit Image Error ===&lt;br /&gt;
&lt;br /&gt;
Make sure the app is running inside the `openadmet-models` environment, which includes RDKit.&lt;br /&gt;
&lt;br /&gt;
Test RDKit:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
python -c &amp;quot;from rdkit import Chem; print(&#039;rdkit works&#039;)&amp;quot;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
ADMET Builder is a research tool. Its predictions are intended for screening, comparison, prioritization, and exploration.&lt;br /&gt;
&lt;br /&gt;
Results should not be treated as experimental measurements.&lt;br /&gt;
&lt;br /&gt;
For office-wide use without SSH/SOCKS tunnels, ADMET Builder should eventually be placed behind an internal hostname or proxy.&lt;br /&gt;
&lt;br /&gt;
== Attribution ==&lt;br /&gt;
&lt;br /&gt;
Created by Benjamin &amp;quot;Ben&amp;quot; Romero (Undergrad Northwestern University &#039;29), Summer 2026.&amp;lt;br&amp;gt;&lt;br /&gt;
Developed in the Irwin Lab at UCSF.&amp;lt;br&amp;gt;&lt;br /&gt;
Released as part of an open-source UCSF research tool; please credit the creator and lab when using or adapting this work.&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Init_partitioned_search.py_(aka_Search_zinc22.py)&amp;diff=17325</id>
		<title>Init partitioned search.py (aka Search zinc22.py)</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Init_partitioned_search.py_(aka_Search_zinc22.py)&amp;diff=17325"/>
		<updated>2026-06-22T18:51:11Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: corrected get_vendors argument. Does vendor-search still exist??&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Description ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
usage: init_partitioned_search.py [-i] input_file [-o] results_out [--get-vendors] [-s] &lt;br /&gt;
&lt;br /&gt;
search for smiles and vendor codes by zinc22 id&lt;br /&gt;
&lt;br /&gt;
required arguments:&lt;br /&gt;
  input_file            file containing list of zinc ids or vendor codes to look up&lt;br /&gt;
  results_out           destination for output directory&lt;br /&gt;
&lt;br /&gt;
optional arguments:&lt;br /&gt;
  -h, --help            show this help message and exit&lt;br /&gt;
  --vendor-search       look up molecules by vendor code instead of zinc id&lt;br /&gt;
  --get_vendors         get vendor supplier codes associated with zinc id&lt;br /&gt;
  -s                    submit slurm jobs and start the search process, can be omitted if you are only looking to split a list of molecules into tranches&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
init_partitioned_search.py is a script that replaces search_zinc22.py for looking up zinc ids on the zinc22 system in a more efficient manner. The operation is simple- provide a file containing a list of zincids and the script will split the input into tranches for search across all zinc22 databases. &lt;br /&gt;
&lt;br /&gt;
The output format is as follows:&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
SMILES ZINC_ID TRANCHE_NAME&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
With --get_vendors or --vendor-search the output format looks like this:&lt;br /&gt;
&lt;br /&gt;
SMILES ZINC_ID VENDOR_ID TRANCHE_NAME CATALOG&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Meaning the script will find all vendor information and smiles associated with the provided zinc ids or vendor codes.&lt;br /&gt;
&lt;br /&gt;
=== Location ===&lt;br /&gt;
&lt;br /&gt;
You can activate the environment, using &lt;br /&gt;
  source /nfs/soft/zinc22/search_zinc/miniconda/bin/activate zinc22_search &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Side note about slow queries&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Depending on the molecules you happen to be looking up, your search may go by very quickly, or somewhat slowly. Smaller molecules tend to look up very quickly, while larger molecules take longer to find. We&#039;re working on it.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tracking Progress&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
After submitting the search, you can look at the slurm queue to see the status of your job. Jobs will be labeled &#039;search_zinc22&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Using Output&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
When all jobs are done, the output folder will have input files, log files, and .results files. If results files are missing for a tranche, refer to the logs to learn more or contact the JJI team for troubleshooting. You can merge all results together in a file with a simple command&lt;br /&gt;
  cat *.results &amp;gt; yourresultsfile.txt&lt;br /&gt;
&lt;br /&gt;
=== Usage w/ Bash on BKS cluster ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
source /nfs/soft/zinc22/search_zinc/miniconda/bin/activate /nfs/soft/zinc22/search_zinc/miniconda/envs/zinc22_search&lt;br /&gt;
python /nfs/soft/zinc22/search_zinc/init_partitioned_search.py -i /path/to/input/file -o /path/to/output/folder -s&lt;br /&gt;
python /nfs/soft/zinc22/search_zinc/init_partitioned_search.py -i /path/to/input/file -o /path/to/output/folder -s --get_vendors&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
=== Usage w/ Csh on BKS cluster ===&lt;br /&gt;
&lt;br /&gt;
This version of the tool is currently only compatible with Bash. &lt;br /&gt;
&lt;br /&gt;
=== Dealing with NULL ===&lt;br /&gt;
Sometimes a ZINC ID will fail to look up. This could be because a server is down (the script will notify you if this is the case), or because the ID is missing from the system for some reason. In this case, it may be helpful to separate the molecules that didn&#039;t look up from the molecules that did. You may want to save them for later when the servers come back online, or to run a deeper search with comb_legacy_files.py (more on this below).&lt;br /&gt;
&lt;br /&gt;
How to:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[env]$ cat legitimate_ids.txt &amp;gt; input.txt&lt;br /&gt;
[env]$ echo ZINCzz00ZZZZZZZZ &amp;gt;&amp;gt; input.txt&lt;br /&gt;
[env]$ echo ZINCyy00AAAAAAAA &amp;gt;&amp;gt; input.txt&lt;br /&gt;
[env]$ echo ZINCxx00BBBBBBBB &amp;gt;&amp;gt; input.txt&lt;br /&gt;
[env]$ python search_zinc.py input.txt output.txt&lt;br /&gt;
Searching Zinc22:  |XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX| 100.0%  0.00s 23/23 complete!&lt;br /&gt;
[env]$ grep &amp;quot;_null_&amp;quot; output.txt&lt;br /&gt;
_null_ ZINCzz00ZZZZZZZZ H33P270&lt;br /&gt;
_null_ ZINCyy00AAAAAAAA H34P280&lt;br /&gt;
_null_ ZINCxx00BBBBBBBB H35P290&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
search_zinc.py will not omit IDs that don&#039;t look up from the output, instead it will return the zinc id with &amp;quot;_null_&amp;quot; in every other field. Therefore we can use grep to filter our results.&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
[env]$ grep &amp;quot;_null_&amp;quot; output.txt &amp;gt; missing.txt&lt;br /&gt;
[env]$ grep -v &amp;quot;_null_&amp;quot; output.txt &amp;gt; found.txt&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
It should be very infrequent that ZINC IDs don&#039;t look up, but if this happens you can use the following script:&lt;br /&gt;
&lt;br /&gt;
=== comb_legacy_files.py ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
python3 /mnt/nfs/home/xyz/btingle/bin/2dload.testing/utils-2d/tin/misc/comb_legacy_files.py [INPUT_ZINC_IDS_FILE]&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You don&#039;t need to source any particular python 3 environment for this script, but the environment used for search_zinc22.py will work just fine here.&lt;br /&gt;
&lt;br /&gt;
This script will comb through our deprecated files and attempt to locate your ZINC IDs there. This script will create a file called &amp;quot;result&amp;quot; in your current directory containing all the smiles found.&lt;br /&gt;
&lt;br /&gt;
If you&#039;re looking from vendor information, you can look up the SMILES you get back in arthor/smallworld sets to find vendor codes. Functionality is planned in search_zinc22.py for looking up by SMILES, but not implemented yet.&lt;br /&gt;
&lt;br /&gt;
If after this you&#039;re STILL unable to find your zinc ids, you can send them to our development team and we will find them for you.&lt;br /&gt;
&lt;br /&gt;
Email ben@tingle.org, ccing khtang015@gmail.com and josecastanon4@gmail.com. Include your missing file as an attachment.&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Filter_xREAL_by_Heavy_Atom_Count&amp;diff=17275</id>
		<title>Filter xREAL by Heavy Atom Count</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Filter_xREAL_by_Heavy_Atom_Count&amp;diff=17275"/>
		<updated>2026-05-12T22:29:18Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: updated path&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preface ===&lt;br /&gt;
&lt;br /&gt;
I wrote this quick tool to grab molecules below HAC19 from the xREAL database on Wynton. Since the database is &amp;gt;1 trillion compounds, I wanted to avoid the entire RDKit molecule build process if at all possible. The code removes every non-alphabetical character, lowercase letters, and the letter &#039;H&#039; from a SMILES string. This leaves a list of &amp;quot;atoms&amp;quot;, which can be counted to give the HAC for a compound. Assuming the HAC count falls within the specified bounds, the entire smi line is written out.&lt;br /&gt;
&lt;br /&gt;
I&#039;m assuming that the location of xREAL remains the same on disk, and that we never ever add any more compounds to xREAL. These are solid assumptions, and absolutely never ever going to be incorrect.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
1. Copy the script to your working directory, and make a log dir: &lt;br /&gt;
 cd /wynton/group/bks/work/zdingman/GAT1/zwitterion_scratch/zwitterion_scripts/HAC_filter_xREAL.sh .&lt;br /&gt;
 mkdir logs&lt;br /&gt;
2. Modify the header variables defined in the header: &#039;&#039;HACMIN&#039;&#039;, &#039;&#039;HACMAX&#039;&#039;, &#039;&#039;outpath&#039;&#039;. (When xREAL inevitably changes locations, modify &#039;&#039;inpath&#039;&#039; as well.&lt;br /&gt;
&lt;br /&gt;
3. Submit the job to run:&lt;br /&gt;
 qsub HAC_filter_xREAL.sh&lt;br /&gt;
&lt;br /&gt;
Run time dependent on the Wynton queue. Anecdotally seems to run to completion overnight with no issues. Each job seems to take roughly 40 minutes (aka, frustratingly too long for the short cpu queue)&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17259</id>
		<title>How to Use SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17259"/>
		<updated>2026-05-06T19:44:21Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to submit a list of SMILES formatted molecules for exhaustive analog searching.&lt;br /&gt;
&lt;br /&gt;
SWAG produces two output files: output_ascores.csv and output_responses.csv. The first file contains each query molecule from the input, as well as the corresponding number of analogs found within the database. The second file lists every analog found for every query molecule, and includes the SMILES, name, and edit distance.&lt;br /&gt;
&lt;br /&gt;
== Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
SWAG must be run on one either epyc/epyc2, and will not run on gimel/gimel2/etc. To run SWAG in a working directory, use the following commands:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  python SWAG.py [arguments]&lt;br /&gt;
&lt;br /&gt;
SWAG has several requirements that must be specified at run time. These are:&lt;br /&gt;
&lt;br /&gt;
* The input smiles file, given with -f [YOUR_INPUT.smi]&lt;br /&gt;
* The prefix for output files, given with -o [YOUR_OUTPUT]&lt;br /&gt;
* The database for querying, given with -d [DATABASE_NAME]&lt;br /&gt;
* The maximum distance, given with -p [NUMBER]&lt;br /&gt;
&lt;br /&gt;
If we wanted to find all the compounds in ZINC22, within 4 edits of the compounds listed in our file ligands.smi, we would run the following command:&lt;br /&gt;
  python SWAG.py -f ligands.smi -o ligands -d ZINC22 -p [4]&lt;br /&gt;
&lt;br /&gt;
== Database Selection ==&lt;br /&gt;
&lt;br /&gt;
The databases used by SmallWorld are (in most cases) pre-computed by the Irwin lab for our usage, and are hard-coded into the python environment we source. The following are available to query with SWAG:&lt;br /&gt;
&lt;br /&gt;
* 480K: 480 thousand building blocks from ChemSpace&lt;br /&gt;
* Accessible-BB: 94 million building blocks from ChemSpace + Enamine FastMADE&lt;br /&gt;
* REAL: 70 billion compounds from 2024 Enamine REAL Space&lt;br /&gt;
* ZINC22: 96 billion commercial compounds listed in ZINC22&lt;br /&gt;
* local: Checks the current directory for a local mapfile called &#039;local.anon.map&#039;&lt;br /&gt;
&lt;br /&gt;
Unlike the first four databases that refer to existing databases, specifying &#039;local&#039; will search the current working directory for a map file. This is useful if you have a specific list of molecules that you want to search within. For example, you can search your top million docking vActives to find close analogs of your selected hits, or search a list of compounds from Infinisee/xREAL to find analogs by edit distance. You can read more at [[Using SWAG to filter analogs by Graph Edit Distance]].&lt;br /&gt;
&lt;br /&gt;
== Advanced Usage ==&lt;br /&gt;
&lt;br /&gt;
By default, SWAG takes a single integer value for the distance parameter. However, you can also pass a list of 7 integers instead as [d,d,d,d,d,d,d] which corresponds to the maximum allowed number of edits for each of the following:&lt;br /&gt;
&lt;br /&gt;
* Maximum distance&lt;br /&gt;
* Ring count additions&lt;br /&gt;
* Ring count removals&lt;br /&gt;
* Linker length additions&lt;br /&gt;
* Linker length removals&lt;br /&gt;
* Terminal group additions&lt;br /&gt;
* Terminal group removals&lt;br /&gt;
&lt;br /&gt;
SmallWorld will return similar compounds, beginning with the fewest number of ring/linker/terminal modifications, up to the maximum distance specified for both specific changes and overall distance.&lt;br /&gt;
&lt;br /&gt;
Additional runtime flags are as follows:&lt;br /&gt;
&lt;br /&gt;
--skipInputStandardization&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
--storeQueryTime&lt;br /&gt;
&lt;br /&gt;
By default, input SMILES are converted to the uncharged parent version of their largest species. Recommended to use input standardization. Otherwise, similar molecules may not be found due to differing counterions or protonation state. &lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
By default, SWAG does not write the per-query search time. If you would like to output the max_dist and query_time to ascores.csv, use the storeQueryTime flag.&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
SWAG is built using the Cython wrapper for the SmallWorld C++ API, which relies on the gnu c compiler (GCC) to run. If running SWAG.py returns &amp;quot;ImportError: CXXABI_1.3.9 not found&amp;quot; then you must use a machine with an updated GCC version. On the Shoichet cluster, these machines are epyc and epyc2.&lt;br /&gt;
&lt;br /&gt;
For further details on SmallWorld, please see the official documentation:&lt;br /&gt;
https://www.nextmovesoftware.com/downloads/smallworld/documentation/&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]] [[Category:SWAG]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Category:SWAG&amp;diff=17258</id>
		<title>Category:SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Category:SWAG&amp;diff=17258"/>
		<updated>2026-05-06T19:44:05Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created blank page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17257</id>
		<title>Using SWAG to search smaller vendors</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17257"/>
		<updated>2026-05-06T19:43:04Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In addition to the included databases that SWAG can search by default ([[How to Use SWAG|see here]]), it is possible to search any other database with a SmallWorld mapping. Recent interest has been expressed by multiple lab members in searching the vendor OnePot&#039;s CORE database for potential compounds to purchase. The below instructions describe how to search OnePot specifically, but can be adapted for any other vendor whose catalog has been mapped with SmallWorld.&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
Connect to either epyc or epyc2 on the lab cluster. Make a working directory in the location of your choice, open that directory, and copy query.smi (your SMILES of interest) into the directory. Copy and paste the following code:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/SWAG.py .&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map local.anon.map&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map.blm local.anon.map.blm&lt;br /&gt;
  python SWAG.py -f query.smi -o lookup -d local -p [0]&lt;br /&gt;
&lt;br /&gt;
SWAG will begin to lookup your SMILES. The file lookup_responses.csv contains the compounds that were successfully found in the vendor&#039;s catalog. Don&#039;t be surprised if the coverage is subpar for larger compounds; at larger HAC tranches, the overlap between ZINC22 and OnePot is fairly minimal.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
- If you&#039;re willing to explore single-atom changes, you can instead specify -p [1] when running SWAG.&lt;br /&gt;
&lt;br /&gt;
- The above instructions here make use of SWAG&#039;s local map feature. More detail and uses for local maps can be [[Using SWAG to filter analogs by Graph Edit Distance|found here]].&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]] [[Category:SWAG]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_SWAG_to_filter_analogs_by_Graph_Edit_Distance&amp;diff=17256</id>
		<title>Using SWAG to filter analogs by Graph Edit Distance</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_SWAG_to_filter_analogs_by_Graph_Edit_Distance&amp;diff=17256"/>
		<updated>2026-05-06T19:42:50Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to exhaustively find all small-change analogs for a given compound within a larger set of compounds. SWAG can be used to help filter lists of analogs created through other means (ex: fingerprint-based searches, docking hit lists, generative chemistry, enumerated spaces). We can take these larger lists, and use SWAG to filter for compounds differing by a discrete number of graph edits.&lt;br /&gt;
&lt;br /&gt;
Following the procedure described here will ultimately output a list of analogs and their individual graph edit distances, relative to the compound(s) you&#039;re querying.&lt;br /&gt;
&lt;br /&gt;
For a general overview of using SWAG, see [[How to Use SWAG]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 1: Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Connect to epyc/epyc2, and create a working directory. Copy your list of SMILES-formatted molecules -- `analog_space.smi` -- to the working directory. Run the following:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/GED/make_localmap.sh .&lt;br /&gt;
  sh make_localmap.sh analog_space.smi&lt;br /&gt;
&lt;br /&gt;
Doing this will generate several files:&lt;br /&gt;
&lt;br /&gt;
unmapped.txt -- A list of SMILES that were unable to be mapped. Very rarely are SMILES unable to be mapped.&lt;br /&gt;
&lt;br /&gt;
local.anon.map -- The unique map of your chemical space onto the larger SmallWorld index.&lt;br /&gt;
&lt;br /&gt;
local.anon.map.blm -- A bloom filter used by SmallWorld to accelerate searches. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2: Filtering with SWAG ==&lt;br /&gt;
&lt;br /&gt;
Filtering is straight-forward after we generate the map file from our analog space. Create the file `queries.smi`, which contains the compound(s) you want to find near analogs of in your locally mapped list of analogs. Run the below command. Note that the value in brackets corresponds to the maximum number of graph edits before the search is terminated. Generally, a distance of 2-4 is recommended. Distances greater than 7 are not supported.&lt;br /&gt;
&lt;br /&gt;
  python SWAG.py -f queries.smi -o queries -d local -p [2]&lt;br /&gt;
&lt;br /&gt;
The following output files are generated:&lt;br /&gt;
&lt;br /&gt;
queries_ascores.csv -- The number of analogs that were found, for each queried molecule.&lt;br /&gt;
&lt;br /&gt;
queries_responses.csv -- A list of all analogs that were found, for each queried molecule. Columns correspond to the original query name/smiles, and the analog name/smiles/graph edit distance.&lt;br /&gt;
&lt;br /&gt;
You can create a SMILES-formatted list of your small-change analogs with the following command:&lt;br /&gt;
&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $5 &amp;quot; &amp;quot; $4}&#039; queries_responses.csv &amp;gt; near_analogs.smi&lt;br /&gt;
&lt;br /&gt;
== Useful flags ==&lt;br /&gt;
&lt;br /&gt;
The below flags may be of use when analoging, depending on whether you&#039;re at the point of considering stereochemistry in your project.&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]] [[Category:SWAG]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17255</id>
		<title>Using SWAG to search smaller vendors</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17255"/>
		<updated>2026-05-06T19:37:30Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In addition to the included databases that SWAG can search by default ([[How to Use SWAG|see here]]), it is possible to search any other database with a SmallWorld mapping. Recent interest has been expressed by multiple lab members in searching the vendor OnePot&#039;s CORE database for potential compounds to purchase. The below instructions describe how to search OnePot specifically, but can be adapted for any other vendor whose catalog has been mapped with SmallWorld.&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
Connect to either epyc or epyc2 on the lab cluster. Make a working directory in the location of your choice, open that directory, and copy query.smi (your SMILES of interest) into the directory. Copy and paste the following code:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/SWAG.py .&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map local.anon.map&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map.blm local.anon.map.blm&lt;br /&gt;
  python SWAG.py -f query.smi -o lookup -d local -p [0]&lt;br /&gt;
&lt;br /&gt;
SWAG will begin to lookup your SMILES. The file lookup_responses.csv contains the compounds that were successfully found in the vendor&#039;s catalog. Don&#039;t be surprised if the coverage is subpar for larger compounds; at larger HAC tranches, the overlap between ZINC22 and OnePot is fairly minimal.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
- If you&#039;re willing to explore single-atom changes, you can instead specify -p [1] when running SWAG.&lt;br /&gt;
&lt;br /&gt;
- The above instructions here make use of SWAG&#039;s local map feature. More detail and uses for local maps can be [[Using SWAG to filter analogs by Graph Edit Distance|found here]].&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17254</id>
		<title>Using SWAG to search smaller vendors</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_SWAG_to_search_smaller_vendors&amp;diff=17254"/>
		<updated>2026-05-06T19:36:02Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;In addition to the included databases that SWAG can search by default ([[How to Use SWAG|see here]]), it is possible to search any other database with a SmallWorld mapping. Recent interest has been expressed by multiple lab members in searching the vendor OnePot&#039;s CORE database for potential compounds to purchase. The below instructions describe how to search OnePot specifically, but can be adapted for any other vendor whose catalog has been mapped with SmallWorld.&lt;br /&gt;
&lt;br /&gt;
== Instructions ==&lt;br /&gt;
&lt;br /&gt;
Connect to either epyc or epyc2 on the lab cluster. Make a working directory in the location of your choice, open that directory, and copy query.smi (your SMILES of interest) into the directory. Copy and paste the following code:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1_3_0/SWAG.py .&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map local.anon.map&lt;br /&gt;
  ln -s /nfs/db5/newdb/Purchasable/maps/onDemandPlus/onepot-tst.smi.anon.map.blm local.anon.map.blm&lt;br /&gt;
  python SWAG.py -f query.smi -o lookup -d local -p [0]&lt;br /&gt;
&lt;br /&gt;
SWAG will begin to lookup your SMILES. The file lookup_responses.csv contains the compounds that were successfully found in the vendor&#039;s catalog. Don&#039;t be surprised if the coverage is subpar for larger compounds; at larger HAC tranches, the overlap between ZINC22 and OnePot is fairly minimal.&lt;br /&gt;
&lt;br /&gt;
== Notes ==&lt;br /&gt;
&lt;br /&gt;
- If you&#039;re willing to explore single-atom changes, you can instead specify -p [1] when running SWAG.&lt;br /&gt;
&lt;br /&gt;
- The above instructions here make use of SWAG&#039;s local map feature. More detail and uses for local maps can be [[Using SWAG to filter analogs by Graph Edit Distance|found here]].&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17155</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17155"/>
		<updated>2026-04-11T01:04:55Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: added instructions for getting poses.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 mkdir post_LSD&lt;br /&gt;
 cd post_LSD&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be renamed &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir prep_poses&lt;br /&gt;
  cd prep_poses&lt;br /&gt;
  cp [/path/to/poses/*mol2] .&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
[Note: It takes about 6 hours to fingerprint a file with 2000 molecules in it. Tia and Andrii both have splitting scripts; if you want to combine all your mol2 files and split them into smaller chunks, now would be the time. Alternatively, just use the original poses_extract mol2, but note that the larger # of poses per file will take a bit longer.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are renamed, relocate them to your working directory. This is necessary (you can&#039;t soft link them). Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.all.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
  ssh gimel&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/IFP/get_fingerprints_bfc.py .&lt;br /&gt;
  source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh&lt;br /&gt;
  python2 get_fingerprints_bfc.py *smi [OUTPUT_NAME] [MIN_TC_SIM_IN_CLUSTER] [MAX_NUM_CLUSTERS]&lt;br /&gt;
&lt;br /&gt;
To get the poses from your mol2 file:&lt;br /&gt;
&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/IFP/lc_blazing_fast_collect_mol2.py .&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $3}&#039; cluster_head.list &amp;gt; cluster_head.names&lt;br /&gt;
  python lc_blazing_fast_collect_mol2.py cluster_head.names [PATH/TO/COMBINED/MOL2] [OUTPUTNAME].mol2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17154</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17154"/>
		<updated>2026-04-09T19:28:43Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 mkdir post_LSD&lt;br /&gt;
 cd post_LSD&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be renamed &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir prep_poses&lt;br /&gt;
  cd prep_poses&lt;br /&gt;
  cp [/path/to/poses/*mol2] .&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
[Note: It takes about 6 hours to fingerprint a file with 2000 molecules in it. Tia and Andrii both have splitting scripts; if you want to combine all your mol2 files and split them into smaller chunks, now would be the time. Alternatively, just use the original poses_extract mol2, but note that the larger # of poses per file will take a bit longer.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are renamed, relocate them to your working directory. This is necessary (you can&#039;t soft link them). Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.all.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
  ssh gimel&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/IFP/get_fingerprints_bfc.py .&lt;br /&gt;
  source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh&lt;br /&gt;
  python2 get_fingerprints_bfc.py *smi [OUTPUT_NAME] [MIN_TC_SIM_IN_CLUSTER] [MAX_NUM_CLUSTERS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17153</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17153"/>
		<updated>2026-04-08T19:10:51Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.all.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
  ssh gimel&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/IFP/get_fingerprints_bfc.py .&lt;br /&gt;
  source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh&lt;br /&gt;
  python2 get_fingerprints_bfc.py *smi [OUTPUT_NAME] [MIN_TC_SIM_IN_CLUSTER] [MAX_NUM_CLUSTERS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17146</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17146"/>
		<updated>2026-03-30T23:17:22Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.all.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
  ssh gimel&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh&lt;br /&gt;
  python2 get_fingerprints_bfc.py *smi [OUTPUT_NAME] [MIN_TC_SIM_IN_CLUSTER] [MAX_NUM_CLUSTERS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17143</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17143"/>
		<updated>2026-03-26T23:40:19Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: added bfc instructions.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.interactions.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
  ssh gimel&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/soft/dock/versions/dock37/DOCK-3.7.5.0/env.sh&lt;br /&gt;
  python2 get_fingerprints_bfc.py *smi [OUTPUT_NAME] [MIN_TC_SIM_IN_CLUSTER] [MAX_NUM_CLUSTERS]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17142</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17142"/>
		<updated>2026-03-26T21:41:02Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (updated 2026-03) of filtering LSD results on [[Cluster 2]], and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. For working up on Wynton, reference the [https://docs.docking.org/filtering.html#typical-workflow ReadTheDocks]. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.interactions.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17141</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17141"/>
		<updated>2026-03-26T21:35:29Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (written 2024-09, updating 2026-03) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.interactions.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17140</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17140"/>
		<updated>2026-03-26T21:34:49Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Finally documented my scripts for combining structures/interactions/energies and rank ordering.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (written 2024-09, updating 2026-03) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds.names&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
Finally, run the following:&lt;br /&gt;
&lt;br /&gt;
  ssh epyc2&lt;br /&gt;
  cd [WORKING DIRECTORY]&lt;br /&gt;
  source /nfs/home/omailhot/pyenv_source.sh&lt;br /&gt;
  python ../scripts/process_interactions.py combined.csv rec combined.zincid.energy combined.interactions.csv&lt;br /&gt;
  grep -Ff filtered_compounds.names combined.interactions.csv &amp;gt; filtered.all.interactions.csv&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $2 &amp;quot; &amp;quot; $3}&#039; filtered.all.interactions.csv &amp;gt; filtered.all.interactions.smi&lt;br /&gt;
&lt;br /&gt;
We now have a rank-ordered list of compounds and corresponding structures passing the interaction fingerprinting step. &lt;br /&gt;
&lt;br /&gt;
Note: filtered.all.interactions.csv and filtered_compounds.names should be approximately the same length. filtered.all.interactions.csv may be longer if some compounds had multiple protomers that both passed IFP. This is negligible, and will be taken care of by Best First Clustering.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
See Olivier&#039;s method [[Olivier&#039;s way of computing novelty|described here]].&lt;br /&gt;
&lt;br /&gt;
It is recommended to restrict the results on ChEMBL for a given target protein to only include compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17137</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17137"/>
		<updated>2026-03-26T19:02:49Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (written 2024-09, updating 2026-03) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
Columns correspond to the following:&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot;&lt;br /&gt;
! CSV Field !! Value&lt;br /&gt;
|-&lt;br /&gt;
| $1 || Compound Name&lt;br /&gt;
|-&lt;br /&gt;
| $2 || # H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $3 || # H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| $4 || # Unsatisfied H-Bond Donors&lt;br /&gt;
|-&lt;br /&gt;
| $5 || # Unsatisfied H-Bond Acceptors&lt;br /&gt;
|-&lt;br /&gt;
| etc..., || Interactions that were checked.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17136</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17136"/>
		<updated>2026-03-26T18:52:50Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Moved the awk instructions to streamline readability.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (written 2024-09, updating 2026-03) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Addendum: Using awk&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We redirect the awk output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17135</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17135"/>
		<updated>2026-03-25T20:34:38Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Updating script paths.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (written 2024-09, updating 2026-03) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, copy the needed scripts: &lt;br /&gt;
&lt;br /&gt;
 cp /nfs/home/zdingman/scripts/IFP/jk_scripts ./scripts&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script(s). The fewer poses you have in your mol2 files, the faster they will complete. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Rename as follows:&lt;br /&gt;
&lt;br /&gt;
  mkdir output_renamed&lt;br /&gt;
  sh rename_utility.sh&lt;br /&gt;
&lt;br /&gt;
Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. [Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, relocate them to your working directory. This is necessary. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
Note: awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We then redirect that output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17119</id>
		<title>How to Use SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17119"/>
		<updated>2026-03-14T00:58:45Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Added link to analog filtering page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to submit a list of SMILES formatted molecules for exhaustive analog searching.&lt;br /&gt;
&lt;br /&gt;
SWAG produces two output files: output_ascores.csv and output_responses.csv. The first file contains each query molecule from the input, as well as the corresponding number of analogs found within the database. The second file lists every analog found for every query molecule, and includes the SMILES, name, and edit distance.&lt;br /&gt;
&lt;br /&gt;
== Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
SWAG must be run on one either epyc/epyc2, and will not run on gimel/gimel2/etc. To run SWAG in a working directory, use the following commands:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  python SWAG.py [arguments]&lt;br /&gt;
&lt;br /&gt;
SWAG has several requirements that must be specified at run time. These are:&lt;br /&gt;
&lt;br /&gt;
* The input smiles file, given with -f [YOUR_INPUT.smi]&lt;br /&gt;
* The prefix for output files, given with -o [YOUR_OUTPUT]&lt;br /&gt;
* The database for querying, given with -d [DATABASE_NAME]&lt;br /&gt;
* The maximum distance, given with -p [NUMBER]&lt;br /&gt;
&lt;br /&gt;
If we wanted to find all the compounds in ZINC22, within 4 edits of the compounds listed in our file ligands.smi, we would run the following command:&lt;br /&gt;
  python SWAG.py -f ligands.smi -o ligands -d ZINC22 -p [4]&lt;br /&gt;
&lt;br /&gt;
== Database Selection ==&lt;br /&gt;
&lt;br /&gt;
The databases used by SmallWorld are (in most cases) pre-computed by the Irwin lab for our usage, and are hard-coded into the python environment we source. The following are available to query with SWAG:&lt;br /&gt;
&lt;br /&gt;
* 480K: 480 thousand building blocks from ChemSpace&lt;br /&gt;
* Accessible-BB: 94 million building blocks from ChemSpace + Enamine FastMADE&lt;br /&gt;
* REAL: 70 billion compounds from 2024 Enamine REAL Space&lt;br /&gt;
* ZINC22: 96 billion commercial compounds listed in ZINC22&lt;br /&gt;
* local: Checks the current directory for a local mapfile called &#039;local.anon.map&#039;&lt;br /&gt;
&lt;br /&gt;
Unlike the first four databases that refer to existing databases, specifying &#039;local&#039; will search the current working directory for a map file. This is useful if you have a specific list of molecules that you want to search within. For example, you can search your top million docking vActives to find close analogs of your selected hits, or search a list of compounds from Infinisee/xREAL to find analogs by edit distance. You can read more at [[Using SWAG to filter analogs by Graph Edit Distance]].&lt;br /&gt;
&lt;br /&gt;
== Advanced Usage ==&lt;br /&gt;
&lt;br /&gt;
By default, SWAG takes a single integer value for the distance parameter. However, you can also pass a list of 7 integers instead as [d,d,d,d,d,d,d] which corresponds to the maximum allowed number of edits for each of the following:&lt;br /&gt;
&lt;br /&gt;
* Maximum distance&lt;br /&gt;
* Ring count additions&lt;br /&gt;
* Ring count removals&lt;br /&gt;
* Linker length additions&lt;br /&gt;
* Linker length removals&lt;br /&gt;
* Terminal group additions&lt;br /&gt;
* Terminal group removals&lt;br /&gt;
&lt;br /&gt;
SmallWorld will return similar compounds, beginning with the fewest number of ring/linker/terminal modifications, up to the maximum distance specified for both specific changes and overall distance.&lt;br /&gt;
&lt;br /&gt;
Additional runtime flags are as follows:&lt;br /&gt;
&lt;br /&gt;
--skipInputStandardization&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
--storeQueryTime&lt;br /&gt;
&lt;br /&gt;
By default, input SMILES are converted to the uncharged parent version of their largest species. Recommended to use input standardization. Otherwise, similar molecules may not be found due to differing counterions or protonation state. &lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
By default, SWAG does not write the per-query search time. If you would like to output the max_dist and query_time to ascores.csv, use the storeQueryTime flag.&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
SWAG is built using the Cython wrapper for the SmallWorld C++ API, which relies on the gnu c compiler (GCC) to run. If running SWAG.py returns &amp;quot;ImportError: CXXABI_1.3.9 not found&amp;quot; then you must use a machine with an updated GCC version. On the Shoichet cluster, these machines are epyc and epyc2.&lt;br /&gt;
&lt;br /&gt;
For further details on SmallWorld, please see the official documentation:&lt;br /&gt;
https://www.nextmovesoftware.com/downloads/smallworld/documentation/&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Using_SWAG_to_filter_analogs_by_Graph_Edit_Distance&amp;diff=17118</id>
		<title>Using SWAG to filter analogs by Graph Edit Distance</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Using_SWAG_to_filter_analogs_by_Graph_Edit_Distance&amp;diff=17118"/>
		<updated>2026-03-14T00:55:57Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to exhaustively find all small-change analogs for a given compound within a larger set of compounds. SWAG can be used to help filter lists of analogs created through other means (ex: fingerprint-based searches, docking hit lists, generative chemistry, enumerated spaces). We can take these larger lists, and use SWAG to filter for compounds differing by a discrete number of graph edits.&lt;br /&gt;
&lt;br /&gt;
Following the procedure described here will ultimately output a list of analogs and their individual graph edit distances, relative to the compound(s) you&#039;re querying.&lt;br /&gt;
&lt;br /&gt;
For a general overview of using SWAG, see [[How to Use SWAG]].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 1: Initial Setup ==&lt;br /&gt;
&lt;br /&gt;
Connect to epyc/epyc2, and create a working directory. Copy your list of SMILES-formatted molecules -- `analog_space.smi` -- to the working directory. Run the following:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/GED/make_localmap.sh .&lt;br /&gt;
  sh make_localmap.sh analog_space.smi&lt;br /&gt;
&lt;br /&gt;
Doing this will generate several files:&lt;br /&gt;
&lt;br /&gt;
unmapped.txt -- A list of SMILES that were unable to be mapped. Very rarely are SMILES unable to be mapped.&lt;br /&gt;
&lt;br /&gt;
local.anon.map -- The unique map of your chemical space onto the larger SmallWorld index.&lt;br /&gt;
&lt;br /&gt;
local.anon.map.blm -- A bloom filter used by SmallWorld to accelerate searches. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Part 2: Filtering with SWAG ==&lt;br /&gt;
&lt;br /&gt;
Filtering is straight-forward after we generate the map file from our analog space. Create the file `queries.smi`, which contains the compound(s) you want to find near analogs of in your locally mapped list of analogs. Run the below command. Note that the value in brackets corresponds to the maximum number of graph edits before the search is terminated. Generally, a distance of 2-4 is recommended. Distances greater than 7 are not supported.&lt;br /&gt;
&lt;br /&gt;
  python SWAG.py -f queries.smi -o queries -d local -p [2]&lt;br /&gt;
&lt;br /&gt;
The following output files are generated:&lt;br /&gt;
&lt;br /&gt;
queries_ascores.csv -- The number of analogs that were found, for each queried molecule.&lt;br /&gt;
&lt;br /&gt;
queries_responses.csv -- A list of all analogs that were found, for each queried molecule. Columns correspond to the original query name/smiles, and the analog name/smiles/graph edit distance.&lt;br /&gt;
&lt;br /&gt;
You can create a SMILES-formatted list of your small-change analogs with the following command:&lt;br /&gt;
&lt;br /&gt;
  awk -F&#039;,&#039; &#039;{print $5 &amp;quot; &amp;quot; $4}&#039; queries_responses.csv &amp;gt; near_analogs.smi&lt;br /&gt;
&lt;br /&gt;
== Useful flags ==&lt;br /&gt;
&lt;br /&gt;
The below flags may be of use when analoging, depending on whether you&#039;re at the point of considering stereochemistry in your project.&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17041</id>
		<title>How to Use SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17041"/>
		<updated>2026-01-23T20:39:49Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to submit a list of SMILES formatted molecules for exhaustive analog searching.&lt;br /&gt;
&lt;br /&gt;
SWAG produces two output files: output_ascores.csv and output_responses.csv. The first file contains each query molecule from the input, as well as the corresponding number of analogs found within the database. The second file lists every analog found for every query molecule, and includes the SMILES, name, and edit distance.&lt;br /&gt;
&lt;br /&gt;
== Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
SWAG must be run on one either epyc/epyc2, and will not run on gimel/gimel2/etc. To run SWAG in a working directory, use the following commands:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  python SWAG.py [arguments]&lt;br /&gt;
&lt;br /&gt;
SWAG has several requirements that must be specified at run time. These are:&lt;br /&gt;
&lt;br /&gt;
* The input smiles file, given with -f [YOUR_INPUT.smi]&lt;br /&gt;
* The prefix for output files, given with -o [YOUR_OUTPUT]&lt;br /&gt;
* The database for querying, given with -d [DATABASE_NAME]&lt;br /&gt;
* The maximum distance, given with -p [NUMBER]&lt;br /&gt;
&lt;br /&gt;
If we wanted to find all the compounds in ZINC22, within 4 edits of the compounds listed in our file ligands.smi, we would run the following command:&lt;br /&gt;
  python SWAG.py -f ligands.smi -o ligands -d ZINC22 -p [4]&lt;br /&gt;
&lt;br /&gt;
== Database Selection ==&lt;br /&gt;
&lt;br /&gt;
The databases used by SmallWorld are (in most cases) pre-computed by the Irwin lab for our usage, and are hard-coded into the python environment we source. The following are available to query with SWAG:&lt;br /&gt;
&lt;br /&gt;
* 480K: 480 thousand building blocks from ChemSpace&lt;br /&gt;
* Accessible-BB: 94 million building blocks from ChemSpace + Enamine FastMADE&lt;br /&gt;
* REAL: 70 billion compounds from 2024 Enamine REAL Space&lt;br /&gt;
* ZINC22: 96 billion commercial compounds listed in ZINC22&lt;br /&gt;
* local: Checks the current directory for a local mapfile called &#039;local.anon.map&#039;&lt;br /&gt;
&lt;br /&gt;
Unlike the first four databases that refer to existing databases, specifying &#039;local&#039; will search the current working directory for a map file. This is useful if you have a specific list of molecules that you want to search within. For example, you can search your top million docking vActives to find close analogs of your selected hits, or search a list of compounds from Infinisee/xREAL to find analogs by edit distance. &lt;br /&gt;
&lt;br /&gt;
[An easy way for creating map files will be covered in a not-yet-written wiki page.]&lt;br /&gt;
&lt;br /&gt;
== Advanced Usage ==&lt;br /&gt;
&lt;br /&gt;
By default, SWAG takes a single integer value for the distance parameter. However, you can also pass a list of 7 integers instead as [d,d,d,d,d,d,d] which corresponds to the maximum allowed number of edits for each of the following:&lt;br /&gt;
&lt;br /&gt;
* Maximum distance&lt;br /&gt;
* Ring count additions&lt;br /&gt;
* Ring count removals&lt;br /&gt;
* Linker length additions&lt;br /&gt;
* Linker length removals&lt;br /&gt;
* Terminal group additions&lt;br /&gt;
* Terminal group removals&lt;br /&gt;
&lt;br /&gt;
SmallWorld will return similar compounds, beginning with the fewest number of ring/linker/terminal modifications, up to the maximum distance specified for both specific changes and overall distance.&lt;br /&gt;
&lt;br /&gt;
Additional runtime flags are as follows:&lt;br /&gt;
&lt;br /&gt;
--skipInputStandardization&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
--storeQueryTime&lt;br /&gt;
&lt;br /&gt;
By default, input SMILES are converted to the uncharged parent version of their largest species. Recommended to use input standardization. Otherwise, similar molecules may not be found due to differing counterions or protonation state. &lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
By default, SWAG does not write the per-query search time. If you would like to output the max_dist and query_time to ascores.csv, use the storeQueryTime flag.&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
SWAG is built using the Cython wrapper for the SmallWorld C++ API, which relies on the gnu c compiler (GCC) to run. If running SWAG.py returns &amp;quot;ImportError: CXXABI_1.3.9 not found&amp;quot; then you must use a machine with an updated GCC version. On the Shoichet cluster, these machines are epyc and epyc2.&lt;br /&gt;
&lt;br /&gt;
For further details on SmallWorld, please see the official documentation:&lt;br /&gt;
https://www.nextmovesoftware.com/downloads/smallworld/documentation/&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17038</id>
		<title>How to Use SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17038"/>
		<updated>2026-01-22T04:49:40Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the SmallWorld chemical database search tool, enabling users to submit a list of SMILES formatted molecules for exhaustive analog searching.&lt;br /&gt;
&lt;br /&gt;
SWAG produces two output files: output_ascores.csv and output_responses.csv. The first file contains each query molecule from the input, as well as the corresponding number of analogs found within the database. The second file lists every analog found for every query molecule, and includes the SMILES, name, and edit distance.&lt;br /&gt;
&lt;br /&gt;
== Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
SWAG can be run in a working directory with the following commands:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  python SWAG.py [arguments]&lt;br /&gt;
&lt;br /&gt;
SWAG has several requirements that must be specified at run time. These are:&lt;br /&gt;
&lt;br /&gt;
* The input smiles file, given with -f [YOUR_INPUT.smi]&lt;br /&gt;
* The prefix for output files, given with -o [YOUR_OUTPUT]&lt;br /&gt;
* The database for querying, given with -d [DATABASE_NAME]&lt;br /&gt;
* The maximum distance, given with -p [NUMBER]&lt;br /&gt;
&lt;br /&gt;
If we wanted to find all the compounds in ZINC22, within 4 edits of the compounds listed in our file ligands.smi, we would run the following command:&lt;br /&gt;
  python SWAG.py -f ligands.smi -o ligands -d ZINC22 -p [4]&lt;br /&gt;
&lt;br /&gt;
== Database Selection ==&lt;br /&gt;
&lt;br /&gt;
The databases used by SmallWorld are (in most cases) pre-computed by the Irwin lab for our usage, and are hard-coded into the python environment we source. The following are available to query with SWAG:&lt;br /&gt;
&lt;br /&gt;
* 480K: 480 thousand building blocks from ChemSpace&lt;br /&gt;
* Accessible-BB: 94 million building blocks from ChemSpace + Enamine FastMADE&lt;br /&gt;
* REAL: 70 billion compounds from 2024 Enamine REAL Space&lt;br /&gt;
* ZINC22: 96 billion commercial compounds listed in ZINC22&lt;br /&gt;
* local: Checks the current directory for a local mapfile called &#039;local.anon.map&#039;&lt;br /&gt;
&lt;br /&gt;
Unlike the first four databases that refer to existing databases, specifying &#039;local&#039; will search the current working directory for a map file. This is useful if you have a specific list of molecules that you want to search within. For example, you can search your top million docking vActives to find close analogs of your selected hits, or search a list of compounds from Infinisee/xREAL to find analogs by edit distance. &lt;br /&gt;
&lt;br /&gt;
[An easy way for creating map files will be covered in a not-yet-written wiki page.]&lt;br /&gt;
&lt;br /&gt;
== Advanced Usage ==&lt;br /&gt;
&lt;br /&gt;
By default, SWAG takes a single integer value for the distance parameter. However, you can also pass a list of 7 integers instead as [d,d,d,d,d,d,d] which corresponds to the maximum allowed number of edits for each of the following:&lt;br /&gt;
&lt;br /&gt;
* Maximum distance&lt;br /&gt;
* Ring count additions&lt;br /&gt;
* Ring count removals&lt;br /&gt;
* Linker length additions&lt;br /&gt;
* Linker length removals&lt;br /&gt;
* Terminal group additions&lt;br /&gt;
* Terminal group removals&lt;br /&gt;
&lt;br /&gt;
SmallWorld will return similar compounds, beginning with the fewest number of ring/linker/terminal modifications, up to the maximum distance specified for both specific changes and overall distance.&lt;br /&gt;
&lt;br /&gt;
Additional runtime flags are as follows:&lt;br /&gt;
&lt;br /&gt;
--skipInputStandardization&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
--storeQueryTime&lt;br /&gt;
&lt;br /&gt;
By default, input SMILES are converted to the uncharged parent version of their largest species. Recommended to use input standardization. Otherwise, similar molecules may not be found due to differing counterions or protonation state. &lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
By default, SWAG does not write the per-query search time. If you would like to output the max_dist and query_time to ascores.csv, use the storeQueryTime flag.&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
SWAG is built using the Cython wrapper for the SmallWorld C++ API, which relies on the gnu c compiler (GCC) to run. If running SWAG.py returns &amp;quot;ImportError: CXXABI_1.3.9 not found&amp;quot; then you must use a machine with an updated GCC version. On the Shoichet cluster, these machines are epyc and epyc2.&lt;br /&gt;
&lt;br /&gt;
For further details on SmallWorld, please see the official documentation:&lt;br /&gt;
https://www.nextmovesoftware.com/downloads/smallworld/documentation/&lt;br /&gt;
&lt;br /&gt;
[[Category:Smallworld]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17037</id>
		<title>How to Use SWAG</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=How_to_Use_SWAG&amp;diff=17037"/>
		<updated>2026-01-22T04:44:21Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created page. Documentation based on that in README.txt&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;SWAG is a python interface for the [[Category:Smallworld|SmallWorld chemical database search tool]], enabling users to submit a list of SMILES formatted molecules for exhaustive analog searching.&lt;br /&gt;
&lt;br /&gt;
SWAG produces two output files: output_ascores.csv and output_responses.csv. The first file contains each query molecule from the input, as well as the corresponding number of analogs found within the database. The second file lists every analog found for every query molecule, and includes the SMILES, name, and edit distance.&lt;br /&gt;
&lt;br /&gt;
== Usage Instructions ==&lt;br /&gt;
&lt;br /&gt;
SWAG can be run in a working directory with the following commands:&lt;br /&gt;
&lt;br /&gt;
  source /nfs/home/zdingman/environments/SWAG/bin/activate&lt;br /&gt;
  cp /nfs/home/zdingman/scripts/SWAG_v1-3-1/* .&lt;br /&gt;
  python SWAG.py [arguments]&lt;br /&gt;
&lt;br /&gt;
SWAG has several requirements that must be specified at run time. These are:&lt;br /&gt;
&lt;br /&gt;
* The input smiles file, given with -f [YOUR_INPUT.smi]&lt;br /&gt;
* The prefix for output files, given with -o [YOUR_OUTPUT]&lt;br /&gt;
* The database for querying, given with -d [DATABASE_NAME]&lt;br /&gt;
* The maximum distance, given with -p [NUMBER]&lt;br /&gt;
&lt;br /&gt;
If we wanted to find all the compounds in ZINC22, within 4 edits of the compounds listed in our file ligands.smi, we would run the following command:&lt;br /&gt;
  python SWAG.py -f ligands.smi -o ligands -d ZINC22 -p [4]&lt;br /&gt;
&lt;br /&gt;
== Database Selection ==&lt;br /&gt;
&lt;br /&gt;
The databases used by SmallWorld are (in most cases) pre-computed by the Irwin lab for our usage, and are hard-coded into the python environment we source. The following are available to query with SWAG:&lt;br /&gt;
&lt;br /&gt;
* 480K: 480 thousand building blocks from ChemSpace&lt;br /&gt;
* Accessible-BB: 94 million building blocks from ChemSpace + Enamine FastMADE&lt;br /&gt;
* REAL: 70 billion compounds from 2024 Enamine REAL Space&lt;br /&gt;
* ZINC22: 96 billion commercial compounds listed in ZINC22&lt;br /&gt;
* local: Checks the current directory for a local mapfile called &#039;local.anon.map&#039;&lt;br /&gt;
&lt;br /&gt;
Unlike the first four databases that refer to existing databases, specifying &#039;local&#039; will search the current working directory for a map file. This is useful if you have a specific list of molecules that you want to search within. For example, you can search your top million docking vActives to find close analogs of your selected hits, or search a list of compounds from Infinisee/xREAL to find analogs by edit distance. &lt;br /&gt;
&lt;br /&gt;
[An easy way for creating map files will be covered in a not-yet-written wiki page.]&lt;br /&gt;
&lt;br /&gt;
== Advanced Usage ==&lt;br /&gt;
&lt;br /&gt;
By default, SWAG takes a single integer value for the distance parameter. However, you can also pass a list of 7 integers instead as [d,d,d,d,d,d,d] which corresponds to the maximum allowed number of edits for each of the following:&lt;br /&gt;
&lt;br /&gt;
* Maximum distance&lt;br /&gt;
* Ring count additions&lt;br /&gt;
* Ring count removals&lt;br /&gt;
* Linker length additions&lt;br /&gt;
* Linker length removals&lt;br /&gt;
* Terminal group additions&lt;br /&gt;
* Terminal group removals&lt;br /&gt;
&lt;br /&gt;
SmallWorld will return similar compounds, beginning with the fewest number of ring/linker/terminal modifications, up to the maximum distance specified for both specific changes and overall distance.&lt;br /&gt;
&lt;br /&gt;
Additional runtime flags are as follows:&lt;br /&gt;
&lt;br /&gt;
--skipInputStandardization&lt;br /&gt;
&lt;br /&gt;
--includeStereo&lt;br /&gt;
&lt;br /&gt;
--excludeStereo&lt;br /&gt;
&lt;br /&gt;
--storeQueryTime&lt;br /&gt;
&lt;br /&gt;
By default, input SMILES are converted to the uncharged parent version of their largest species. Recommended to use input standardization. Otherwise, similar molecules may not be found due to differing counterions or protonation state. &lt;br /&gt;
&lt;br /&gt;
By default, results found from SWAG will count differing stereoisomers as different compounds. If you would like to treat all stereoisomers as a single compound and remove them from the output, use the excludeStereo flag.&lt;br /&gt;
&lt;br /&gt;
By default, SWAG does not write the per-query search time. If you would like to output the max_dist and query_time to ascores.csv, use the storeQueryTime flag.&lt;br /&gt;
&lt;br /&gt;
== Final Notes ==&lt;br /&gt;
&lt;br /&gt;
SWAG is built using the Cython wrapper for the SmallWorld C++ API, which relies on the gnu c compiler (GCC) to run. If running SWAG.py returns &amp;quot;ImportError: CXXABI_1.3.9 not found&amp;quot; then you must use a machine with an updated GCC version. On the Shoichet cluster, these machines are epyc and epyc2.&lt;br /&gt;
&lt;br /&gt;
For further details on SmallWorld, please see the official documentation:&lt;br /&gt;
https://www.nextmovesoftware.com/downloads/smallworld/documentation/&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17017</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=17017"/>
		<updated>2025-12-15T23:06:21Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Noting that JK&amp;#039;s scripts hardcode IFP file name.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (2024-09) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, you can source my collection of modified scripts by running the below script to build the requisite directory structure and copy over all necessary scripts: &lt;br /&gt;
&lt;br /&gt;
 sh /nfs/exk/work/zdingman/scripts/LSD_analysis/populate_LSD_analysis.sh .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script. The fewer poses you have in your mol2 files, the faster they will complete. Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. &lt;br /&gt;
&lt;br /&gt;
[Tia and Andrii both have splitting scripts. Alternatively, just use the poses_extract files, but note that the larger # of mol2 per file will run slower.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, reformat and relocate them to your working directory. Each mol2 file must be named &#039;filtered-#.mol2&#039;, owing to how the underlying scripts were written by JK. Add another thing to the to-do list. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
Note: awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We then redirect that output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Filter_xREAL_by_Heavy_Atom_Count&amp;diff=16851</id>
		<title>Filter xREAL by Heavy Atom Count</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Filter_xREAL_by_Heavy_Atom_Count&amp;diff=16851"/>
		<updated>2025-08-27T00:33:56Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created page. Providing a hack-y tool that works well enough to filter large batches of SMI files by HAC.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=== Preface ===&lt;br /&gt;
&lt;br /&gt;
I wrote this quick tool to grab molecules below HAC19 from the xREAL database on Wynton. Since the database is &amp;gt;1 trillion compounds, I wanted to avoid the entire RDKit molecule build process if at all possible. The code removes every non-alphabetical character, lowercase letters, and the letter &#039;H&#039; from a SMILES string. This leaves a list of &amp;quot;atoms&amp;quot;, which can be counted to give the HAC for a compound. Assuming the HAC count falls within the specified bounds, the entire smi line is written out.&lt;br /&gt;
&lt;br /&gt;
I&#039;m assuming that the location of xREAL remains the same on disk, and that we never ever add any more compounds to xREAL. These are solid assumptions, and absolutely never ever going to be incorrect.&lt;br /&gt;
&lt;br /&gt;
=== Usage ===&lt;br /&gt;
&lt;br /&gt;
1. Copy the script to your working directory, and make a log dir: &lt;br /&gt;
 cd /wynton/group/bks/work/zdingman/GAT1/zwitterion_scripts/HAC_filter_xREAL.sh .&lt;br /&gt;
 mkdir logs&lt;br /&gt;
2. Modify the header variables defined in the header: &#039;&#039;HACMIN&#039;&#039;, &#039;&#039;HACMAX&#039;&#039;, &#039;&#039;outpath&#039;&#039;. (When xREAL inevitably changes locations, modify &#039;&#039;inpath&#039;&#039; as well.&lt;br /&gt;
&lt;br /&gt;
3. Submit the job to run:&lt;br /&gt;
 qsub HAC_filter_xREAL.sh&lt;br /&gt;
&lt;br /&gt;
Run time dependent on the Wynton queue. Anecdotally seems to run to completion overnight with no issues. Each job seems to take roughly 40 minutes (aka, frustratingly too long for the short cpu queue)&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16415</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16415"/>
		<updated>2024-11-16T04:19:01Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (2024-09) of filtering LSD results, and consolidates various processing scripts used by Shoichet lab members into a single tutorial for filtering LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.sh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, you can source my collection of modified scripts by running the below script to build the requisite directory structure and copy over all necessary scripts: &lt;br /&gt;
&lt;br /&gt;
 sh /nfs/exk/work/zdingman/scripts/LSD_analysis/populate_LSD_analysis.sh .&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script. The fewer poses you have in your mol2 files, the faster they will complete. Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. Zoey will re-write the splitting script at some point because there&#039;s an arbitrary cap at 156 files at most. &lt;br /&gt;
&lt;br /&gt;
[The split script needs to be modified and updated. For now, run splitting on Wynton. Ask Seth or others for assistance. Otherwise, see Tia&#039;s scripts.]&lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, reformat and relocate them to your working directory. Place your pdb file in the working directory. &lt;br /&gt;
&lt;br /&gt;
Generate a dirlist of mol2 files, and run from the working directory:&lt;br /&gt;
&lt;br /&gt;
 ls *.mol2 &amp;gt; dirlist&lt;br /&gt;
 csh ../scripts/submit.csh [rec name.pdb]&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
Note: awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We then redirect that output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16291</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16291"/>
		<updated>2024-09-20T18:42:32Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (2024-09) of filtering LSD results, and the culmination of discussion with several other lab members to determine the &amp;quot;best&amp;quot; way to filter LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 csh source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.csh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, you can source my collection of modified scripts by running the yet-to-be-written bash script that builds the requisite directory structure and copies over all necessary scripts.&lt;br /&gt;
&lt;br /&gt;
 script here&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script. The fewer poses you have in your mol2 files, the faster they will complete. Anecdotally, it takes about 6 hours to fingerprint a file with 2000 molecules in it. Zoey will re-write the splitting script at some point because there&#039;s an arbitrary cap at 156 files at most. &lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, reformat and relocate them to your working directory. Place your pdb file in the working directory. Run from the parent directory.&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 csh /scripts/submit.csh [rec name]&lt;br /&gt;
&lt;br /&gt;
Note: Need to tweak submit script so the above commands actually work.&lt;br /&gt;
&lt;br /&gt;
Now we need to combine the output directories back together:&lt;br /&gt;
&lt;br /&gt;
 ls -d [0-9]* &amp;gt; dirlist_combine&lt;br /&gt;
 python2.7 ../scripts/combine_ifp.py dirlist_combine combined&lt;br /&gt;
&lt;br /&gt;
At this point, our interactions have been identified. We can view them in combined.interactions.csv and use the awk command to fetch a list of compounds matching our desired interaction patterns. For example:&lt;br /&gt;
&lt;br /&gt;
 awk -F, &#039;$4 &amp;lt;= 1 &amp;amp;&amp;amp; ($8 == 1 || $9 == 1) {print $1}&#039; combined.interactions.csv &amp;gt; filtered_compounds&lt;br /&gt;
&lt;br /&gt;
Let&#039;s break that command down real quick. awk is a powerful command-line tool that uses its own scripting language (essentially regex with additional features added on top) to process multi-column text files on a line-by-line basis. The above command opens the file &#039;combined.interactions.csv&#039; and separates each line into multiple columns separated by commas, as specified by the -F flag. Columns are 1-indexed and can be accessed using $1, analogous to how bash scripting arguments are accessed. The operation being executed is specified within single-quotes; for our purposes we usually want to use a combination of logic operators as above. OR statements (||) are especially useful, especially in cases where multiple interactions are possible (e.x. either a hydrophobic interaction or a pi-stacking interaction with a phenylalanine). For lines which match the pattern specified, awk will output the contents contained within curly braces. We then redirect that output to a new file titled &#039;filtered_compounds&#039; for future use.&lt;br /&gt;
&lt;br /&gt;
awk is worth learning in greater detail. While far from exhaustive, I found [https://www.geeksforgeeks.org/awk-command-unixlinux-examples/ this page] and [https://www.freecodecamp.org/news/the-linux-awk-command-linux-and-unix-usage-syntax-examples/ this page] to be useful starting points.&lt;br /&gt;
&lt;br /&gt;
Unfortunately, our process of splitting mol2 files and recombining them has scrambled the rank ordering of our compounds. This will cause issues later. I will write a script to deal with this later.&lt;br /&gt;
&lt;br /&gt;
For now, we have a list of compounds that pass the interaction fingerprinting step.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16289</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16289"/>
		<updated>2024-09-19T19:57:38Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (2024-09) of filtering LSD results, and the culmination of discussion with several other lab members to determine the &amp;quot;best&amp;quot; way to filter LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Source JK&#039;s environment with the following commands, accessible on gimel:&lt;br /&gt;
&lt;br /&gt;
 csh source /mnt/nfs/home/jklyu/anaconda3/etc/profile.d/conda.csh&lt;br /&gt;
 conda activate bioinfo-env2&lt;br /&gt;
 if ! ( $?PYTHONPATH ) setenv PYTHONPATH &amp;quot;&amp;quot;&lt;br /&gt;
 setenv PYTHONPATH $PYTHONPATH\:/mnt/nfs/ex5/work/jklyu/IFP/package/ifp/scripts\:&lt;br /&gt;
&lt;br /&gt;
Subsequently, you can source my collection of modified scripts by running the yet-to-be-written bash script that builds the requisite directory structure and copies over all necessary scripts.&lt;br /&gt;
&lt;br /&gt;
 script here&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Copy your initially extracted poses to prep_poses. These poses will need to be split so we can run them in parallel, so run the requisite script. More is better. Zoey will re-write the splitting script at some point because there&#039;s an arbitrary cap at 156 files at most. &lt;br /&gt;
&lt;br /&gt;
Once your mol2 files are split, reformat and relocate them to your working directory. Place your pdb file in the working directory. Run from the parent directory.&lt;br /&gt;
&lt;br /&gt;
 cd ..&lt;br /&gt;
 csh /scripts/submit.csh [rec name]&lt;br /&gt;
&lt;br /&gt;
Note: Need to tweak submit script so the above commands actually work.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Zoey&#039;s Way]]&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16287</id>
		<title>Zoey&#039;s way of filtering LSD</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Zoey%27s_way_of_filtering_LSD&amp;diff=16287"/>
		<updated>2024-09-19T19:06:58Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Created page with &amp;quot;This is my current method (2024-09) of filtering LSD results, and the culmination of discussion with several other lab members to determine the &amp;quot;best&amp;quot; way to filter LSD results. Procedures below are adapted from various other lab sources.  &amp;#039;&amp;#039;&amp;#039;Step 0: Source the environment and copy over relevant files&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Step 1: Interaction fingerprinting&amp;#039;&amp;#039;&amp;#039;  &amp;#039;&amp;#039;&amp;#039;Step 2: Novelty filtering&amp;#039;&amp;#039;&amp;#039; I&amp;#039;ve been making use of Olivier&amp;#039;s method for novelty, which can be Olivier&amp;#039;s way of computin...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is my current method (2024-09) of filtering LSD results, and the culmination of discussion with several other lab members to determine the &amp;quot;best&amp;quot; way to filter LSD results. Procedures below are adapted from various other lab sources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 0: Source the environment and copy over relevant files&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 1: Interaction fingerprinting&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 2: Novelty filtering&#039;&#039;&#039;&lt;br /&gt;
I&#039;ve been making use of Olivier&#039;s method for novelty, which can be [[Olivier&#039;s way of computing novelty|found here]].&lt;br /&gt;
&lt;br /&gt;
It has been recommended to restrict the results on ChEMBL for a target protein to just those compounds annotated with binding (EC50, IC50, etc) data. Additionally, it can be worthwhile with targets we have previously screened internally to include a second novelty filter for previously identified/purchased compounds.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Step 3: Best first clustering&#039;&#039;&#039;&lt;br /&gt;
Note that the input SMILES need to be in rank-order.&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=User:Zdingman&amp;diff=16286</id>
		<title>User:Zdingman</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=User:Zdingman&amp;diff=16286"/>
		<updated>2024-09-19T18:08:03Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Allegedly a girl working in the Shoichet laboratory.&lt;br /&gt;
&lt;br /&gt;
=== Zoey&#039;s Way ===&lt;br /&gt;
&lt;br /&gt;
This is largely a placeholder section, which I intend on fleshing out as I establish and standardize more of my procedures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Papers I Either Like, or Like to Think About ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Can a biologist fix a radio?— Or, what I learned while studying apoptosis&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yuri Lazebnik, in Cancer Cell 2002&lt;br /&gt;
&lt;br /&gt;
https://doi.org/10.1016/S1535-6108(02)00133-2&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Modern biomedical research: an internally self-consistent universe with little contact with medical reality?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
David F. Horrobin, in Nature Reviews Drug Discovery 2003&lt;br /&gt;
&lt;br /&gt;
https://doi.org/10.1038/nrd1012&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=User:Zdingman&amp;diff=16179</id>
		<title>User:Zdingman</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=User:Zdingman&amp;diff=16179"/>
		<updated>2024-06-13T20:48:52Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Beginning a section of conceptual papers that have shaped my attitude towards research. Will add more.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Allegedly a girl working in the Shoichet laboratory.&lt;br /&gt;
&lt;br /&gt;
=== Papers I Either Like, or Like to Think About ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Can a biologist fix a radio?— Or, what I learned while studying apoptosis&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Yuri Lazebnik, in Cancer Cell 2002&lt;br /&gt;
&lt;br /&gt;
https://doi.org/10.1016/S1535-6108(02)00133-2&lt;br /&gt;
&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Modern biomedical research: an internally self-consistent universe with little contact with medical reality?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
David F. Horrobin, in Nature Reviews Drug Discovery 2003&lt;br /&gt;
&lt;br /&gt;
https://doi.org/10.1038/nrd1012&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
	<entry>
		<id>http://wiki.docking.org/index.php?title=Dockopt_(pydock3_script)&amp;diff=16178</id>
		<title>Dockopt (pydock3 script)</title>
		<link rel="alternate" type="text/html" href="http://wiki.docking.org/index.php?title=Dockopt_(pydock3_script)&amp;diff=16178"/>
		<updated>2024-06-13T20:33:57Z</updated>

		<summary type="html">&lt;p&gt;Zdingman: Corrected the flag --job_dir_name to --job_dir_path per the dockopt new help page.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&#039;&#039;dockopt&#039;&#039; allows the generation of many different docking configurations which are then evaluated &amp;amp; analyzed in parallel using a specified job scheduler (e.g. Slurm). If you are a Shoichet Lab user, please see a special section for you, below.&lt;br /&gt;
&lt;br /&gt;
To use DOCK 3.8, you must first license it and install it.&lt;br /&gt;
[[DOCK 3.8:How to install pydock3]]&lt;br /&gt;
&lt;br /&gt;
== Note for UCSF Shoichet Lab members ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;pydock3&#039;&#039; is already installed on the following clusters. You can source the provided Python environment scripts to expose the &#039;&#039;pydock3&#039;&#039; executable and declare default environmental variables:&lt;br /&gt;
&lt;br /&gt;
=== Wynton ===&lt;br /&gt;
&lt;br /&gt;
  source /wynton/group/bks/soft/python_envs/env.sh&lt;br /&gt;
&lt;br /&gt;
=== Gimel ===&lt;br /&gt;
&lt;br /&gt;
Only nodes other than &#039;&#039;gimel&#039;&#039; itself are supported, e.g., &#039;&#039;gimel5&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
 ssh gimel5&lt;br /&gt;
 source /nfs/soft/ian/env.sh&lt;br /&gt;
&lt;br /&gt;
== Subcommand: &#039;&#039;new&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Prepare rec.pdb, xtal-lig.pdb as described in Bender, 2021. https://pubmed.ncbi.nlm.nih.gov/34561691/&lt;br /&gt;
Or download pre-preared sample files from dudez2022.docking.org.&lt;br /&gt;
&lt;br /&gt;
Be sure that you are in the directory containing the required input files: &lt;br /&gt;
* &#039;&#039;rec.pdb&#039;&#039; or &#039;&#039;rec.crg.pdb&#039;&#039;&lt;br /&gt;
* &#039;&#039;xtal-lig.pdb&#039;&#039;&lt;br /&gt;
* &#039;&#039;actives.tgz&#039;&#039;&lt;br /&gt;
* &#039;&#039;decoys.tgz&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Note the inclusion of &#039;&#039;actives.tgz&#039;&#039; and &#039;&#039;actives.tgz&#039;&#039;. Each of these is a tarball of DB2 files, which may be optionally gzipped (with extension .db2.gz). Each tarball represents a binary class for the binary classification task that the docking model is trained on. The positive class (actives) contains the molecules that you want the docking model to preferentially assign &#039;&#039;favorable&#039;&#039; docking scores to. The negative class (decoys) contains the molecules that you want the docking model to preferentially assign &#039;&#039;unfavorable&#039;&#039; scores to. The most common strategy is to use a set of known ligands as the actives and a larger set of property-matched decoys for the decoys (a decoy-to-active ratio of 50:1 is standard), but other strategies are supported. For example, to create a docking model that preferentially assigns favorable scores to agonists over antagonists, a set of agonists can be used as the actives and a set of antagonists can be used for the decoys.&lt;br /&gt;
&lt;br /&gt;
Therefore, you need to build the molecules yourself (see: https://tldr.docking.org/start/build3d38). Each tarball should contain only DB2 files. For example, if one has a directory &#039;&#039;actives/&#039;&#039; containing only DB2 files to use as the actives, then &#039;&#039;acitves.tgz&#039;&#039; should be created as follows:&lt;br /&gt;
&lt;br /&gt;
 cd actives/&lt;br /&gt;
 tar -czf actives.tgz *.db2*&lt;br /&gt;
&lt;br /&gt;
Similarly, for a directory &#039;&#039;decoys/&#039;&#039; containing only DB2 files to use as decoys, &#039;&#039;decoys.tgz&#039;&#039; should be created as follows:&lt;br /&gt;
&lt;br /&gt;
 cd decoys/&lt;br /&gt;
 tar -czf decoys.tgz *.db2*&lt;br /&gt;
&lt;br /&gt;
To create the file structure for your dockopt job, simply type&lt;br /&gt;
&lt;br /&gt;
 pydock3 dockopt - new&lt;br /&gt;
&lt;br /&gt;
By default, the job directory is named &#039;&#039;dockopt_job&#039;&#039;. To specify a different name, use the &amp;quot;--job_dir_path&amp;quot; flag. E.g.:&lt;br /&gt;
&lt;br /&gt;
 pydock3 dockopt - new --job_dir_path=dockopt_job_2&lt;br /&gt;
&lt;br /&gt;
The job directory contains two sub-directories: &lt;br /&gt;
# &#039;&#039;working&#039;&#039;: input files, intermediate blaster files, sub-directories for individual blastermaster subroutines&lt;br /&gt;
# &#039;&#039;retrodock_jobs&#039;&#039;: individual retrodock jobs for each docking configuration&lt;br /&gt;
&lt;br /&gt;
The key difference between the working directories of &#039;&#039;blastermaster&#039;&#039; and &#039;&#039;dockopt&#039;&#039; is that the working directory of &#039;&#039;dockopt&#039;&#039; may contain multiple variants of the blaster files (suffixed by a number, e.g. &amp;quot;box_1&amp;quot;). These variant files are used to create the different docking configurations specified by the multi-valued entries of &#039;&#039;dockopt_config.yaml&#039;&#039;. They are created efficiently, such that the same variant used in multiple docking configurations is not created more than once. &lt;br /&gt;
&lt;br /&gt;
If your current working directory contains any of the following files, then they will be automatically copied into the working directory within the created job directory. This feature is intended to simplify the process of configuring the dockopt job.&lt;br /&gt;
&lt;br /&gt;
* &#039;&#039;rec.pdb&#039;&#039;&lt;br /&gt;
* &#039;&#039;rec.crg.pdb&#039;&#039;&lt;br /&gt;
* &#039;&#039;xtal-lig.pdb&#039;&#039;&lt;br /&gt;
* &#039;&#039;reduce_wwPDB_het_dict.txt&#039;&#039;&lt;br /&gt;
* &#039;&#039;filt.params&#039;&#039;&lt;br /&gt;
* &#039;&#039;radii&#039;&#039;&lt;br /&gt;
* &#039;&#039;amb.crg.oxt&#039;&#039;&lt;br /&gt;
* &#039;&#039;vdw.siz&#039;&#039;&lt;br /&gt;
* &#039;&#039;delphi.def&#039;&#039;&lt;br /&gt;
* &#039;&#039;vdw.parms.amb.mindock&#039;&#039;&lt;br /&gt;
* &#039;&#039;prot.table.ambcrg.ambH&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Only the following are required. Default versions / generated versions of the others will be used instead if they are not detected.&lt;br /&gt;
* &#039;&#039;rec.pdb&#039;&#039; or &#039;&#039;rec.crg.pdb&#039;&#039;.  Either is required, but not both.  If both are present, only &#039;&#039;rec.crg.pdb&#039;&#039; is used.&lt;br /&gt;
* &#039;&#039;xtal-lig.pdb&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
If you would like to use files not present in your current working directory, copy them into your job&#039;s working directory, e.g.:&lt;br /&gt;
 cp &amp;lt;FILE_PATH&amp;gt; &amp;lt;JOB_DIR_NAME&amp;gt;/working/&lt;br /&gt;
&lt;br /&gt;
Finally, configure the &#039;&#039;dockopt_config.yaml&#039;&#039; file in the job directory to your specifications. The parameters in this file govern the behavior of dockopt.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; The &#039;&#039;dockopt_config.yaml&#039;&#039; file differs from the &#039;&#039;blastermaster_config.yaml&#039;&#039; file in that every parameter of the former may accept either a single value or a &#039;&#039;list of comma-separated values&#039;&#039;, which indicates a pool of values to attempt for that parameter. Multiple such multi-valued parameters may be provided, and all unique resultant docking configurations will be attempted. &lt;br /&gt;
&lt;br /&gt;
Single-valued YAML line format:&lt;br /&gt;
&lt;br /&gt;
 distance_to_surface: 1.0&lt;br /&gt;
&lt;br /&gt;
Multi-valued YAML line format:&lt;br /&gt;
&lt;br /&gt;
 distance_to_surface: [1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9]&lt;br /&gt;
&lt;br /&gt;
== Environmental variables ==&lt;br /&gt;
&lt;br /&gt;
=== TMPDIR ===&lt;br /&gt;
&lt;br /&gt;
Designate where temporary job files should be placed. E.g.:&lt;br /&gt;
&lt;br /&gt;
 export TMPDIR=/scratch&lt;br /&gt;
&lt;br /&gt;
==== Note for UCSF researchers ====&lt;br /&gt;
&lt;br /&gt;
On the Wynton cluster, &#039;&#039;/scratch&#039;&#039; only exists on development nodes (not log nodes). Therefore, we recommend running on development nodes (see: https://wynton.ucsf.edu/hpc/get-started/development-prototyping.html). E.g.:&lt;br /&gt;
&lt;br /&gt;
 ssh dev1&lt;br /&gt;
 export TMPDIR=/scratch&lt;br /&gt;
&lt;br /&gt;
If a log node must be used, then &#039;&#039;/wynton/scratch&#039;&#039; may be used:&lt;br /&gt;
&lt;br /&gt;
 ssh log1&lt;br /&gt;
 export TMPDIR=/wynton/scratch&lt;br /&gt;
&lt;br /&gt;
=== job scheduler environmental variables ===&lt;br /&gt;
&lt;br /&gt;
In order for &#039;&#039;dockopt&#039;&#039; to know which scheduler it should use, please configure the following environmental variables according to which one of the job schedulers you have.&lt;br /&gt;
&lt;br /&gt;
==== Slurm ====&lt;br /&gt;
&lt;br /&gt;
E.g., on the UCSF Shoichet Lab Gimel cluster (on any node other than &#039;gimel&#039; itself, such as &#039;gimel5&#039;):&lt;br /&gt;
&lt;br /&gt;
 export SBATCH_EXEC=/usr/bin/sbatch&lt;br /&gt;
 export SQUEUE_EXEC=/usr/bin/squeue&lt;br /&gt;
&lt;br /&gt;
==== SGE ====&lt;br /&gt;
&lt;br /&gt;
On most clusters using SGE the following should be correct:&lt;br /&gt;
&lt;br /&gt;
 export QSTAT_EXEC=/opt/sge/bin/lx-amd64/qstat&lt;br /&gt;
 export QSUB_EXEC=/opt/sge/bin/lx-amd64/qsub&lt;br /&gt;
 export SGE_SETTINGS=/opt/sge/default/common/settings.sh&lt;br /&gt;
&lt;br /&gt;
===== Note for UCSF researchers =====&lt;br /&gt;
&lt;br /&gt;
The following is necessary on the UCSF Wynton cluster:&lt;br /&gt;
&lt;br /&gt;
 export QSTAT_EXEC=/opt/sge/bin/lx-amd64/qstat&lt;br /&gt;
 export QSUB_EXEC=/opt/sge/bin/lx-amd64/qsub&lt;br /&gt;
 export SGE_SETTINGS=/opt/sge/wynton/common/settings.sh&lt;br /&gt;
&lt;br /&gt;
== Subcommand: &#039;&#039;run&#039;&#039; ==&lt;br /&gt;
&lt;br /&gt;
Once your job has been configured to your liking, navigate to the the job directory and run &#039;&#039;dockopt&#039;&#039;:&lt;br /&gt;
 cd &amp;lt;JOB_DIR_NAME&amp;gt;&lt;br /&gt;
 pydock3 dockopt - run &amp;lt;JOB_SCHEDULER_NAME&amp;gt; [--retrodock_job_timeout_minutes=None] [--retrodock_job_max_reattempts=0] [--extra_submission_cmd_params_str=None] [--export_decoys_mol2=False]&lt;br /&gt;
&lt;br /&gt;
where &amp;lt;JOB_SCHEDULER_NAME&amp;gt; is one of:&lt;br /&gt;
* &#039;&#039;sge&#039;&#039;&lt;br /&gt;
* &#039;&#039;slurm&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
This will execute the many dockopt subroutines in sequence. Once this is done, the retrodock jobs for all created docking configurations are run in parallel via the scheduler. The state of the program will be printed to standard output as it runs.&lt;br /&gt;
&lt;br /&gt;
Once the dockopt job is complete, the following files will be generated in the job directory:&lt;br /&gt;
* &#039;&#039;report.html&#039;&#039;: contains (1) a histogram of the performance of all tested docking configurations compared against a distribution of the performance of a random classifier, so as to show whether the test docking configurations are significantly better than ones that can be produced by a random classifier. This is necessary due to the fact that many configurations are being tested. Hence, a Bonferroni correction is applied to the significance threshold, dividing p=0.01 by the number of tested configurations. (2) ROC, charge, and energy plots of the top docking configurations, comparing actives vs. decoys, (3) box plots of enrichment for every multi-valued config parameter, and (4) heatmaps of enrichment for every pair of multi-valued config parameters.&lt;br /&gt;
* &#039;&#039;results.csv&#039;&#039;: parameter values, criterion values, and other information about each docking configuration.&lt;br /&gt;
&lt;br /&gt;
In addition, some number of the best retrodock jobs will be copied to their own sub-directory &#039;&#039;best_retrodock_jobs/&#039;&#039;. &lt;br /&gt;
&lt;br /&gt;
Within each sub-directory of &#039;&#039;best_retrodock_jobs/&#039;&#039;, there are:&lt;br /&gt;
* &#039;&#039;dockfiles/&#039;&#039;: parameters files and &#039;&#039;INDOCK&#039;&#039; for given docking configuration&lt;br /&gt;
* &#039;&#039;output/&#039;&#039;: contains: &lt;br /&gt;
** sub-directories &#039;&#039;actives/&#039;&#039; (containing &#039;&#039;OUTDOCK&#039;&#039; and &#039;&#039;test.mol2&#039;&#039; files) and &#039;&#039;decoys/&#039;&#039; (containing just &#039;&#039;OUTDOCK&#039;&#039;)&lt;br /&gt;
* plot images (e.g., &#039;&#039;roc.png&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039; by default, a mol2 file is exported only for actives, not for decoys, in order to prevent disk space issues.&lt;/div&gt;</summary>
		<author><name>Zdingman</name></author>
	</entry>
</feed>