Skip to content

2: Mini - Grow Linker and R-Group#

Authors: Mateusz K Bieniek, Ben Cree, Rachael Pirie, Joshua T. Horton, Natalie J. Tatum, Daniel J. Cole

Overview#

This is a variation of the first tutorial, where in addition to the R-group we also attach a linker.

If you're ready to move on to the next stage, please proceed to learning about the fegrow.ChemSpace class.

from rdkit import Chem
import fegrow
The history saving thread hit an unexpected error (OperationalError('attempt to write a readonly database')).History will not be written to the database.

Prepare the ligand scaffold#

rdkit_mol = Chem.AddHs(Chem.MolFromSmiles('CC1C=CN(CN1C)C'))
# get the FEgrow representation of the rdkit Mol
scaffold = fegrow.RMol(rdkit_mol)
scaffold.rep2D(idx=False, h=False)

png

Show the 2D (with indices) representation of the core. This is used to select the desired growth vector.

scaffold.rep2D(idx=True, size=(500, 500))

png

Using the 2D drawing, select an index for the growth vector. In this case, we are selecting the hydrogen atom labelled H:9

# you can also embed the information in your scaffold to avoid passing around the index
scaffold.GetAtomWithIdx(9).SetAtomicNum(0)

Create a linker#

linker_rcor = Chem.AddHs(Chem.MolFromSmiles('*CO*'))
# note we do not clarify which connecting point * should be used first
linker_rcor

png

# let us use O as the first connecting point (lower digit)
linker_rcor = Chem.AddHs(Chem.MolFromSmiles('[*:1]CO[*:0]'))
linker_rcor

png

Attach the linker#

# linker behaves like any other 
# we have to specify where the R-group should be attached using the attachment index
with_linker = fegrow.build_molecule(scaffold, linker_rcor)
The R-Group lacks initial coordinates. Defaulting to Chem.rdDistGeom.EmbedMolecule.
[11:25:18] UFFTYPER: Unrecognized atom type: *_ (0)
[11:25:18] UFFTYPER: Unrecognized atom type: *_ (3)
# note that the second connecting point * is left for the future R-group
with_linker
Smiles Molecule
ID
None [H]C1=C([H])C([H])(C([H])([H])OC([H])([H])[*:1...
Mol
# prepare R-group
R_group_cl = Chem.AddHs(Chem.MolFromSmiles('*CCl'))
R_group_cl

png

# use the second connecting point now implicitly
rmol = fegrow.build_molecule(with_linker, R_group_cl)
The R-Group lacks initial coordinates. Defaulting to Chem.rdDistGeom.EmbedMolecule.
[11:25:18] UFFTYPER: Unrecognized atom type: *_ (0)
rmol
Smiles Molecule
ID
None [H]C1=C([H])C([H])(C([H])([H])OC([H])([H])C([H...
Mol

You can now proceed to the rest of the stages, like the generation of conformers, optimisation, etc. However, please checkout ChemSpace for automatic all of it!