I'm trying to generate a figure for a physics textbook to show examples of the vector addition of dipole moments in small molecules. For this purpose, I would like to render pictures of a bunch of small molecules, such as CS2, formaldehyde, benzene, SF6, and chloroform. I've got avogadro running on my linux box, but I'm finding it very time-consuming and confusing to construct the molecules using the GUI. Is there anywhere that I could find pre-made CML files for small molecules like these?
-
2$\begingroup$ Do you have access to chemoffice? Chem3D can produce 3D structures from formulas and if you run the optimization in there it should be good enough for this application. Other than that: how many molecules are we speaking about? With the right software making each of those takes less than a minute each including low level geometry optimization. If it's not too many I'm happy to help, we can speak in chat. Another option: you can open the 3D model in jmol from their wikipedia page and extract the *.mol file which to my knowledge can be opened by Avogadro. $\endgroup$– DSVANov 5, 2017 at 0:37
-
2$\begingroup$ @DSVA: Thanks for the ideas, and for the offer of help. This pointed me to the info that I'll give in an answer to my own question. $\endgroup$– user6999Nov 5, 2017 at 1:43
4 Answers
DSVA's comment pointed me to a database that contains the information I need. The wikipedia articles contain links to an app called jsmol, but that app appears to be getting its data from a database called ChEBI. You can search the database using search terms such as "formaldehyde" or "sf6." The entry for each molecule contains a link to a .mol file, which avogadro can read.
Another location, if you're ok with the mol2 format (which Avogadro can open), PQR has links to download structures on every page. For example, on the cadaverine page:
This will trigger a browser download dialog box for a mol2 file.
Consider a blend of Wikimedia Chemical Structure Explorer and OpenBabel.
Wikipedia includes many entries about chemicals, and often, the property box right on top of the page (left, or right, depends on your script) include the condensed structure representation as a SMILES string:
(credit, the Arabic entry about toluene)
With above mentioned freely available, open source structure explorer which you may run without installation from a web browser (further description, e.g., in J Cheminform 7, 10 (2015)) you may query all of these entries by a (sub)structure search, a keyword, or a combination of both to access the English article and find the Wikipedia page on the right hand pane:
(screen photo of the explorer)
As by today, the public index contains 18484 entries.
With the help of OpenBabel, you may convert the SMILES string into the CML format (the the documentation presents many additional input/output formats, too). After installation of OpenBabel, the program may used from the CLI /
cmd.exe
, or from a GUI. Then, you have at least two options:a) You save the SMILES string from wikipedia in as file, for example
toluene.smi
. If you opt for a conversion from the CLI, the commandobabel -ismi toluene.smi -ocml -O toluene.cml
writes the new file
toluene.cml
.b) You paste the SMILES string into the command on the CLI when writing
obabel -:CC1=CC=CC=C1 -ocml -O toluene.cml
to generate the
.cml
file right in the current working directory. (No, do not set a space between the colon and the SMILES string.)The documentation lists many more examples and showcases the use of the GUI. OpenBabel may work on multiple input files at once (e.g.,
obabel *.xyz -opdb -m
to convert all.xyz
of a folder into.pdb
) and interacts well with other programming languages, too (introduction).
If you have Microsoft Word installed on a Windows machine you can use our open source Add In called Chem4Word to search the ChEBI database and import structures. Once imported they can be optionally edited, then exported as CML.
You can find Chem4Word here https://www.chem4word.co.uk/download