epam / Indigo

Universal cheminformatics toolkit, utilities and database search tools
http://lifescience.opensource.epam.com
Apache License 2.0
292 stars 100 forks source link

Substructure matcher finds implicit hydrogens as atoms #1872

Open AlexanderSavelyev opened 3 months ago

AlexanderSavelyev commented 3 months ago

Steps to Reproduce

smiles = "C";
smarts = "[!#6]";
Indigo indigo = new Indigo();
IndigoObject pattern = indigo.loadSmarts(smarts);
IndigoObject molecule = indigo.loadMolecule(smiles);
IndigoObject match = indigo.substructureMatcher(molecule).match(pattern);
if (match !=null) // a match is produced here. Working correctly for version 1.12. 

Actual behavior Match returns non-zero result for implicit hydrogens

Expected behavior There should be no match for implicit hydrogens

Environment details: