Jump to content

Wikipedia:Manual of Style/Chemistry/Structure drawing

From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 151.163.2.8 (talk) at 15:31, 11 October 2010 (→‎Drawing in BKChem). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

These guidelines are necessarily quite technical, and are intended for editors with some experience of drawing chemical structure diagrams and reaction schemes. For a less technical overview of the issues involved, see Wikipedia:Molecular structure diagram.

General

Chemical structures and reaction schemes should conform to the following:

  • Images should be drawn with a molecule editor, never freehand
  • ACS settings should be used for both structures and reaction schemes. These settings are all available as templates in the chemical drawing programs ChemDraw, Isis/Draw and ChemSketch. Please use sans-serif fonts like Arial.
  • Indexes used for labelling must be superscripted: R1-CH2-R2 (not R1-CH2-R2)
  • Do not include English text in images: this prevents their reuse in other languages.
  • Methyl groups should be denoted with “CH3”, not “Me”, unless they are bound to a heteroatom (for example, “NMe2”). This is to avoid confusion with “Me”, the German abbreviation for metal (Metall). The use of “Et”, “Pr”, etc., is discouraged. By default, “Ph” denotes phenyl and “X” halogen.
  • The use of explicit methyl groups in the following cases is a stylistic choice, and both forms are generally acceptable on Wikipedia:
    • methyl groups attached to a ring or as branches in a longer carbon chain;
    • methyl groups at the end of a carbon chain.
  • If labels for structures are desired, consider the use of bolded numerals, which are language-neutral.
  • Information about stereocenters and stereoisomerism should be included if available (e.g. by using wedged bonds).
  • For articles on racemates, only one enantiomer should be depicted ordinarily. In cases where no atom is stereogenic, it may be helpful to depict both enantiomers, e.g. [Co(ethylenediamine)3]3+.

Technical considerations

  • Images should be uploaded in PNG or SVG format. PNG images should be around 600-720 dpi. A transparent background should be used. Images should still be readable when scaled down to 450 pixels to prevent conflicts with the Chembox.
  • SVG images are desirable because they are infinitely scalable, while remaining compact. However, support for SVG images among common molecule editors is limited, and may not be rendered correctly on Wikipedia.
  • Scanned images tend to be of poor quality. Scanned images of books or journals may violate copyright. Do not upload them.

Suggested molecule editor settings

ACS templates are available in most chemical drawing programs.

Drawing in ChemDraw

  • From the “File” menu, choose “Apply document settings from → ACS Document 1996”.
  • Draw the structure, and save it as a ChemDraw file.
  • If you drew the structure before applying any settings, then you need to select the object, open the “Object” menu and choose “Apply document settings from → ACS Document 1996”.
  • Then save it as a TIFF file, to be read by an image editor such as The Gimp or Irfan View (see below for details).

The ACS settings are as follows:

  • Chain angle: 120 degrees
  • Bond spacing: 18% of length
  • Bond length: 0.508 cm (14.4 pt)
  • Bond width: 0.071 cm (2 pt)
  • Line width: 0.021 cm (0.6 pt)
  • Margin width: 0.056 cm (1.6 pt)
  • Hash spacing: 0.088 cm (2.5 pt)
  • Captions: Arial 10 pt
  • Atom labels: Arial 10 pt
  • Bond angles and length: “fixed” is recommended

Also recommended: For minus symbols on atoms, change the font for the minus symbol to “Symbol” for clarity.

Drawing in IsisDraw

Note:IsisDraw 2.5 is available free to educators and students (with registration) from Symyx. Unfortunately, the “Export” commands are unreliable, often producing unreadable image files (TIFF, JPG, WMF). Image file may be generated by using MS' Copy feature, followed by a Paste into another program. Photoshop Elements or Paint may be used. The image can then be saved as a .PNG file. A further possibility in Windows is to use the Shift-PrtSc key combination to copy a screenshot into the copy buffer. Paste that into MS Paint and crop it. Printing to an EPS file and converting to SVG works OK - see SVG section below.

  • From the “Options” menu choose “Read Journal or Custom Settings” then “JACS”. These ACS settings are as shown above for ChemDraw.
  • From the “Options” setting choose “Settings” then under “Chemical Drawing” select hydrogen labels “On hetero” in place of “None”. Under “Line/Fill Arrow” select “Transparent” in place of “Opaque”. If necessary “Apply settings”.
  • Draw the desired structure/scheme, then (assuming export as TIFF or WMF fails) print using a high quality laser printer.
  • Scan in the image using 300 dpi.
  • Open using an image editor such as The Gimp or Irfan View, then add border and save as described below.
  • It is also possible to use the lasso tool to select your molecule, and then copy and paste it into another program, such as Adobe Photoshop.
  • MOL files can be converted SVG graphics format by Mol2Svg[1].

