You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The valence field (vvv) is written as 1 for both atoms, so the reader adds no implicit H.
Cause
PermuteMolfileText reads the input with bDoNotAddH = 1 (INCHI-1-SRC/INCHI_BASE/src/permutation_util.c, the 0, 1, 1, 0, 0 arguments to CreateOrigInpDataFromMolfile), so num_H is never filled. OrigAtData_WriteToSDfile then correctly writes the valence from the explicit bonds only. The writer is not the problem: it is also used by -OutputSDF, where num_H is filled.
Scale
Over the CI set with the PR #310 wrapper (10 permutations per molfile): 3599 of 4186 molfiles with a valid original give a different InChI after permutation. With only that argument changed to 0, 1, 0, 0, 0, 7 differ, and those 7 are exactly the invariance failures recorded in #310.
Fix
Pass bDoNotAddH = 0 in PermuteMolfileText, and add a test that permutation of a molfile with implicit H gives the same InChI as the original.
Present since the function was added in 41b256a. The invariance test did not notice because, until #310, it could not read any permuted molfile.
Activity
fix: keep implicit hydrogens in PermuteMolfileText