Dear Andrius,

In the more general case of a .mol/.sdf file about models with multiple atoms
and at least one explicit bond, the reference executable of InChI 1.07.1 is
able to process data in the v3000 dialect.  Their executable published by
August 21st, 2024 on
<https://github.com/IUPAC-InChI/InChI/releases>
for instance is able to assign pyridine (written by OpenBabel) its InChI
string.  For documentation, I attach the log of a test run in Linux Debian
13/trixie with InChI's reference executable 1.07.1.

---

Issue 52 (on InChI's GitHub repository) addresses a particular case -- .mol or
.sdf with exactly one explicit atom only.  In this instance, some programs
write a bound block (for instance the sketcher InChI's demo page currently
uses, and OpenBabel) though there is no _explicit_ second atom to bound to.
The file then reads

```
M  V30 BEGIN BOND
M  V30 END BOND
```

The reference executable of InChI 1.07.1 considers this to be an error.  Other
programs (for instance Marvin) write a bound block only if there are at least
two atoms with an explicit bound.  The current implementation in OpenBabel
3.1.1 (as packaged for Debian by September 4, 2024) can process either one of
the two forms thanks to the internal design of OpenBabel.

Best regards,

Norwid
@debian:~/Desktop/inchi_test$ md5sum INCHI-1-BIN.zip 
7829bc3ce6235d10a8e8bb8f594618c0  INCHI-1-BIN.zip
@debian:~/Desktop/inchi_test$ unzip INCHI-1-BIN.zip 
Archive:  INCHI-1-BIN.zip
   creating: INCHI-1-BIN/
   creating: INCHI-1-BIN/windows/
   creating: INCHI-1-BIN/windows/32bit/
  inflating: INCHI-1-BIN/windows/32bit/inchi-1.exe  
 extracting: INCHI-1-BIN/windows/32bit/inchi-1.zip  
   creating: INCHI-1-BIN/windows/32bit/dll/
  inflating: INCHI-1-BIN/windows/32bit/dll/inchi_main.exe  
 extracting: INCHI-1-BIN/windows/32bit/dll/libinchi.zip  
 extracting: INCHI-1-BIN/windows/32bit/dll/inchi_main.zip  
  inflating: INCHI-1-BIN/windows/32bit/dll/libinchi.dll  
  inflating: INCHI-1-BIN/windows/winchi-1.exe  
   creating: INCHI-1-BIN/windows/64bit/
  inflating: INCHI-1-BIN/windows/64bit/inchi-1.exe  
 extracting: INCHI-1-BIN/windows/64bit/inchi-1.zip  
   creating: INCHI-1-BIN/windows/64bit/dll/
  inflating: INCHI-1-BIN/windows/64bit/dll/inchi_main.exe  
 extracting: INCHI-1-BIN/windows/64bit/dll/libinchi.zip  
 extracting: INCHI-1-BIN/windows/64bit/dll/inchi_main.zip  
  inflating: INCHI-1-BIN/windows/64bit/dll/libinchi.dll  
  inflating: INCHI-1-BIN/readme.md   
   creating: INCHI-1-BIN/linux/
   creating: INCHI-1-BIN/linux/32bit/
  inflating: INCHI-1-BIN/linux/32bit/inchi-1  
   creating: INCHI-1-BIN/linux/32bit/so/
  inflating: INCHI-1-BIN/linux/32bit/so/libinchi.so.1.07.gz  
  inflating: INCHI-1-BIN/linux/32bit/so/inchi_main  
  inflating: INCHI-1-BIN/linux/32bit/so/libinchi.so.1.07  
  inflating: INCHI-1-BIN/linux/32bit/so/inchi_main.gz  
  inflating: INCHI-1-BIN/linux/32bit/inchi-1.gz  
   creating: INCHI-1-BIN/linux/64bit/
  inflating: INCHI-1-BIN/linux/64bit/inchi-1  
   creating: INCHI-1-BIN/linux/64bit/so/
  inflating: INCHI-1-BIN/linux/64bit/so/libinchi.so.1.07.gz  
  inflating: INCHI-1-BIN/linux/64bit/so/inchi_main  
  inflating: INCHI-1-BIN/linux/64bit/so/libinchi.so.1.07  
  inflating: INCHI-1-BIN/linux/64bit/so/inchi_main.gz  
  inflating: INCHI-1-BIN/linux/64bit/inchi-1.gz  
@debian:~/Desktop/inchi_test$ 
@debian:~/Desktop/inchi_test$ cd INCHI-1-BIN/linux/64bit/
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ ls 
inchi-1  inchi-1.gz  so
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ chmod 775 ./inchi-1
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ 
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ obabel -:"c1ccncc1" -h --gen3d -O pyridine.sdf -x3
1 molecule converted
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ md5sum ./inchi-1
50ab0180934c33ff8da93a8a7ff05d1b  ./inchi-1
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ 
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ cat ./pyridine.sdf 

 OpenBabel09232411263D

  0  0  0     0  0            999 V3000
M  V30 BEGIN CTAB
M  V30 COUNTS 11 11 0 0 0
M  V30 BEGIN ATOM
M  V30 1 C 1.43303 0.0515849 0.000998063 0
M  V30 2 C 0.687995 1.22595 0.00150645 0
M  V30 3 C -0.694235 1.12564 0.00218175 0
M  V30 4 N -1.36237 -0.0485314 0.00552039 0
M  V30 5 C -0.611969 -1.17189 0.00692408 0
M  V30 6 C 0.773792 -1.17331 0.00331962 0
M  V30 7 H 2.51852 0.0903642 -0.00112859 0
M  V30 8 H 1.17153 2.1963 0.00126842 0
M  V30 9 H -1.31976 2.01344 6.15393e-05 0
M  V30 10 H -1.17257 -2.10232 0.0114491 0
M  V30 11 H 1.32543 -2.10632 0.00269552 0
M  V30 END ATOM
M  V30 BEGIN BOND
M  V30 1 1 1 2
M  V30 2 2 1 6
M  V30 3 1 1 7
M  V30 4 2 2 3
M  V30 5 1 2 8
M  V30 6 1 3 4
M  V30 7 1 3 9
M  V30 8 2 4 5
M  V30 9 1 5 6
M  V30 10 1 5 10
M  V30 11 1 6 11
M  V30 END BOND
M  V30 END CTAB
M  END
$$$$
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ ./inchi-1 ./pyridine.sdf 
InChI version 1, Software v. 1.07 (inchi-1 executable) 
Linux 64-bit Build (gcc 11.4.0) of Aug 10 2024 18:58:34

Opened log file './pyridine.sdf.log'
Opened input file './pyridine.sdf'
Opened output file './pyridine.sdf.txt'
Opened problem file './pyridine.sdf.prb'
The command line used:
"./inchi-1 ./pyridine.sdf"
Generating standard InChI
Input format: MOLfile
Output format: Plain text
Full Aux. info
Timeout per structure: 60000 msec
Up to 1024 atoms per structure


End of file detected after structure #1.   
Finished processing 1 structure: 0 errors, processing time 0:00:00.00
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ 
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ cat ./pyridine.sdf.txt 
* Input_File: "./pyridine.sdf"
Structure: 1
InChI=1S/C5H5N/c1-2-4-6-5-3-1/h1-5H
AuxInfo=1/0/N:1,2,6,3,5,4/E:(2,3)(4,5)/rA:11nCCCNCCHHHHH/rB:s1;d2;s3;d4;d1s5;s1;s2;s3;s5;s6;/rC:1.43303,.0515849,.00099806;.687995,1.22595,.00150645;-.694235,1.12564,.00218175;-1.36237,-.0485314,.00552039;-.611969,-1.17189,.00692408;.773792,-1.17331,.00331962;2.51852,.0903642,-.0011285;1.17153,2.1963,.00126842;-1.31976,2.01344,6.15393;-1.17257,-2.10232,.0114491;1.32543,-2.10632,.00269552;
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ 
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux trixie/sid
Release:	n/a
Codename:	trixie
@debian:~/Desktop/inchi_test/INCHI-1-BIN/linux/64bit$ 

Reply via email to