Drawing in SymyxDraw

The same link as IsisDraw will allow a free download of SymyxDraw 3.2. This is similar to IsisDraw but some of the “bugs” have been sorted out, so a TIFF export is now possible.

Drawing with WinDrawChem

There is a free, open source program called WinDrawChem (the Windows version of XDrawChem) that appears to work well. Link

Drawing in BKChem

There is a free, open source program called BKchem. You can save the following configuration files to ~/.bkchem under Linux or C:\Documents and Settings\<username>\application data\bkchem to get configuration according to Wikipedias Manual of Style.

standard.cdml:

<?xml version="1.0" ?><cdml version="0.15" xmlns="http://www.freesoftware.fsf.org/bkchem/cdml">
  <info>
    <author_program version="0.12.2">BKchem</author_program>
  </info>
  <standard area_color="" font_family="Arial" font_size="24" line_color="#000" line_width="0.06cm" paper_crop_margin="5" paper_crop_svg="1" paper_orientation="portrait" paper_type="Legal">
    <bond double-ratio="0.85" length="1.4cm" wedge-width="0.18cm" width="0.21cm"/>
    <arrow length="1.6cm"/>
  </standard>
</cdml>

prefs.xml :

<?xml version="1.0" ?>
    <bkchem-prefs>
        <lang type="StringType">en</lang>
        <geometry type="StringType">1016x522+4+27</geometry>
        <recent-file1 type="StringType"></recent-file1>
        <recent-file2 type="StringType"></recent-file2>
        <use_real_minus type="IntType">0</use_real_minus>
        <default-dir type="StringType">~</default-dir>
    </bkchem-prefs>

Generating PNG files

Most molecule editors cannot produce .PNG images directly with the requirements outlined above. The image processing step also allows a canvas (margin) to be added (this is usually absent from the molecule editor output).

  • Save as: TIFF black/white bitmap with a resolution of 720 dpi (small molecules) to 240 dpi (large molecules) (in ChemDraw under the Options button in the Save as TIFF dialog).
ChemDraw / ChemBioDraw 11 (2007) cannot save black and white TIFF images. Therefore, save as a 1200 dpi greyscale TIFF image and decrease the color depth to 2 bit (black and white) during image processing.
Image processing (Photoshop or Irfan view):
  • Add canvas of about 5% to each side (test it, usually around 30 pixels) (Photoshop: Image:Canvas Size, relative, 10% width, 10% height)
  • Save as a PNG black/white bitmap (color depth: 2) with transparent background.

Generating SVG files

Using ChemDraw for Windows 12

  • Draw the structure in ChemDraw 12 or later
  • Go to File → Save As
  • Choose Scaleable Vector Graphics (*.svg) as the save as format.

Using ChemDraw for Mac 12

  • Draw the structure in ChemDraw 12 or later
  • Go to File → Save As
  • Choose PDF as the save as format
  • Upload the resulting PDF to the Texterity FreeSVG converter and you should end up with a very light SVG.

Using Inkscape

This method works only if your molecule editor is able to export files in Windows Metafile format. For example, ChemDraw supports this, as does ChemSketch.

  • Draw the structure in your molecule editor, and save it as a Windows Metafile (.wmf), Enhanced Metafile (.emf), or Encapsulated Postscript (.eps).
  • Open the saved file in Inkscape.
  • Resize the picture about 400%, then click to File→Document Properties→Fit page to selection.
  • Select the molecule and click Path→Object to path. (to workaround commons:librsvg bugs with fonts)
  • Click File→Save as to save file as Plain SVG.
  • Optional: Run generated SVG file through WebSCOUR to strip a few more kilobytes.

Using Scribus

