This is an extended comment to support Martin's comment by illustration, i.e. to generate InChI with a fixed H layer is going to account for the differences about peripheral hydrogens in question. By this, you leave the sub set of standard InChI which may affect subsequent processing of the strings in other programs. Reading InChI trust's FAQ e.g., about tautomers (e.g. «The Fixed-H layer is useful if you wish to represent a particular tautomer of a given structure.», section 6.2) may help; there are some details (e.g., «It is not possible to use InChI syntax to compare molecules with different but similar connection tables.», section 12.5) to be aware when using InChI.
In the second part of your question, the structure drawing and the InChI written do not match each other; the presence/absence of the sodium cation and water molecules influences the generation of the InChI in question (and subsequent InChIKey) and the two are discernible by standard InChI/InChIKey.
Regarding the case of penicilline, I departed from a set of eight canonical SMILES
O=C(Cc1ccccc1)N[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)O)(C)C
O=C(Cc1ccccc1)N[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)[O-])(C)C
O=C(Cc1ccccc1)N[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)[O-])(C)C.[K+]
O/C(=N\[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)O)(C)C)/Cc1ccccc1
[O-]/C(=N\[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)O)(C)C)/Cc1ccccc1
[O-]/C(=N\[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)O)(C)C)/Cc1ccccc1.[K+]
[O-]/C(=N\[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)[O-])(C)C)/Cc1ccccc1
[O-]/C(=N\[C@@H]1C(=O)N2[C@@H]1SC([C@@H]2C(=O)[O-])(C)C)/Cc1ccccc1.[K+].[K+]
which cover neuter, anionic, and forms of a potassium salt. To share the same page, here a visual survey of them by OpenBabel:
obabel -ismi penicillin_G_can.smi -osvg -O test.svg -xl --addinindex
Subsequently, a .sdf
was written
obabel penicillin_G_can.smi -O penicillin_G_can.sdf -h --gen3d
With InChI trust's reference binaries (version 1.06, December 2020, repository), this container file was processed once to generate standard InChI/InChIKey, and once InChI/InChIKey considering a fixed H layer as a tabulator separated list:
./inchi-1 -tabbed -AuxNone -Key penicillin_G_can.sdf # standard assignment
./inchi-1 -tabbed -AuxNone -Key -FixedH penicillin_G_can.sdf # non-standard
In the standard form, there indeed is pairwise match of the strings for entries (1, 4), (2, 5), and (3, 6):
Structure: 1 InChI=1S/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/t11-,12+,14-/m1/s1 InChIKey=JGSARLDLIJGVTE-MBNYWOFBSA-N
Structure: 2 InChI=1S/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-1/t11-,12+,14-/m1/s1 InChIKey=JGSARLDLIJGVTE-MBNYWOFBSA-M
Structure: 3 InChI=1S/C16H18N2O4S.K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);/q;+1/p-1/t11-,12+,14-;/m1./s1 InChIKey=IYNDLOXRXUOGIU-LQDWTQKMSA-M
Structure: 4 InChI=1S/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/t11-,12+,14-/m1/s1 InChIKey=JGSARLDLIJGVTE-MBNYWOFBSA-N
Structure: 5 InChI=1S/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-1/t11-,12+,14-/m1/s1 InChIKey=JGSARLDLIJGVTE-MBNYWOFBSA-M
Structure: 6 InChI=1S/C16H18N2O4S.K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);/q;+1/p-1/t11-,12+,14-;/m1./s1 InChIKey=IYNDLOXRXUOGIU-LQDWTQKMSA-M
Structure: 7 InChI=1S/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-2/t11-,12+,14-/m1/s1 InChIKey=JGSARLDLIJGVTE-MBNYWOFBSA-L
Structure: 8 InChI=1S/C16H18N2O4S.2K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);;/q;2*+1/p-2/t11-,12+,14-;;/m1../s1 InChIKey=PEPWXSJDCDQNTL-UDPGNSCCSA-L
If the optional fixed H layer is used, each member of this set is assigned a unique string:
Structure: 1 InChI=1/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/t11-,12+,14-/m1/s1/f/h17,21H InChIKey=JGSARLDLIJGVTE-JGBPDRTNNA-N
Structure: 2 InChI=1/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-1/t11-,12+,14-/m1/s1/fC16H17N2O4S/h17H/q-1 InChIKey=JGSARLDLIJGVTE-JSKXZDGENA-M
Structure: 3 InChI=1/C16H18N2O4S.K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);/q;+1/p-1/t11-,12+,14-;/m1./s1/fC16H17N2O4S.K/h17H;/q-1;m InChIKey=IYNDLOXRXUOGIU-UBIYMBTGNA-M
Structure: 4 InChI=1/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/t11-,12+,14-/m1/s1/f/h19,21H/b17-10- InChIKey=JGSARLDLIJGVTE-SCGMZQNYNA-N
Structure: 5 InChI=1/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-1/t11-,12+,14-/m1/s1/fC16H17N2O4S/h21H/q-1/b17-10- InChIKey=JGSARLDLIJGVTE-HOPLNNLJNA-M
Structure: 6 InChI=1/C16H18N2O4S.K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);/q;+1/p-1/t11-,12+,14-;/m1./s1/fC16H17N2O4S.K/h21H;/q-1;m/b17-10-; InChIKey=IYNDLOXRXUOGIU-XNDLOSBFNA-M
Structure: 7 InChI=1/C16H18N2O4S/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22)/p-2/t11-,12+,14-/m1/s1/fC16H16N2O4S/q-2/b17-10- InChIKey=JGSARLDLIJGVTE-JRFSBVOJNA-L
Structure: 8 InChI=1/C16H18N2O4S.2K/c1-16(2)12(15(21)22)18-13(20)11(14(18)23-16)17-10(19)8-9-6-4-3-5-7-9;;/h3-7,11-12,14H,8H2,1-2H3,(H,17,19)(H,21,22);;/q;2*+1/p-2/t11-,12+,14-;;/m1../s1/fC16H16N2O4S.2K/q-2;2m/b17-10-;; InChIKey=PEPWXSJDCDQNTL-KBRAHMAKNA-L
In the case of chloramine, a discern of the two entries already is possible with standard InChI/InChIKey. With canonical SMILES by OpenBabel
ClNS(=O)(=O)c1ccc(cc1)C
Cl[N-]S(=O)(=O)c1ccc(cc1)C.[Na+]
processing as above eventually yields the standard strings
Structure: 1 InChI=1S/C7H8ClNO2S/c1-6-2-4-7(5-3-6)12(10,11)9-8/h2-5,9H,1H3 InChIKey=NXTVQNIVUKXOIL-UHFFFAOYSA-N
Structure: 2 InChI=1S/C7H7ClNO2S.Na/c1-6-2-4-7(5-3-6)12(10,11)9-8;/h2-5H,1H3;/q-1;+1 InChIKey=VDQQXEISLMTGAB-UHFFFAOYSA-N