Open timoleistner opened 5 months ago
Thank you for the comment.
inchitomol
uses only InChI functions without going through MolGraph
objects.
Something may be wrong with inchitosdf
inside inchitomol
. It does not generate coordinates for stereochemistry.
ascorbicacid_inchi = "InChI=1/C6H8O6/c7-1-2(8)5-3(9)4(10)6(11)12-5/h2,5,7-10H,1H2/t2-,5+/m0/s1"
println(inchitosdf(ascorbicacid_inchi))
Output:
Structure #1.
InChIV10
14 14 0 0 0 0 0 0 0 0 1 V2000
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 C 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 O 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0
0.0000 0.0000 0.0000 H 0 0 0 0 0 0 0 0 0
1 2 1 0 0 0 0
1 7 1 0 0 0 0
2 13 1 0 0 0 0
2 5 1 0 0 0 0
2 8 1 0 0 0 0
3 4 2 0 0 0 0
3 5 1 0 0 0 0
3 9 1 0 0 0 0
4 6 1 0 0 0 0
4 10 1 0 0 0 0
5 14 1 0 0 0 0
5 12 1 0 0 0 0
6 11 2 0 0 0 0
6 12 1 0 0 0 0
M END
$$$$
When converting an InChI string to a mol object and then convert the mol object back to InChI, some of the last layers are missing.
InChI=1S/C6H8O6/c7-1-2(8)5-3(9)4(10)6(11)12-5/h2,5,7-10H,1H2
Trying this with the corresponding molblock works correctly, which leads me to believe that
inchi()
works correctly but can't extract this layer information from the molecular graph object.InChI=1S/C6H8O6/c7-1-2(8)5-3(9)4(10)6(11)12-5/h2,5,7-10H,1H2/t2-,5+/m0/s1
This can be dangerous if structures are only available via sdf files as
sdfilereader()
only yields molecule objects. Doinginchi.(sdfilereader(file))
parses incorrect/incomplete InChIs.