Alternative (but little more complex) way to generate high quality and small size SVG files. One needs to download and install both Scribus and Ghostscript to archieve EPS to SVG conversion.

  • Draw the structure in your molecule editor, and save it as a Encapsulated PostScript file (.eps) - many of the Apple print drivers (an Apple printer is not required) that print to a PostScript printer can be set to EPS in the print dialog options, thus printing to a file generates an suitable EPS file.
  • Open the PostScript file in Scribus. Note the image size and set the paper size to about 10px larger than the largest dimension.
  • Go to File → Export → Save page as SVG.
  • Optional: Run generated SVG file through WebSCOUR to strip a few more kilobytes.

MOL2SVG Converter

MDL/Symyx MOL file can be converted to wikipedia recommended SVG graphics format by Mol2Svg converter freeware [1]. However, note the following issues with Mol2Svg:

  1. It will construct bond lines from the co-ordinates of the mol file - i.e. all bonds join up without a gap for the hetero atoms, it will then place a white rectangle over the bond join, and a black letter. This looks OK when shown on a white background, but not on a coloured background.
  2. It takes data from the mol file and fits it to the size of svg requested (in the main screen), so one needs to adjust the svg size and font size to get the desired ratio of bond length to font size.
  3. The letters are placed at the bottom of the rectangle described above (in No.1). This is incorrect, they need to be in the centre.

A workaround of the issues is to:

  • Do several trial conversions altering the svg and font size until correct appearance (view in Inkscape).
  • Then edit in Inkscape - Ungroup drawing, and carefully move letters up (Alt-UpArrow - for fine movement) to correct place
  • If planning to use a non-white background then either add a large white rectangle that covers the whole molecule (and then place behind it) OR pre-colour the small blanking rectangles behind the letters.
  • Optional: Run generated SVG file through WebSCOUR to strip a few more kilobytes.

Please upload images to Wikimedia Commons and not to the English Wikipedia. This enables images to be used in other Wikipedia languages and other Wikimedia projects and makes updating images much easier. It is also simpler to find images in the Commons category structure compared to Wikipedia. To upload images to the Commons, you must be a registered user there. Please use the same username as on the English Wikipedia.

Images of chemical structures and reaction schemes are assumed to be copyrighted and uploaded images must have a correct copyright tag: please add {{PD-self}} to release the image into the public domain. Images released under “non-commercial use only” licences are not accepted and will be deleted without warning, as will images without a tag.

  • Go to the upload page (you may want to bookmark this)
  • Paste this text to the summary template:
For ChemDraw:
{{Information
| Description= {{en|Chemical structure of [[:en:...|]]}}
| Source= {{Own}}
| Date= 2024-08-8
| Author= ~~~
| Permission= {{PD-chem}}
| other_versions=
}}

== Comments ==

High-resolution black/white .PNG made with [[:en:ChemDraw|ChemDraw]] and [[:en:IrfanView|IrfanView]] — see [[:en:Wikipedia:Manual of Style (chemistry)/Structure drawing|WikiProject Chemistry - structure drawing]] for detailed instructions. Please drop me a note if you need the source file.

[[Category:Chemical structures]]
For BKchem:
{{Information
| Description= {{en|Chemical structure of [[:en:...|]]}}
| Source= {{Own}}
| Date= 2024-08-8
| Author= ~~~
| Permission= {{PD-chem}}
| other_versions=
}}

== Comments ==

CD-SVG file made with [[:en:BKchem|]] — see [[:en:Wikipedia:Manual of Style (chemistry)/Structure drawing|WikiProject Chemistry - structure drawing]] for detailed instructions.

[[Category:Chemical structures]]
  • Replace the “...” with the Wikipedia article name and your username, respectively
  • The date is already set to the current date
  • Browse to your file and select it. Optionally, change the final image name in the box below
  • Do not select a licensing from the upload form — the tags are already in the pasted text
  • Upload the file
  • Change your structure to the most specific subcategory (or subcategories) of Category:Chemical compounds

Templates

The following templates can be used on Wikipedia and Commons to mark wrong or poor chemical structures:

Wikipedia: {{Disputed diagram|reason}}

Commons: {{Disputed diagram|reason}}

Template:Disputed diagram
Wikipedia: {{Disputed chem|reason}}

Commons: {{Disputed chem|reason}}

Wikipedia: {{Low quality chem|reason}}

Commons: {{Low quality chem|reason}}

See also

Notes