Small change analogs: Difference between revisions

From DISI
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
Line 8: Line 8:


  from bksltk.analogs import get_all_analogs_smiles_set
  from bksltk.analogs import get_all_analogs_smiles_set
 
  all_analogs_smiles = get_all_analogs_smiles_set('YOUR_SMILES')
  all_analogs_smiles = get_all_analogs_smiles_set('YOUR_SMILES')


Line 14: Line 14:


These are the small changes considered: H->CH3, H->OH, H->F, H->Cl, H->Br, aryl carbon to nitrogen, aromatic nitrogen to carbon.
These are the small changes considered: H->CH3, H->OH, H->F, H->Cl, H->Br, aryl carbon to nitrogen, aromatic nitrogen to carbon.
To generate a single .csv file of all small change analogs (that you can send directly to Enamine for a quote) from a .smi file, do this:
from bksltk.analogs import get_csv_analogs
get_csv_analogs('your_input.smi', 'your_output.csv')

Latest revision as of 22:55, 11 December 2024

Step 0: source my environment

All I'm developing is part of a single Python package called bksltk (BKS-lab Toolkit). So just source my Python environment on gimel2 (or other gimelX which has Python3) and you'll have access to everything:

source /nfs/home/omailhot/pyenv_source.sh

Then, you can use the get_all_analogs_smiles_set() method from the toolkit, which will return all smiles of small change analogs, starting from a single smiles string:

from bksltk.analogs import get_all_analogs_smiles_set

all_analogs_smiles = get_all_analogs_smiles_set('YOUR_SMILES')

If you want to do multiple smiles, just call the function for each one :-)

These are the small changes considered: H->CH3, H->OH, H->F, H->Cl, H->Br, aryl carbon to nitrogen, aromatic nitrogen to carbon.

To generate a single .csv file of all small change analogs (that you can send directly to Enamine for a quote) from a .smi file, do this:

from bksltk.analogs import get_csv_analogs

get_csv_analogs('your_input.smi', 'your_output.csv')