Does the SDF format have any benefit over SMILES?

The eMolecules page for example offers a complete dataset containing ~26 million structures. They're providing it either as a 300 MB SMILES archive or 6 GB SDF archive (1.5 GB and 50 GB uncompressed respectively).

Does the SDF file contain any information about the chemical structures, that the SMILES format does not contain?

First record in SDF:


Mrv1722001051816042D

37 40  0  0  0  0            999 V2000
4.3268    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
3.6124    0.3220    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
2.8979    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
2.1834    0.3220    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
1.4690    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
0.7545    0.3220    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
0.0400    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
-0.6744    0.3220    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
4.3268    1.5595    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
5.0413    0.3220    0.0000 O   0  0  0  0  0  0  0  0  0  0  0  0
5.7558    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
6.4703    0.3220    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
7.1847    0.7345    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
5.7558    1.5595    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
6.4703    1.9720    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
6.4703    2.7970    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
7.1847    3.2095    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
7.8992    2.7970    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
8.6137    3.2095    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
8.7852    4.0165    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
9.6057    4.1027    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
9.9412    3.3491    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0
10.7482    3.1775    0.0000 C   0  0  1  0  0  0  0  0  0  0  0  0
11.3002    3.7906    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
12.1072    3.6191    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
12.6592    4.2322    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
13.4662    4.0607    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
14.0183    4.6738    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
13.7212    3.2760    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
11.0031    2.3929    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
9.3281    2.7970    0.0000 C   0  0  2  0  0  0  0  0  0  0  0  0
10.0818    2.4615    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
9.3281    1.9720    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
8.6137    1.5595    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
7.8992    1.9720    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
7.1847    1.5595    0.0000 C   0  0  1  0  0  0  0  0  0  0  0  0
7.8992    1.1470    0.0000 C   0  0  0  0  0  0  0  0  0  0  0  0
1  2  1  0  0  0  0
1  9  2  0  0  0  0
1 10  1  0  0  0  0
2  3  1  0  0  0  0
3  4  1  0  0  0  0
4  5  1  0  0  0  0
5  6  1  0  0  0  0
6  7  1  0  0  0  0
7  8  1  0  0  0  0
10 11  1  0  0  0  0
11 12  1  0  0  0  0
11 14  1  0  0  0  0
12 13  1  0  0  0  0
13 36  1  0  0  0  0
14 15  1  0  0  0  0
15 16  2  0  0  0  0
15 36  1  0  0  0  0
16 17  1  0  0  0  0
17 18  1  0  0  0  0
18 19  1  0  0  0  0
18 35  1  0  0  0  0
19 20  1  0  0  0  0
19 31  1  0  0  0  0
20 21  1  0  0  0  0
22 21  1  0  0  0  0
22 23  1  0  0  0  0
22 31  1  6  0  0  0
23 24  1  0  0  0  0
23 30  1  1  0  0  0
24 25  1  0  0  0  0
25 26  1  0  0  0  0
26 27  1  0  0  0  0
27 28  1  0  0  0  0
27 29  1  0  0  0  0
31 32  1  6  0  0  0
31 33  1  0  0  0  0
33 34  1  0  0  0  0
34 35  1  0  0  0  0
35 36  1  0  0  0  0
36 37  1  6  0  0  0
M  END
>  <EMOL_VERSION_ID>
9986

>  <EMOL_PARENT_ID>
9986

https://www.emolecules.com/search/#?query=9986&querytype=emoleculesid


Letting MarvinJs draw it:

The same record in SMILES:

CCCCCCCC(=O)OC1CC[C@]2(C)C3CC[C@]4(C)[C@H](CCC4C3CC=C2C1)[C@H](C)CCCC(C)C 9986 9986


Letting MarvinJs draw it

Obviously it is mirrored. Since I am no chemist, would it make any difference for you? Should I expect more discrepancies like that, even more complicated ones?

The question stated differently: Does it give a scientist searching for a catalogue of structures a real benefit when using the vastly more explicit SDF format? From a programmer's perspective, carrying around gigabytes is far more difficult than megabytes, so the benefit should be reasonable.

• Is is worse than just mirrored. Looks like the stereocenters are simply assigned some random configuration. – Ivan Neretin Mar 31 at 15:30
• SMILESSDF − (atomic coordinates). – andselisk Mar 31 at 15:37
• The SDF allows storage of additional data/metadata - supplier SDFs often contain things like CAS, catalogue info, names, salt form info etc. If you JUST need a structure there is no benefit – NotEvans. Mar 31 at 17:08
• Unzip the downloading file on the fly using the Linux shell: curl https://downloads.emolecules.com/free/2021-03-01/version.sdf.gz | zcat > emolecules.sdf.txt and interrupt it after a few seconds by ctrl+c gives you "enough from the beginning, but not all of it to crash your editor" – Marc Wittke Mar 31 at 18:47
• @andselisk, if you need a read-only editor - less will open it instantly (f to move forward, b to move backward, g - jump to the beginning, G - jump to the end). – Stanislav Bashkyrtsev Mar 31 at 21:50

In my experience, the most relevant type of information that a (classic) SMILES does not encode, whereas a SDF does, is about stereochemistry.

Most commonly, the explicit stereocenters in a molecular representation with no further information can be interpreted as 'absolute', i.e. fixed in the configuration formally encoded by the literal SMILES, or as belonging to an 'and enantiomer' group, i.e. all the stereocenters in the molecule must be interpreted as the represented ones + their mirror image.

This distinction is made in an SDF by a specific 'flag'.

