Hello,
probably this is a message mainly to developers.
I discovered some strange behavior of removeHs function applied for
'[H][*:1]' molecule.
If I create that mol from smiles, RemoveHs does not remove a single H
from the mol:
mmm = Chem.MolFromSmiles('[H][*:1]')
Chem.MolToSmiles(Chem.RemoveHs(mmm))
output:
'[H][*:1]'
If I apply RemoveHs to fragments obtained after MMPA cuts it removes
H and keeps only '[*:1]'
mmm = Chem.MolFromSmiles('c1ccccc1C')
mmm = Chem.AddHs(mmm)
fr = rdMMPA.FragmentMol(mmm, pattern="[*]!@!=!#[!#1]", maxCuts=1,
resultsAsMols=True, maxCutBonds=30)
for f in fr:
ff = Chem.GetMolFrags(f[1], asMols=True)
print(Chem.MolToSmiles(ff[0]), Chem.MolToSmiles(Chem.RemoveHs(ff[0])))
print(Chem.MolToSmiles(ff[1]), Chem.MolToSmiles(Chem.RemoveHs(ff[1])))
output:
[H]c1c([H])c([H])c([*:1])c([H])c1[H] c1ccc([*:1])cc1
[H]C([H])([H])[*:1] C[*:1]
[H]c1c([H])c([H])c([*:1])c(C([H])([H])[H])c1[H] Cc1ccccc1[*:1]
[H][*:1] [*:1]
[H]c1c([H])c(C([H])([H])[H])c([H])c([*:1])c1[H] Cc1cccc([*:1])c1
[H][*:1] [*:1]
[H]c1c([H])c([*:1])c([H])c([H])c1C([H])([H])[H] Cc1ccc([*:1])cc1
[H][*:1] [*:1]
[H]c1c([H])c([H])c(C([H])([H])[*:1])c([H])c1[H] c1ccc(C[*:1])cc1
[H][*:1] [*:1]
If this is a bug I can create an issue on github
Pavel.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss