{"id":7894,"date":"2022-03-14T14:49:16","date_gmt":"2022-03-14T14:49:16","guid":{"rendered":"https:\/\/www.blopig.com\/blog\/?p=7894"},"modified":"2022-03-14T14:49:20","modified_gmt":"2022-03-14T14:49:20","slug":"post-processing-for-molecular-docking-assigning-the-correct-bond-order-using-rdkit","status":"publish","type":"post","link":"https:\/\/www.blopig.com\/blog\/2022\/03\/post-processing-for-molecular-docking-assigning-the-correct-bond-order-using-rdkit\/","title":{"rendered":"Post-processing for molecular docking: Assigning the correct bond order using RDKit."},"content":{"rendered":"\n<p><a href=\"https:\/\/autodock.scripps.edu\/download-autodock4\/\" data-type=\"URL\" data-id=\"https:\/\/autodock.scripps.edu\/download-autodock4\/\">AutoDock4<\/a> and <a href=\"https:\/\/vina.scripps.edu\/\" data-type=\"URL\" data-id=\"https:\/\/vina.scripps.edu\/\">AutoDock Vina<\/a> are the most commonly used open-source software for protein-ligand docking. However, they both rely on a derivative of the &#8220;PDB&#8221; (Protein Data Base) file format: the &#8220;PDBQT&#8221; file (Protein Data Bank, Partial Charge (Q), &amp; Atom Type (T)). In addition to the information contained in normal PDB files, PDBQT files have an additional column that lists the partial charge (Q) and the assigned AutoDock atom type (T) for each atom in the molecule. AutoDock atom types offer a more granular differentiation between atoms such as listing aliphatic carbons and aromatic carbons as separate AutoDock atom types. <\/p>\n\n\n\n<p>The biggest drawback about the PDBQT format is that it does not encode for the bond order in molecules explicitly. Instead, the bond order is inferred based on the atom type, distance and angle to nearby atoms in the molecule. For normal sp3 carbons and molecules with mostly single bonds this system works fine, however, for more complex structures containing for example aromatic rings, conjugated systems and hypervalent atoms such as sulphur, the bond order is often not displayed correctly. This leads to issues downstream in the screening pipeline when molecules suddenly change their bond order or have to be discarded after docking because of impossible bond orders.<\/p>\n\n\n\n<p>  The solution to this problem is included in <a href=\"https:\/\/www.rdkit.org\/\" data-type=\"URL\" data-id=\"https:\/\/www.rdkit.org\/\">RDKit<\/a>: The <em>AssignBondOrdersFromTemplate<\/em> function. All you need to do is load the original molecule used for docking as a template molecule and the docked pose PDBQT file into RDKIT as a PDB, without the bond order information. Then assign the original bond order from your template molecule. The following code snippet covers the necessary functions and should help you build a more accurate and reproducible protein-ligand docking pipeline:<\/p>\n\n\n\n<p> <\/p>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"python\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">#import RDKit AllChem\nfrom rdkit import Chem\nfrom rdkit.Chem import AllChem\n\n\n#load original molecule from smiles\nSMILES_STRING = \"CCCCCCCCC\" #the smiles string of your ligand\ntemplate = Chem.MolFromSmiles(SMILES_STRING)\n\n#load the docked pose as a PDB file\nloc_of_docked_pose = \"docked_pose_mol.pdb\" #file location of the docked pose converted to PDB file\ndocked_pose = AllChem.MolFromPDBFile(loc_of_docked_pose)\n\n#Assign the bond order to force correct valence\nnewMol = AllChem.AssignBondOrdersFromTemplate(template, docked_pose)\n\n#Add Hydrogens if desired. \"addCoords = True\" makes sure the hydrogens are added in 3D. This does not take pH\/pKa into account. \nnewMol_H = Chem.AddHs(newMol, addCoords=True)\n\n#save your new correct molecule as a sdf file that encodes for bond orders correctly\noutput_loc = \"docked_pose_assigned_bond_order.sdf\" #output file name\nChem.MolToMolFile(newMol_H, output_loc)<\/pre>\n\n\n\n<p><\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>AutoDock4 and AutoDock Vina are the most commonly used open-source software for protein-ligand docking. However, they both rely on a derivative of the &#8220;PDB&#8221; (Protein Data Base) file format: the &#8220;PDBQT&#8221; file (Protein Data Bank, Partial Charge (Q), &amp; Atom Type (T)). In addition to the information contained in normal PDB files, PDBQT files have [&hellip;]<\/p>\n","protected":false},"author":62,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"nf_dc_page":"","wikipediapreview_detectlinks":true,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"ngg_post_thumbnail":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[187,29,291,227,201],"tags":[287,152,129,134],"ppma_author":[543],"class_list":["post-7894","post","type-post","status-publish","format-standard","hentry","category-cheminformatics","category-code","category-protein-ligand-docking","category-python-code","category-small-molecules","tag-protein-ligand-docking","tag-python","tag-rdkit","tag-small-molecules"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"authors":[{"term_id":543,"user_id":62,"is_guest":0,"slug":"marc","display_name":"Marc M\u00f6\u00dfer (Moesser)","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/08164edbfa69b99d7ddb64e2d18e0b76cfd59ce4ade51ffbe2abd72aa5419f7e?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7894","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/users\/62"}],"replies":[{"embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/comments?post=7894"}],"version-history":[{"count":2,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7894\/revisions"}],"predecessor-version":[{"id":7896,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/posts\/7894\/revisions\/7896"}],"wp:attachment":[{"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/media?parent=7894"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/categories?post=7894"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/tags?post=7894"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.blopig.com\/blog\/wp-json\/wp\/v2\/ppma_author?post=7894"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}