https://en.wikipedia.org/wiki/Chemical_table_file#Counts_line_block_specification

Going even further, one can decide to have within the same molecule separate groups of 'absolute', 'and' and even 'or' stereocenters, all of which can be encoded in special versions of SDF's.
See 'enhanced stereochemical representation' in this document, for instance:

http://help.accelrysonline.com/insight/2016/content/pdf_files/bioviachemicalrepresentation.pdf

A classic SMILES can't tell you any of this, so when you only have a SMILES string and no additional information, you may 'assume' that it represents the depicted species and nothing else; but I can assure you that doing that can be the source of endless trouble, especially when the representation is used to buy real chemical samples from vendors, or even just for statistical modelling.

Imagine for instance a case where the substance that the originator of the SMILES 'means' to represent is in fact an 'and' mixture (thus of at least 2 enantiomers). If you had an SDF, you would know that for sure, because the 'chiral flag' would be 0. But with only a SMILES you don't know.
Say you have biological activity data associated to this SMILES. The activity might have been caused by the depicted species, or by its mirror image.
But if you do not consider that, you will associate one specific 'absolute' species to activity, maybe the wrong one, just because you don't know any better.

PS
Unfortunately I must disagree with some of the comments above.
SMILES can perfectly encode salts and solvates. Fragments in a SMILES are separated by '.'.
As for the inversion of the stereocenters when converting a SMILES text to representation, well that for sure should never happen, so if it does, there is something wrong in the software. There are very clear and unambiguous rules to decide how to convert '@' and '@@' to the correct configuration - otherwise it would be pretty useless, to be honest.

• +1 Agreed that SDF can provide enhanced stereochemical information not in a SMILES. I'm not sure that particular example does .. I'm pretty sure it's auto-generated from the SMILES by eMolecules. – Geoff Hutchison Mar 31 at 18:23
• @GeoffHutchison : you're probably right about this particular catalogue. I was just answering the OP's question, which was more general: "Does it gives a scientist searching for a catalogue of structures a real benefit when using the vastly more explicit SDF format?". In fact, in the example he showed, the molecule has multiple explicit stereocenters, and the chiral flag is 0, so the face-value interpretation a cheminformatician would give of the SDF is: racemic mixture; the SMILES instead would probably be assumed to be absolute. So depends really how much one cares about this aspect. – user6376297 Apr 1 at 14:15
• In my work as a cheminformatician, I did not want to make assumptions, so I asked one by one the chemical vendors who provided SDF's to us how I should interpret their chiral flag (intentionally set to 0 or 1, or not?), and all the one who provided SMILES to us if we should assume their molecules were the literal SMILES ones or mixtures. Some of them knew what I was talking about and answered; many others frankly were quite unprepared and cooked up some unsatisfactory and unconvincing story. But when your research can be severely harmed by such assumptions, you let someone else make them :) – user6376297 Apr 1 at 14:19

These two formats have different purposes. SMILES encodes only covalent connectivity while SDF also (in principle) specifies the conformation of the molecule (by including atomic coordinates).

SMILES doesn't attempt to represent the three-dimensional structure of the molecule. For instance, the alkane tail of your molecule is quite flexible and is likely to occupy many different rotamers at standard temperature. SMILES does not specify a rotamer. On the other hand, SDF includes the three-dimensional coordinates of each atom. While you can generate atomic positions from a SMILES representation, that would require energy minimization using some model of bonded and nonbonded forces or a quantum chemistry calculation. SDF explicitly specifies the conformation, which could come from an empirical force field, quantum chemistry, or experiment, like NMR or x-ray crystallography. Or the atomic coordinates could just be generated automatically from a two-dimensional diagram (as in your example) or just be complete garbage.

So you should note that the atomic coordinates in the file you include all have z components of zero. This is not at all a realistic conformation for your molecule. At minimum the cyclohexane rings would be puckered and there is no way for most of the hydrogen atoms to be in the same plane as everything else. Just because an SDF file includes atomic coordinates, doesn't mean these coordinates are any good.

• Re «z components of zero», this is like running a conversion from smiles to .sdf with OpenBabel but omitting its --gen3d toggle. In addition, often energetic minimizations of conformers are about isolated, individual molecules. These geometries need not be the ones about molecules in the solid (or even crystalline) state. Here, the intermolecular interactions may render the question for «what is the most favourable geometry?» with multiple shallow minima more difficult, despite public blind tests. – Buttonwood Apr 1 at 17:26
• @Buttonwood I totally agree. Thanks for the complementary information! – WaterMolecule Apr 1 at 17:36

tldr; SMILES is often used as a compact format for chemical database searching

The SMILES representation is a compact string format indicating the atom-bond graph including stereochemistry.

In some cases the SDF may include additional information not possible to store in a SMILES. It will almost always include 2D or 3D coordinates for layout, so presentation is helpful.

Because the SDF allows arbitrary key/value property storage, there have been several extensions. Most notably there are efforts to support "zero-order bonds" for metal coordination, e.g.:

J. Chem. Inf. Model. 2011, 51, 12, 3149–3157

In this particular case, there doesn't seem to be a lot of chemical information in the SDF beyond what's in the SMILES. (I'd guess that the SDF are auto-generated from the SMILES.)

One other caveat. The typical "v2" SDF indicated above is limited to 999 atoms and 999 bonds. Many programs support the v3000 SDF with larger molecules, but YMMV.

In principal, there's no limit to the length of a SMILES, although I suspect many programs would choke on something really big (e.g., >32k atoms).