[Rdkit-discuss] MCS question
Open-Source Cheminformatics and Machine Learning
Brought to you by:
glandrum
|
From: 王昊 <hwa...@16...> - 2024-03-13 13:25:15
|
Hi:
I have two molecules as shown below. It seems that they should not have a common substructure or the substructure is smaller,, but they can match the following results. I have added parameters to no avail. How can I solve this problem?
code:
smi1 = 'CC(=O)OCCc1ccccc1'
smi2 = 'CCCCCC'
mol1 = Chem.MolFromSmiles(smi1)
mol2 = Chem.MolFromSmiles(smi2)
params = rdFMCS.MCSParameters()
params.BondCompare = rdFMCS.BondCompare.CompareOrderExact
params.AtomCompare = rdFMCS.AtomCompare.CompareAny
params.MatchValences = True
params.MatchChiralTag = True
mcs = rdFMCS.FindMCS([mol1, mol2],params)
mcs_smarts = mcs.smartsString
mcs_smiles = Chem.MolToSmiles(Chem.MolFromSmarts(mcs_smarts))
print (mcs_smarts)
print (mcs_smiles)
result:
[#6]-[#6]-[#6]-,:[#6]-,:[#6]-,:[#6]
CCCCCC |