3: Mini - replace substructure#
Authors: Mateusz K Bieniek, Ben Cree, Rachael Pirie, Joshua T. Horton, Natalie J. Tatum, Daniel J. Cole
Overview#
In this mini tutorial, we modify the molecule by replacing an -oxazine ring with our own a methyl group.
If you're ready to use FEgrow as inteded, please proceed to learning about the fegrow.ChemSpace class.
from rdkit import Chem
import fegrow
<frozen importlib._bootstrap>:241: RuntimeWarning: to-Python converter for boost::shared_ptr<RDKit::FilterHierarchyMatcher> already registered; second conversion method ignored.
<frozen importlib._bootstrap>:241: RuntimeWarning: to-Python converter for boost::shared_ptr<RDKit::FilterCatalogEntry> already registered; second conversion method ignored.
Prepare the ligand scaffold#
rdkit_mol = Chem.AddHs(Chem.MolFromSmiles('CN1CC=CN(COC2CNCOC2)C1'))
# get the FEgrow representation of the rdkit Mol
molecule = fegrow.RMol(rdkit_mol)
molecule.rep2D(idx=False, h=False)
2D representation of the core. We want the pyrimidine to stay, and the -oxazine including the oxygen on the chain.
molecule.rep2D(idx=True, size=(500, 500))
Using the 2D drawing, select an index for the growth vector. In this case, we are selecting the hydrogen atom labelled O:7
# you can also embed the information in your scaffold to avoid passing around the index
molecule.GetAtomWithIdx(7).SetAtomicNum(0)
# prepare R-group
R_group_methanol = Chem.AddHs(Chem.MolFromSmiles('*CO'))
# use the second connecting point now implicitly
rmol = fegrow.build_molecule(molecule, R_group_methanol)
/home/dresio/code/fegrow/fegrow/builder.py:238: UserWarning: The linking R atom (*) has two or more attachment points (bonds). The molecule might be modified.
warnings.warn(
The R-Group lacks initial coordinates. Defaulting to Chem.rdDistGeom.EmbedMolecule.
[11:31:56] UFFTYPER: Unrecognized atom type: *_ (0)
rmol
Smiles | Molecule | |
---|---|---|
ID | ||
None | [H]OC([H])([H])C([H])([H])N1C([H])=C([H])C([H]... |
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!