Skip to content

Versioning of InChI string and InChI/Key for the upcoming releases 2026.x #285

Open

Description

@gblanke02

Motivation

With the introduction of the enhancements of molecular inorganics, it is estimated that a major set of InChI strings and related InChIKeys will change (about 5% in average). However, InChIs for organic compounds are not to be changed so that standard InChIs for organic compounds are not impacted (about 95% in average).

The changes in the evaluation of molecular inorganics must be made visible to not confuse users with two different InChI strings for the same structure. This is particularly true for the InChIKey. While the user can see the modifications in the InChI string the hashed InChIKey does not let the user recognize the changes caused by the new molecular inorganic algorithm so that the version string (the last 2 letters of the second character block) is the only position where the changes to the new version can be shown.

Up to version 1.07.5 the following syntax is used (example cisplatin)
Standard InChI
InChI=1S/.......................... InChI=1S/2ClH.2H3N.Pt/h21H;21H3;/q;;;;+2/p-2
InChIKey: SA …................ LXZZYRPGZAFOLE-UHFFFAOYSA
-L

Beta InChI
InChI=1B/.......................... InChI=1B/Cl2H6N2Pt/c1-5(2,3)4/h3-4H3
InChIKey: BA …................ NKTISDOLGLLLMZ-UHFFFAOYBA
-N

InChI calculated with non-standard parameters
InChI=1/ ........................... InChI=1/2ClH.2H3N.Pt/h21H;21H3;/q;;;;+2/p-2
InChIKey: NA …............... LXZZYRPGZAFOLE-UHFFFAOYNA
-L

Proposed solution

The new molecular inorganic features modify an estimated 5% of all InChIs while 95% of the InChIs for organic compounds stay the same. Because only a smaller subset of InChIs is modified the InChI format is kept for the majority of compounds (organic compounds) while an additional subversion identifier is added to the InChI version to indicate the changes of molecular inorganics.
The subversion identifier is a single character starting with “B” (identifying the modifications for molecular inorganics) and using “C”, “D”, etc. for other new features in later releases. For more details see attached document
To avoid ambiguities, InChIs calculated with non-standard parameters have to change from “InChI=1/” to “InChI=1N/”

InChITrust-Chicago InChI Meeting - Versioning .pdf

New InChI version rules for molecular inorganic compounds (example cisplatin):
Standard InChI
InChI=1SB/.......................... InChI=1SB/Cl2H6N2Pt/c1-5(2,3)4/h3-4H3
InChIKey: SB …................... NKTISDOLGLLLMZ-UHFFFAOYSB-N
Beta InChI
InChI=1BB/.......................... InChI=1BB/Cl2H6N2Pt/c1-5(2,3)4/h3-4H3
InChIKey: BB …................... NKTISDOLGLLLMZ-UHFFFAOYBB-N
InChI calculated with non-standard parameters
InChI=1NB/ ........................ InChI=1NB/Cl2H6N2Pt/c1-5(2,3)4/h3-4H3
InChIKey: NB …................... NKTISDOLGLLLMZ-UHFFFAOYNB-N

New InChI version rules for other compound classes like organic compounds (example ethanol)
Standard InChI
InChI=1S/.......................... InChI=1S/C2H6O/c1-2-3/h3H,2H2,1H3
InChIKey: SA …................ LFQSCWFLJHTTHZ-UHFFFAOYSA-N
Beta InChI
InChI=1B/.......................... InChI=1B/C2H6O/c1-2-3/h3H,2H2,1H3
InChIKey: BA …................ LFQSCWFLJHTTHZ-UHFFFAOYBA-N
InChI calculated with non-standard parameters
InChI=1N/ ........................ InChI=1N/C2H6O/c1-2-3/h3H,2H2,1H3
InChIKey: NA …............... LFQSCWFLJHTTHZ-UHFFFAOYNA-N

Alternatives considered

No response

Additional context

Edge case: molecular inorganics with unchanged InChI string (Example: NaCl)

Simple salts like NaCl result in the same InChI string but are calculated based on the new molecular inorganics algorithm. Therefore, they get the version InChI=1SB.

Old: InChI=1S/ClH.Na/h1H;/q;+1/p-1 and FAPWRFPIFSIZLT-UHFFFAOYSA-M
New: InChI=1SB/ClH.Na/h1H;/q;+1/p-1 and FAPWRFPIFSIZLT-UHFFFAOYSB-M

