Dear Masgils,

you may try something along these lines, i.e. make atoms and/or bonds generic on one of the molecules withrdmolops.AdjustQueryProperties() in order to get subtructures to match, and then use rdMolAlign.GetBestRMS():

piperidine  =  Chem.AddHs(Chem.MolFromSmiles("C1CC(C)CCN1"))
AllChem.EmbedMolecule(piperidine)
AllChem.MMFFOptimizeMolecule(piperidine)
piperidine_noh  =  Chem.RemoveHs(piperidine)

piperazine  =  Chem.AddHs(Chem.MolFromSmiles("C1CN(C)CCN1"))
AllChem.EmbedMolecule(piperazine)
AllChem.MMFFOptimizeMolecule(piperazine)
piperazine_noh  =  Chem.RemoveHs(piperazine)

piperidine_noh

piperazine_noh

piperidine_noh.GetSubstructMatches(piperazine_noh)

()

params  =  AllChem.AdjustQueryParameters()

params.makeAtomsGeneric  =  True

params.makeBondsGeneric  =  True

piperazine_noh_generic  =  AllChem.AdjustQueryProperties(
    piperazine_noh,  params)

piperazine_noh_generic

piperidine_noh.GetSubstructMatches(piperazine_noh_generic)

((0, 1, 2, 3, 4, 5, 6),)

AllChem.GetBestRMS(piperazine_noh_generic,  piperidine_noh)

0.39432427325884206


Hope this helps, cheers
p.

On 07/25/19 16:53, Masgils wrote:
Hi, all

Is it possible use GetSubstructMatches() to match a substructure with one or 
two atom different from ref_mol? (eg. a Piperidine ring and a Piperazing ring)

And how to get the RMSD between corresponding atoms of two substructures?





_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss

Reply via email to