Computer-Aided Drug Design at the Durrant Lab › Forums › AutoGrow4 › Is it possible to conserve a part of a molecule?
- This topic is empty.
- AuthorPosts
- August 6, 2020 at 6:14 pm #14584ChristianGuest
Dear all,
is it possible to protect a part of a molecule during growing, i. e. don’t allow any mutations or crossovers for this core region but only additions to it? My ligands consist of such a rigid core and I would like to only add R groups to enhance the binding affinity.
Thank you for any help!
Best regards
Christian - August 7, 2020 at 9:31 pm #14595Jacob SpiegelGuest
Hello Christian,
Thank you for your interest in AutoGrow4. There is not currently an option for preserving the compound core directly. However, there is a workaround for doing so. You can create a custom filter script to reject any compound that lacks your core region. Please update to the 4.0.2 version as there is a minor patch in the code for handling custom filter scripts.
Below I have provided an example custom filter script that could be repurposed for your use. In my example, I define the core region(s) as any 6-carbon ring (using SMARTS notation) and the script rejects any molecule without that core. You would need to tweak it for your own core(s) structure/requirements but hopefully, that helps. I set the script to be expandable so you use multiple core structures and if any core matches in the molecule the compound passes. Additional details for designing and running AutoGrow4 with custom filters are provided in the tutorial located at
/autogrow4/tutorial/TUTORIAL.md
.Please be aware that filters are applied prior to Gypsum-DL 3D conversion, so depending on how specific the core is this may not be a perfect solution. Additionally, the more restrictive/specific the core SMARTS is the more limited the possible compounds that AutoGrow4 can create from the source compounds. Thus, the run times will likely be slower and you may not be able to fully populate your desired generations. I recommend performing a few tests runs with smaller populations before scaling up to your desired population size.
Best,
Jacob Spiegel################################
Example of a custom filter
################################
PLEASE CONVERT SPACES TO TABS IF COPYING DIRECTLY FROM THE TEXT
import rdkit
import rdkit.Chem as ChemDisable the unnecessary RDKit warnings
rdkit.RDLogger.DisableLog("rdApp.*")
from autogrow.operators.filter.filter_classes.parent_filter_class import ParentFilter
class CustomFilterName(ParentFilter):
"""If mol doesn’t contain the core(s) reject molecule"""
def run_filter(self, mol):
"""If mol doesn’t contain the core(s) reject molecule"""# Define core(s) using SMARTS; Example core is an unfused Benzene ring structure # Substitute you core(s) here list_of_core_SMARTS = ["[c]1[c][c][c][c][c]1"] # Convert cores to RDKit mols list_cores_mols = [Chem.MolFromSmarts(x) for x in list_of_core_SMARTS] # Determine if there are any core substructures within mol # If there is one or more substructures within the mol for any core # the molecule passes and returns True for core_mol in list_cores_mols: number_of_cores_in_mol = len(mol.GetSubstructMatches(core_mol, maxMatches=2)) if number_of_cores_in_mol is not 0: # There is one or more core regions, return True return True # mol contains no core scaffolds return False
- AuthorPosts
- The topic ‘Is it possible to conserve a part of a molecule?’ is closed to new replies.