-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Covalent docking using autodock gpu with ligand prepared by mk_prepare_ligand.py
#104
Comments
Hi @lovenicole If "CCSCC(=O)N" does not return a match, maybe your ligand file doesn't contain these atoms because they are in the pre-reaction form (acrylamide)? The covalent ligand file (all $id.sdf) should be in the after-inhibition form and has to include C-alpha and C-beta. It would be helpful if you could post your input and output files so other people can reproduce the issue :> |
Thank you very much for the reply. Yes, I used pre-reaction form (just ligand in it). How can I make after-inhibition form? |
Hi @lovenicole Alternatively, you could generate such conjugates from Smiles (after replacing one "C=CC(=O)N" by "CCSCC(=O)N"). There are programs that support conversion from Smiles to 3D structures. You can also do this in RDKit :> |
Thank you very much. However, I need help determining which atoms or bond order needs to be added. In CovalentBuilder, I got this error. I used the test.pdb file, made from autodock-gpu dlg file (without any covalent option).
Could you help? |
Hi @lovenicole
The second issue is the ligand PDB doesn't contain hydrogens and thus the SDF file has potentially incorrect valence. You can try adding the hydrogens with obabel. But if you have better sources of the ligand input files, which have specified valence, or contain hydrogens, they are better for mk_prepare_ligand.py. The valence info is important and ensures that the ligand & your smarts query are interpreted correctly. Have you considered generating the ligand conformations and prepare ligands from Smiles? This is possible in RDKit and with meeko's python API. I can provide an example, if you're interested (tomorrow when i have a bit more time :> |
I did something similar in the past, but for very simple warheads like aldehydes, nitriles, etc. Below is how I edited some covalent ligand editing using RDKit, and I hope this might be helpful. The following (as a Python script, or simply dump the lines to a Jupyter notebook) generates an SDF file for the post-reaction, residue-covalent ligand conjugate from Smiles string of an acrylamide ligand, Osimertinib. import rdkit
print("rdkit version:", rdkit.__version__)
from rdkit import Chem
from rdkit.Chem import AllChem
# Osimertinib
smi = "CN1C=C(C2=CC=CC=C21)C3=NC(=NC=C3)NC4=C(C=C(C(=C4)NC(=O)C=C)N(C)CCN(C)C)OC"
mol = Chem.MolFromSmiles(smi)
# Replace acrylamide by covalent conjugate
patt = Chem.MolFromSmiles('N(C(=O)C=C)')
repl = Chem.MolFromSmiles('N(C(=O)CCSCC)')
covmol = AllChem.ReplaceSubstructs(mol,patt,repl)
# Regenerate the covalent ligand from the edited Smiles
covsmi = Chem.MolToSmiles(covmol[0])
print("Smiles of the covalent ligand-residue conjugate:\n", covsmi)
covlig = Chem.MolFromSmiles(covsmi)
# Add hydrogens
covligH = Chem.AddHs(covlig)
# Get initial conformation
params = AllChem.ETKDGv3()
AllChem.EmbedMolecule(covligH, params = params)
# Minimization
covlig3d = Chem.Mol(covligH,confId=0)
prop = AllChem.MMFFGetMoleculeProperties(covlig3d)
ff = AllChem.MMFFGetMoleculeForceField(covlig3d, prop)
e_0 = ff.CalcEnergy()
print("MMFF energy before minimization:", e_0)
ff.Minimize()
e_min = ff.CalcEnergy()
print("MMFF energy after minimization:", e_min)
# Write an SDF file
with Chem.SDWriter('covlig.sdf') as w:
w.write(covlig3d) Output:
I'm unfamiliar with the API usage for covalent ligand preparation >.< the dev and other experts might be able to help us from here. Two more things I wanted to note:
|
Thank you very much for the detailed protocol. There is no whole receptor structure in the rdkit part code you offered. I really really appreciate your detailed description. |
I used the receptor part of test.txt you provided. Here's my
To customize Python scripts for your own acrylamide compounds, modify only the value of # Osimertinib
smi = "CN1C=C(C2=CC=CC=C21)C3=NC(=NC=C3)NC4=C(C=C(C(=C4)NC(=O)C=C)N(C)CCN(C)C)OC" As an alternate to
No the RDKit part is just my procedure. I used this procedure for a similar project. The RDKit part is independent from the receptor structure. When preparing the covalent conjugate in RDKit, the only thing we need to know is what type of residue is the target residue (Cys in this case). For Hope this helps! |
Hi @lovenicole |
I think I need to make a new post in AutoDock-GPU about it. Thank you very much! Your instruction really helped me a lot. |
you can also use ReactionFromSmarts from rdkit. from rdkit import Chem
from rdkit.Chem import AllChem,rdDistGeom,rdChemReactions
import pandas as pd
import argparse
from tqdm import tqdm
from pathlib import Path
parser = argparse.ArgumentParser()
parser.add_argument('-c','--csv', type=str, help='input csv file')
args = parser.parse_args()
csv_input = args.csv
compounds = pd.read_csv(csv_input)
output_name = csv_input.split('.')[0]
output_dir = Path(output_name)
output_dir.mkdir()
#other reactions can also be added here
reactions={}
#reactions['nucleophilic_substitution'] = rdChemReactions.ReactionFromSmarts('[c:1]-[F,Br,Cl,I].[S:2]-[CH2:3]-[CH3:4]>>[c:1]-[S:2]-[CH2:3]-[CH3:4]')
#reactions['nucleophilic_substitution'].Initialize()
reactions['michael_addition'] = rdChemReactions.ReactionFromSmarts('[CH1,CH2:1]=[C:2]-[C,S:3](=[O:4]).[S:5]-[CH2:6]-[CH3:7]>>[CH3:7]-[CH2:6]-[S:5]-[C:1]-[C:2]-[C,S:3](=[O:4])')
reactions['michael_addition'].Initialize()
cys = Chem.MolFromSmiles('CCS')
norm_compounds = {'name': [], 'smiles': [], 'reaction': [], 'mol': []}
cov_compounds = {'name': [], 'smiles': [], 'reaction': [], 'mol': []}
for _, row in tqdm(compounds.iterrows(), total=len(compounds), desc='Processing SMILES'):
mol = Chem.MolFromSmiles(row['SMILES'])
mol_name = row['NAME']
mol.SetProp('_Name',mol_name)
for rxn_name, rxn in reactions.items():
products = rxn.RunReactants((mol, cys))
if len(products) > 0:
norm_compounds['name'].append(mol_name)
norm_compounds['smiles'].append(Chem.MolToSmiles(mol))
norm_compounds['reaction'].append(rxn_name)
mol = Chem.AddHs(mol)
rdDistGeom.EmbedMultipleConfs(mol,numThreads=0,numConfs=3)
AllChem.MMFFOptimizeMolecule(mol, maxIters=500)
norm_compounds['mol'].append(mol)
for i,product in enumerate(products):
cov_mol = Chem.MolFromSmiles(Chem.MolToSmiles(product[0]))
cov_name = mol_name+'_'+chr(65+i)
cov_mol.SetProp('_Name',cov_name)
cov_compounds['name'].append(cov_name)
cov_compounds['smiles'].append(Chem.MolToSmiles(cov_mol))
cov_compounds['reaction'].append(rxn_name)
cov_mol = Chem.AddHs(cov_mol)
rdDistGeom.EmbedMultipleConfs(cov_mol,numThreads=0,numConfs=3)
AllChem.MMFFOptimizeMolecule(cov_mol, maxIters=500)
cov_compounds['mol'].append(cov_mol)
with Chem.SDWriter(f'{output_dir/output_name}_normal.sdf') as w:
for m in tqdm(norm_compounds['mol'], desc='Writing normal compounds'):
w.write(m)
with Chem.SDWriter(f'{output_dir/output_name}_covalent.sdf') as w:
for m in tqdm(cov_compounds['mol'], desc='Writing covalent compounds'):
w.write(m) This script takes in a csv (NAME, SMILES) and outputs all unique mols before and after the specified reactions. compounds_covalent.sdf can then be used with meeko to get the pdbqt-files for docking: Hope this helps someone :) |
Hi, I want to do covalent docking using autodock gpu with ligand prepared by
mk_prepare_ligand.py
.However, I need help.
Covalent docking? ccsb-scripps/AutoDock-GPU#93 (comment)
The
--tether_smarts
option input was "CCSCC(=O)N" and the--tether_smarts_indices
was 1 2.However, I got an error like this.
I prepared the ligand using the command below.
mk_prepare_ligand.py -i $id.sdf -o $id.pdbqt --receptor KRAS/8x6r_A_1.pdb --rec_residue "A:CYS:12" --tether_smarts "C=CC(=O)N" --tether_smarts_indices 1 2
And it works. Thus I did covalent docking with autodock gpu like the command below.
autodock_gpu_128wi --lfile $id.pdbqt --ffile KRAS/8x6r_A_1.maps.fld --resnam $id --nrun 20
However, If I see the result dlg file, there is no atom pair with the distance below 1.9 (covalent docking).
I appreciate it in advance.
The text was updated successfully, but these errors were encountered: