diff --git a/pocket_flow/utils/generate_utils.py b/pocket_flow/utils/generate_utils.py index 26a9d22..30bf76c 100644 --- a/pocket_flow/utils/generate_utils.py +++ b/pocket_flow/utils/generate_utils.py @@ -245,9 +245,9 @@ def remove_triangle(pos_to_add, ligand_context_pos, ligand_context_bond_index, l Chem.MolFromSmarts('[C]1~&@[C]~&@[C]~&@[C]~&@[C]~&@[C]~&@1') ] PATTERNS_1 = [ - [Chem.MolFromSmarts('[#6,7,8]-[#7]1~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@1'), + [Chem.MolFromSmarts('[#6,#7,#8]-[#7]1~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@1'), Chem.MolFromSmarts('[C,N,O]-[N]1~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@1')], - [Chem.MolFromSmarts('[#6,7,8]-[#6]1(-[#6,7,8])~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@1'), + [Chem.MolFromSmarts('[#6,#7,#8]-[#6]1(-[#6,#7,#8])~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@1'), Chem.MolFromSmarts('[C,N,O]-[C]1(-[C,N,O])~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@1')] #Chem.MolFromSmarts('[C,N,O]-[N]1~&@[C]~&@[C]~&@[N]~&@[C]~&@[C]-1'), #Chem.MolFromSmarts('[C,N,O]-[N]1~&@[C]~&@[C]~&@[C]~&@[C]~&@[C]-1'), @@ -258,7 +258,7 @@ def modify(mol, max_double_in_6ring=0): mol_copy = copy.deepcopy(mol) mw = Chem.RWMol(mol) - p1 = Chem.MolFromSmarts('[#6,7]=[#6]1-[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]-1') + p1 = Chem.MolFromSmarts('[#6,#7]=[#6]1-[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]-1') p1_ = Chem.MolFromSmarts('[C,N]=[C]1-[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]-1') subs = set(list(mw.GetSubstructMatches(p1)) + list(mw.GetSubstructMatches(p1_))) subs_set_1 = [set(s) for s in subs] @@ -309,7 +309,7 @@ def modify(mol, max_double_in_6ring=0): mw.AddBond(*b[0], Chem.rdchem.BondType.SINGLE) Chem.GetSSSR(mw) - p3 = Chem.MolFromSmarts('[#8]=[#6]1-[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]-1') + p3 = Chem.MolFromSmarts('[#8]=[#6]1-[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]-1') p3_ = Chem.MolFromSmarts('[O]=[C]1-[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]-1') subs = set(list(mw.GetSubstructMatches(p3)) + list(mw.GetSubstructMatches(p3_))) subs_set_2 = [set(s) for s in subs] @@ -321,7 +321,7 @@ def modify(mol, max_double_in_6ring=0): mw.RemoveBond(*b[0]) mw.AddBond(*b[0], Chem.rdchem.BondType.SINGLE) - p = Chem.MolFromSmarts('[#6,7]1~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@[#6,7]~&@1') + p = Chem.MolFromSmarts('[#6,#7]1~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@[#6,#7]~&@1') p_ = Chem.MolFromSmarts('[C,N]1~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@[C,N]~&@1') Chem.GetSSSR(mw) subs = set(list(mw.GetSubstructMatches(p)) + list(mw.GetSubstructMatches(p_))) @@ -414,4 +414,4 @@ def check_alert_structures(mol, alert_smarts_list): if len(subs) != 0: return True else: - return False \ No newline at end of file + return False