Activity

  1. added
    enhancementNew feature or request
    triageNewly reported, awaiting maintainer review
    on Oct 8, 2026
  2. added
    severity: criticalSystem down, severe crashes, or core features completely broken
    and removed
    triageNewly reported, awaiting maintainer review
    on Oct 12, 2026
  3. fbaensch-beilstein commented on Oct 12, 2026

    @fbaensch-beilstein
    Collaborator

    A few comments:

    1. Three different rules from three different sources:
    • The issue says 1SB whenever a structure goes through the new algorithm, even if InChI string stays byte-identical
    • Presentation slide 7: increment the version "if a change will mean that the InChIKey generated form its input will be different"
    • PR feat: parameterize InChI versioning and add legacy metal handling #280 says whenever the input contains at least on atom flagged METAL in eldata.c (is_el_a_metal)
    1. According to the last bullet of 1., the trigger has to be written to the spec
      There is more than one element table in the code, and they disagree. feat: parameterize InChI versioning and add legacy metal handling #280 mentions the METAL flag in eldata.c. The MI algorithm itself uses MolInOrg1/2 flags in molecular_inorganics_data.c. The table in strutil.c does not flag Sb, while eldata.c does. Ge, As and Te are flagged in neither.

    2. The new grammar will change every reader
      CheckINCHI will reject the InChI=1SB/..., 1BB/..., 1N/.... GetINCHIKeyFromINCHI returns INCHIKEY_INVALID_INCHI_PREFIX, and CheckINCHIKey("FAPWRFPIFSIZLT-UHFFFAOYSB-M") returns INCHIKEY_INVALID_VERSION. Same is for third-party parsers. So at least the release notes should say clearly that new strings are not readable by 1.07.x.

    3. A kind of lookup table is needed
      A is currently "InChI version 1" (flagver in ikey_dll.c, and CheckINCHIKey accepts only A). If B..Z become per-feature subversions of v1, that leaves 25 future features, and it is no longer clear which letter stands for what. So at least every new release notes should contain a growing lookup table to see what letter identifies which set of parameters.

    4. 1N/ will change every existing non-standard InChI

    5. In the presentation slide 6 says "latest-feature-wins". The issue/spec should say this explicitly, so it could not be read as "B, C, D" can be combined. Will it be possible to create a 1SB/... once a new feature increases the version to 1SC/... ?

  4. added
    severity: mediumModerate impact; noticeable bug but not blocking core functionality
    and removed
    severity: criticalSystem down, severe crashes, or core features completely broken
    on Oct 12, 2026
  5. gblanke02 commented on Oct 13, 2026

    @gblanke02
    ContributorAuthor

    Clarification about comment 1:
    1SB has to be used whenever a structure with a metal atom goes through the new algorithm, even if InChI string stays byte-identical.
    In case the software functionality is in beta status, it returns 1B for compounds without metals but other beta functionlity like polymers and 1BB for structures with metal atoms. The new molecular inorganic mechanism is in beta status.
    Note: The unit tests have to be adapted accordingly.

    Claraification about comment 2:
    molecular_inorganics_data.c has to be referenced.
    Metalloids: Sb is flagged as metal but Ge, As and Te are not handled as metals. Get a decision by the working group for the correct approach. For the current beta we keep the current implementation with Sb as metal and Ge, As, Te an non-metals as stated in molecular_inorganics_data.c.

    Claraification about comment 3:
    Add to release notes explicitly: the new strings are not backward compatible and are not readable by 1.07.x nor any other older versions.

    Claraification about comment 4:
    The lookup table is providing all information about the definitions of C, D, and so on in the release notes.

    About comment 6:
    The requirements need further discussions by the stakeholders how the combination of additional features have to be implemented.

  6. fbaensch-beilstein commented on Oct 19, 2026

    @fbaensch-beilstein
    Collaborator

    #280 implements the version prefixes and InChIKey flags from this issue (1S/1B/1N with the B subversion designator; SA/SB, BA/BB, NA/NB), with Molecular Inorganics as Beta (1BB) in this release. Keeping this open for the points still undecided here:

    1. How subversion letters combine once a second feature (C, …) exists (comment 6).
    2. The working-group decision on metalloids (Sb flagged as metal; Ge, As, Te not).
    3. The lookup table of subversion letters for the release notes.
  7. schatzsc commented on Oct 19, 2026

    @schatzsc
    4. A kind of lookup table is needed
       A is currently "InChI version 1" (flagver in ikey_dll.c, and CheckINCHIKey accepts only A). If B..Z become per-feature subversions of v1, that leaves 25 future features, and it is no longer clear which letter stands for what. So at least every new release notes should contain a growing lookup table to see what letter identifies which set of parameters.
    

    @fbaensch-beilstein @gblanke02 That's exactly why I argued against this letter-based system in the last in-person meeting. It's already now very confusing even for me as a person who was present at most of the meetings and will be even more so for anybody not that closely involved and in particular not a software developer.

  8. schatzsc commented on Oct 19, 2026

    @schatzsc

    #280 implements the version prefixes and InChIKey flags from this issue (1S/1B/1N with the B subversion designator; SA/SB, BA/BB, NA/NB), with Molecular Inorganics as Beta (1BB) in this release. Keeping this open for the points still undecided here:

    @fbaensch-beilstein Oh boy - 1BB is really one of the worst inventions of version designators I've seen in a while, as you never know if the "double-B" is a mistake or not.

    I really think this whole approach needs to be shown in a clear presentation again in a meeting and will require further discussion.

  9. fbaensch-beilstein commented on Oct 19, 2026

    @fbaensch-beilstein
    Collaborator

    @schatzsc I agree. Please feel free to start a discussion in the relevant working group or with the people in charge. How would you have handled this?

    @gblanke02 Please address this points

    #280 implements the version prefixes and InChIKey flags from this issue (1S/1B/1N with the B subversion designator; SA/SB, BA/BB, NA/NB), with Molecular Inorganics as Beta (1BB) in this release. Keeping this open for the points still undecided here:

    1. How subversion letters combine once a second feature (`C`, …) exists (comment 6).
    
    2. The working-group decision on metalloids (Sb flagged as metal; Ge, As, Te not).
    
    3. The lookup table of subversion letters for the release notes.
    
  10. schatzsc commented on Oct 19, 2026

    @schatzsc

    @fbaensch-beilstein I think the exact choice of version string should be at the end of the whole process. First, it should be clearly and "future-proof" outlined what difference in version (of both software and string) we want to capture, then try different "mock-ups" with out any limits, and only at the end make a choice.

  11. fbaensch-beilstein commented on Oct 20, 2026

    @fbaensch-beilstein
    Collaborator

    @schatzsc As already said, please feel free to present this to the relevant working group or with the people in charge. A few examples might be helpful.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

enhancementNew feature or requestseverity: mediumModerate impact; noticeable bug but not blocking core functionality

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions