Wikipedia talk:WikiProject Chemistry/Structure drawing workgroup
From Wikipedia, the free encyclopedia
OK, it looks like we have a quorum already! I forgot to post on WP:Chemistry last night, that's now done, I hope a few others may join us from there. I think first we need to establish what software we are using, and then start discussing simple 2D structure drawing settings. If people want to discuss other issues, though, please feel free.
[edit] Software we use
Please list what you are using to draw and manipulate images, be it 2D, 3D, whatever. If you have access to software you are not actively using, list that in parentheses.
Name (t)(c) | Molecule editors | Graphics programs | Web browsers |
---|---|---|---|
Martin Walker (T C ) | ChemDraw Ultra 9.0, Isis Draw 2.4/2.5 | IrfanView, (Adobe Photoshop) | Firefox 0.9, IE 6.0 |
Ben Mills (T C ) | ChemDraw Std 8.0, (ISIS/Draw); Chem3D, Accelrys DS Viewer, iMol | Adobe Photoshop Elements 3.0 | Safari 2.0, IE 6.0 |
Rune.welsh (T C ) | ChemDraw 8.0, (ACD/Chemsketch) | Irfanview | Firefox 1.5, Opera 8.x9 |
Ed (T C ) | ChemDraw (ISIS/Draw) | (P.E. 2.0) | Safari 2, IE 6 |
Boris (T C ) | ISIS/Draw2.5(ChemSketch 8.0) | MS Paint and InfanView or Dell Photo Editor |
F1.0, I6.0, N7.2, O7.54 |
Nevermore (T C ) | ChemDraw 8.0, ISIS/Draw 2.4 | ACDSee 7, Corel Photopaint 9 | Firefox 1.5, IE 6 |
Physchim62 (T C) | ASD/ChemSketch 8.0, ISIS/Draw 2.5 | The Gimp | Firefox 1.7 |
~K (T C) | ChemDraw 4.5 (It's old, but works well.) | The Gimp | Firefox 1.5 |
Ragesoss (T C) | RasMol, experimenting with new SVG-output drawers | The Gimp | Firefox 1.5, Opera 8, IE 6 |
[edit] 2D drawing settings on molecule editors
Just to kick things off, I'll post a few comments.
- I have tried the ChemDraw settings suggested in the style guide and found that the images are huge. The settings can be used for drawing a single structure of a small molecule, but even there I find the font ratio poor in many cases.
- I think for general article info we may want to emulate books (such as Wade, Carey, etc) rather than journal settings. In other words, larger images, use of colour to explain points. For more advanced topics and structures involving more complex molecules, we should use one of the journal settings such as ACS or RSC. For a previous discussion along these lines see this and the related article at Aldol_reaction. (This article highlights another issue, how to include pictures and drawings side by side!)
- It is regarded as good practice to create pictures larger than they are typically used in our articles. However, this creates problems. How can we make all settings on the screen the same (say, ACS) style, if this one is scaled differently from that one? Also, for small settings like ACS the atom labels are large in comparison to the bond length for clarity, whereas for larger book-style settings the atom labels are comparitively smaller - so how will these things scale if people use the same image at different sizes?
- Whatever settings we choose, we should make it easy for new people to put those settings into their molecule editor, whatever they use. Many contributors don't have ChemDraw and are restricted to a variety of freeware.
Comments, anyone? Walkerma 06:31, 9 April 2006 (UTC)
- Chemdraw and Chemsketch (and probably other programs too) allow to save drawing settings as a template. Ideally, the program used to draw structures should be irrelevant as long as we come up with a set of templates for each one and make them easily available to editors. -- Rune Welsh | ταλκ 14:10, 9 April 2006 (UTC)
[edit] Chemdraw vs ISIS vs ChemSketch
The ISIS version is free for private use, but I do not know if Wikipedia is included with this licence. If yes, a free program would be a good thing - then everybody can download and draw images. --Stone 10:49, 9 April 2006 (UTC)
- Another free program that anyone should be able to get access to is ChemSketch, but I'm not very familiar with its capabilities or suitablity for creating optimal images for Wikipedia. --Ed (Edgar181) 15:42, 9 April 2006 (UTC)
I'm quite familiar with Chemsketch. I personally find it easiest to use. Check out some of my contributions. Might not be the best, but it is presentable for many purposes. Some drawbacks (or maybe I haven't figured out how to fix it yet)
- how to distribute objects evenly (vertically or horizontally)
- how to make special reaction arrows
- how to use non-standard valence or oxidation state
- how to stop displaying the terminal -CH3 --Rifleman 82 07:38, 1 May 2006 (UTC)
[edit] The size of the images
What's the point of creating and uploading THIS Image:1,3-bisphosphoglycerate.png kind of image? The drawing style i use is - bond-length: 0.24in; bond-width: 0.7pt; font (main text): 9pt, Arial, bold; font (super- and sub-scripted text): 7pt Arial normal. and i'm trying to use it with ChemSketch as well. -- Boris 04:20, 10 April 2006 (UTC)
- OK, let's focus on single structure images for now. Boris, can I take it that you're saying we don't need to upload huge files?! I agree, but I think equally well drawings like Image:Prostaglandin I2.png and Image:Cysteamine.png are too small. If someone wanted to use these drawings on the front page of their term paper, or even just on a different page at double its size, it would be way too small. I have seen this problem in the past. For example in the formic acid page, if we wanted to get a reasonably prominent image of the structure we couldn't in version. I think we need a happy medium. I have been told that wiki software scales images down automatically - so if you have a 100 k image showing on a page at one quarter of its original area it only takes 25k of downloading - can anyone absolutely confirm this? If this does not happen we need to limit the size of things more strictly.
- In a recent image I created in ChemDraw and posted, Image:Quassin.png, I used 1.058 cm (0.4167 in or 30 pt) bond lengths, 1pt bond widths, 14pt Arial font for atom labels. I'm not wedded to those settings, they were derived from the settings given in the style guide by scaling down in size. I'd be happy to see the font a little bigger or the bond lengths a little smaller for when the image is shown smaller, as on the quassin page. I then saved it as a TIFF file (this image came out as 1037 x 764. I then opened it in IrfanView, added a 75px margin as recommended in our style guide, and saved it at 593 x 457px (this is probably half the size of the original).
- Regarding IsisDraw, I can't get the "Export to TIFF" (or to JPG) in IsisDraw 2.5 to give me a file readable by IrfanView. Last year, before I got ChemDraw, I made my pics in IsisDraw then scanned them in, for an example see Image:Menthol structures.png. For this I simply used the default settings for IsisDraw, with one exception - go to Options-Settings-Chemical Drawing and on "Show hydrogen labels" select "on hetero" in order to make sure O-H and NH2 groups don't appear as just O and N (Boris, you need to fix this in the cysteamine pic, IMHO). I scanned the image in at (I think) 300 x 300 dpi, then scaled it down in size to get the image shown. I like the proportions of that image better, but obviously a scanned image is going to have poorer resolution - though this one doesn't look too bad.
What do others use for their settings for simple compound structures in ChemDraw etc? Any comments on the above? Walkerma 16:16, 10 April 2006 (UTC)
- Some time ago I wrote a small tutorial where I listed the settings I use to create simple structures in Chemdraw. See it here! -- Rune Welsh | ταλκ 17:17, 10 April 2006 (UTC)
- I use RuneWelsh's settings (or something very similar). I think they produce nice images - most of them need to be scaled down in the articles, but having large images available is good, in my opinion, because it allows for a wider range of uses than smaller ones. --Ed (Edgar181) 17:29, 10 April 2006 (UTC)
-
-
- I use a modified version of Cacycle's settings:
- Line width: 0.107 cm
- Bold width: 0.4 cm
- Hash spacing: 0.3 cm
- Bond length: 2.566 cm
- Font: Arial 45 pt
- Copy to clipboard and paste into Photoshop (or save as TIFF black/white bitmap if clipboard method fails)
- Image processing (Photoshop Elements 3.0):
- Resize image to 1000px width
- Add canvas of 50 pixels to all four sides (Photoshop: Image:Canvas Size, relative, 100 pixels width, 100 pixels height)
- Save as a PNG black/white bitmap
- I use a modified version of Cacycle's settings:
-
-
-
- I sometimes modify some of these settings to suit an individual image, usually hash spacing to make sure there are enough hashes in a hashed bond (eg. more than two) so you can tell it is actually a hashed bond!
-
-
-
- I am, however, happy to use whichever settings we decide are preferred.
-
-
-
- As for image size, what's wrong with uploading large images? You can resize them to whatever size you like. I haven't noticed Wiki taking longer to resize larger images. Maybe it does though. I don't think colouring atoms by element in structures is a good idea - it's redundant and is hard to read. Yellow against a white background for sulfur is hard to see. Fine for 3D though, as the shadow effects make yellow perfectly visible against white. With ISIS/Draw, can't you just copy to clipboard and post in Photoshop or IrfanView?
-
-
-
- Happy drawing! --Ben 17:38, 10 April 2006 (UTC).
-
- As far as I know the images produced using the settings I linked above tend to render rather nicely when they are resized automatically by the wiki software. Large images also have the advantage that they can be manipulated more easily to look nice on print. -- Rune Welsh | ταλκ 19:02, 10 April 2006 (UTC)
-
- Ben, you're right. Even though there's not an export option in ISIS, you can copy/paste to a graphic editor (including Window's Paint, which is not the best choice, of course). I also verified that the size of the image doesn't depend on the zoom level, so it's a reliable option. But be aware it adds a 6px canvas on each side (no matter what size the image is). This copy/paste mode also works for ChemDraw, but the canvas is 3px this time.
-
- I've only uploaded a couple of images using Rune.welsh's version of ca Cacycle's settings, very similar to those used by Ben. I guess they are OK to most purposes. I agree with Ben about resizing hashed bonds when needed, but it's a minor issue. I do think it is important to keep the images big. I think it's not such a great difference in file size, but the images render nicely when resized by Wikipedia, with a beautiful antialias, and they can be used elsewhere without worrying about pixelation. Finally, I find it really important to show hydrogens in heteroatoms, it should be a standard. --Nevermore78 20:39, 10 April 2006 (UTC)
- Walkerma, I’ll go with your idea for the size - here is an example (600X335), which could be made to be exactly twice (640X357) the original size (320X179). Why I use (320X179) you might ask? Well few years back when I started my own website I thought that this size could fit most of the structure and as I had already had quite a number of them I didn't want to resize the background rectangular that set the dimensions, b/c that resizing would had been a very time consuming work, so I stuck with this funny size. Anyway, I used to draw these kind of diagrams in black and white. Few months ago I started to color them because I think that the coloring engages the color processing centers in the brain and thus allows more information about the structure to be presented in the image and faster to be processed by our brains - in molecular biology when showing the surface charge distribution of a molecule, mostly proteins, the blue symbolizes the (+) charge and is almost exclusively associated with the N-atoms, while the red symbolizes (-) and is associated with O-atoms, the same goes for S, P, etc. all these atoms have their properties so the compound is expected to "behave" in a certain way where these atoms are present, and its a lot easier to spot their position in the structure when they are colored that when they all are in plain black. I have omitted the H-atoms because as I said before they don't provide any useful information except when they are at optical center such as those in the steroids, or the morphinanes, if the diagram has "-O" then that's a hidroxyl group, "-O-O" - peroxy, "=O" carbonyl, the same for N - "-N" primary amine, "=N" imine, "-N-" secondary amine, etc - we know the number of the hydrogens because we know the properties of the atoms and we have already agreed for no disociation states in the infobox images, if we can draw without the carbon hydrogens and we are used to it why not without the rest. I don't show the atoms at the terminal -CH3 groups either, the way you have in Image:Quassin.png. The hydrogens are very important in the reaction mechanism diagrams though or in those "origin" images. So my drawings show all atoms but the hydrogens, and those that are not C are in colored text - simple with style.
- I don't have 40 something inches screen so i will not use the "2.5 cm bond, 45pt font" settings just to have those "printer-friendly" big azz images. No way. But if i export the 320X179 diagram like this - "Export-->Other...-->JPEG" - it is converted into a 2397X1341 ".wmf" that can be downsized by a good Image editing program (InfanView does not give good results, i use DellPhotoEditor instead, but it's good for file convertion) as much as i want (see the begining of the reply) including all the way to the original dimensions or even smaller than that. -- Boris 02:52, 11 April 2006 (UTC)
-
- Thanks for your explanations, Boris. We seem to have a majority of folks favouring large images, but this is not unanimous. I have posted a question at the village pump to help resolve the issue about automatic resizing of images once and for all. Personally, I think Rune Welsh's and Ben's settings look really nice on the Wikipedia page, and I would like us to standardise on something that looks like that. At the same time, I can understand Boris's complaints about gigantic images - I think a typical steroid would be too big to see on my screen while drawing - surely our pictures don't need to be that big? I wonder if we can come to some sort of compromise, mostly by scaling Rune Welsh/Ben's numbers by 2/3.
- Chain angle 120
- Bond spacing 15%
- Fixed length 1.693 cm (48 pt)
- Bold width 0.2 cm (5.67 pt)
- Line width 0.071 cm (2 pt)
- Margin width 0.106 cm (3 pt)
- Hash spacing 0.071 cm (4 pt)
- Arial 30pt as the Atom labels font
- Times New Roman 30pt for captions, in case we need to add a small caption.
-
- I altered the Quassin image to these settings in ChemDraw. I saved it as a TIFF file, then opened it in IrfanView. I resized to 600px width, put a 50px margin on all four sides, then saved it as a png file. The TIF file was 47k, and the PNG was 38k (I think IrfanView is not that efficient in making PNG files). Then I uploaded it, and you can see it on the right, click to see full size (it's still plenty big!). Yes, I know the methyl groups are messy, that's another issue, but I think the proportions look right, much the same as in Ben/Rune Welsh's. Would these settings work? Can we adapt them for the other software? Walkerma 19:18, 11 April 2006 (UTC)
-
-
- What a negotiator! I'm going to start using these settings from now on, I'll post any feedback here. When I draw steroids or other large molecules in ChemDraw, I simply set the zoom to 50%. Then once I've copied the image to Photoshop, I resize it to 1000px or similar. But I can understand expansive structures being a problem during the production process, so to speak. I think we should definitely show hydrogens on heteroatoms - more than anything else, it's standard practice almost everywhere - we're not in the business of confusing people here! I actually quite like Boris' use of color atoms having looked at a few, but the use of pale colours is going to remain problematic, especially light grey for hydrogen. Cheers for your input guys, I'm enjoying this. --Ben 21:10, 11 April 2006 (UTC).
-
-
-
-
- I just made my own version of quassin using the new settings. Everything is great,
except I think hash spacing should be about 0.18 cm, otherwise it doesn't look right with my set-up. On second thoughts, the hash spacing is probably OK. I'll mull over it. Great job Martin. --Ben 21:24, 11 April 2006 (UTC).
- I just made my own version of quassin using the new settings. Everything is great,
-
-
- I saw the post on the Village Pump, so I thought I'd make a few comments here. Firstly, try not to make any guidelines based on technical concerns, such as file size. The most important issue here is the clarity of the images. Anything beyond that is just implementation, which doesn't really matter. Secondly, don't worry about the file sizes on the pages. The Mediawiki software uses ImageMagick to automatically scale the image on the server, so that when a page needs a thumbnail, it only gets a thumbnail (not the big image).
- Having said that, PNGs such as these should be black and white or grayscale, non-interlaced, and have no transparency. This will produce the smallest file size. If anyone needs help with this, I am willing to compact the files (with no impact on quality)--just leave me a note on my talk page.
- Ideally, these images should be produced as SVG images. SVGs are vector images, which basically means that instead of defining the pixels of the image, you define the shapes, so that even if you resize the image, it's still sharp (because the computer recalculates all the shapes when you view it). SVGs for these kind of images would be very, very small, and would look good no matter how big they were. Actual dimensions would not impact file size. However, I don't know what chemistry software packages support SVG (a quick Google search turned up JChemPaint), and I'm not sure how easy it is to draw them in Inkscape (a free SVG program I've actually used). ~MDD4696 21:43, 11 April 2006 (UTC)
-
- SVG would be ideal. I've tried exporting from ChemDraw to SVG using a free program called SVG Factory but it doesn't render the element symbols (a bug, perhaps?). I can't afford Adobe Illustrator and Inkscape won't let me paste ChemDraw structures from the clipboard on my Mac. So that's the status with me and SVGs at the moment, but I'd love to use them if I can get the software working. --User:Benjah-bmm27 21:59, 11 April 2006 (UTC).
-
- Agreed. SVG is perfect for the application. Unfortunately, the last time I looked (about a year ago) I found no good way to make SVG chemical structure diagrams.
-
- ChemDraw does have an option to save in a native XML format that could be converted to SVG, if we had someone familiar enough with XML in general and SVG in particular who was willing to do the job. Shimmin 14:06, 12 April 2006 (UTC)
[edit] Another view on settings
I agree the above comments that large images are a Good Thing if they are PNG files, although this should not matter if we can get a SVG conversion running. The largest font size supported by ISIS/Draw is 48pt, so I scaled the RSC image recommendations to 48pt labels to get
- Bond length: 83.7 pt
- Stereo bond width: 11.0 pt
- Down bond hashes: 12.3 pt
- Line thickness: 3.4 pt
Even with these settings, the quassin is still completely within the editing screen, and it looks fine. ISIS/Draw will export as a WMF file, which should be convertible without problem to an SVG file, I will do some tests when I have installed SVG Factory. Physchim62 (talk) 15:19, 12 April 2006 (UTC)
- I tried these settings in both IsisDraw and in ChemDraw. In Isis it's OK for something like quassin, but for some reason with ChemDraw it's completely unmanageable, it won't fit on my laptop screen. Could we choose something based on 48pt bond lengths instead, this will also ensure that Boris doesn't have a fit ("I don't have 40 something inches screen so I will not use the "2.5 cm bond, 45pt font" settings just to have those "printer-friendly" big azz images. No way.") Since our images are general much larger on the page than ACS/RSC images one might argue that our settings should reflect that - so we can use a slightly higher ratio of bond-length to font size? Could you live with that, PC?
- If you want to alter the settings from those I proposed above to a "standard" style, perhaps we should base it on a scaled version of the ACS settings, simply because the ACS journals are high impact even in the UK. If you scale ACS settings by 3 you get 30pt atom labels and 43.2pt bond lengths, fairly similar to what I am proposing above, which in turn is based on the settings from Cacycle that most people are using. Walkerma 17:48, 12 April 2006 (UTC)
Well chemistry is an experimental science, so here are my preliminary results!
Another problem with large images is that ChemSketch users cannot change the font size or line thickness! Hence whatever is decided for ChemDraw users, a seperate set of parameters will have to be figured out for ChemSketch to get the closest similarity in images. As ChemSketch appears to use about 12 pt labels, I scaled the above parameters accordingly, which gives a 20.9 pt bond length (virtually the only modifiable parameter of interest in ChemSketch). This is obviously still too long, as you can see by the smaller size of the labels in the ChemSketch image as compared to the ISIS/Draw image: both images have been fixed at 200px width, as is standard for chemboxes.
I would note that there is no obvious difference in quality at the scale displayed on the WP image pages (the PNG files are at 300dpi resolution), dispite the fact that the ChemSketch image was exported as a TIFF bitmap whereas the ISIS/Draw image was exported as a Windows Metafile (vector graphics). Hence I'm tempted to agree that there is little to be gained in having large images. As for ACS vs RSC, I am completely neutral: I used the RSC recommendations as I knew where to find them!
Hint for ISIS/Draw users: if you cannot persuade ISIS/Draw to export a WMF, try exporting a TIFF: the TIFF will be unreadable, but you will also discover in the same directory a file $$$.wmf, which is in fact the WMF version of the structure. Unfortunately, SVG Factory will not convert it correctly into an SVG file, as mentioned above: the bug appears to be in SVG Factory. Physchim62 (talk) 12:57, 13 April 2006 (UTC)
- Another issue to consider is that images that look best on screen may not be best in print. Personally, I prefer the image on the left above (because of the wider bond width, I think) on my screen. However, when I print them out, I think the one on the right is better. Similarly, ACS settings look good in print, but I prefer images generated with the current Wikiproject Chemistry guidelines on my screen. Since Wikipedia is mainly an online resource, we should focus on what is ideal for the screen and avoid defaulting to other common standards such as ACS settings, which have been optimized for their appearance on paper. --Ed (Edgar181) 13:16, 13 April 2006 (UTC)
Interesting, as it is the image on the left above which was created using settings optimized for print versions! I have tried to improve the line thickness on the ChemSketch image by shortening the bond length: the version with 15pt bonds is shown on the right here. I must say that bonds that short are difficult to handle on the screen while preparing the structure! Also, ChemSketch seems to adapt the label size for the bond length, so there are limits to what can be done to change the ratio of label to bond. It seems that we shall have to optimize first on ChemDraw and ISIS/Draw, then do our best for ChemSketch: we will never get complete compatibility. Physchim62 (talk) 14:18, 13 April 2006 (UTC)
- Thanks for your input, PC. I'm glad you found the ChemSketch limitation, this is important. I also tested out my ChemDraw Quassin test image via WMF to PNG, and the PNG was about half the size of the one created via TIF. I also noticed a test $$$.wmf file after you mentioned that quirk of IsisDraw, that's good to know. Thanks, we should try to standardize on that if possible, I think. I tried Ben's suggestion of a simple cut & paste from Isis into IrfanView, and that worked, though the resolution wasn't great. I'm learning a lot here! Regarding Ed's comments, I reckon they are all pretty OK when printed off this page. If you print the full size image, I suspect the print appearance may be affected by the size - the thin lines of the right hand ChemSketch image are quite visible to the eye when full size, but begin to look faint when shrunk as on this page. The last ChemSketch sounds like it should look better, but IMHO it looks a lot worse, it even looks fuzzy at full size (on screen and printed). I'd much rather go with the original ChemSketch settings.
- As for size, we need to balance the convenience of working with smaller images versus the benefits of larger images being useful for people to put in term papers, posters and Powerpoints. We also need to decide if we prefer to go with standard settings such as ACS, or whether we develop our own custom settings. But most users will be familiar with ACS, and both ChemDraw and IsisDraw come with ACS settings right out of the box. I was surprised to see that ACS settings do give quite a large sized image when converted to WMF, in fact both the PNG images end up as 15k. I also notice that there isn't a huge difference between these two (ACS vs ours) - not surprising, if Cacycle used ACS settings as a starting point.
- If others can confirm this similarity of style, size and quality, I would propose that for simplicity we recommend use of standard ACS settings. That way any new chemist joining us can simply be told, "Use ACS settings, export to WMF then convert to PNG in IrfanView or Photoshop." Easy! For ChemSketch we use PCs original settings. Any comments, folks? Walkerma 05:59, 14 April 2006 (UTC)
-
- ChemSketch also has built in ACS settings: the result is as shown! So I think the line is "Use ACS journal settings in any given molecule editor, export as WMF and use a image processing program to create a high resolution (300dpi) black-and-white PNG file. If you can create an SVG file, please do so and then tell us how you managed it!" This also means that molecular structures will be created at the same size for display purposes as for reaction schemes, which must be a Good Thing. Physchim62 (talk) 15:06, 14 April 2006 (UTC)
- I have recently seen some problems with using the WMF file conversion from ChemDraw. I tried converting something at work that ended up completely mutilated (fonts squashed, far worse than K's example below). Also, I notice that the latest IrfanView has a "problem" (I just downloaded it, because my older version here at home couldn't add a canvas). Unlike the older versions, it reads ACS format files from ChemDraw or IsisDraw at actual size (i.e., tiny) rather than a much bigger size, whether WMF or TIF. I ended up using the old version if IrfanView to convert and the new version to add the canvas, you can see the result here. It is in use on the Chem portal news section. Is there something I'm doing wrong? Sorry I'm pretty much an amateur at this sort of thing, but perhaps I'm a good tester for the inexperienced newbie! Walkerma 03:26, 18 April 2006 (UTC)
[edit] SVG conversion
According to the Wikipedia, Inkscape is an open-source vector graphics editor, that has incorporated the bitmap-tracing functionality of Potrace. I will try to use this software to make chemical SVGs in conjuction with ChemSketch, ISIS, and ChemDraw, but will not have time to do it until Sunday at the earliest, and if anyone beats me to it, they are welcome to do so. Shimmin 14:37, 13 April 2006 (UTC)
- I got around to it earlier than I thought I would. It works, but the results aren't as pretty as they might be. The potrace algorithm apparently doesn't "do" corners very well, and so bond tips are noticeable rounded. The extra lines of multiple bonds are lozenge-shaped. The version of Inkscape I downloaded does not appear to be able to import WMFs, either as files or through Windows copy-and-paste, but I'm still very unfamiliar with the software. Shimmin 15:31, 14 April 2006 (UTC)
-
- It appears I end up re-iterating what someone else said above in saying this, but the SVG Factory for some reason does not convert the textual elements of an WMF along with the lines, so I when using it, I end up with chemical structure diagrams without symbols. This happens when importing from both ChemDraw and ISIS Draw. Shimmin 16:00, 14 April 2006 (UTC)
- I've had some unfortunate experiences with SVG in chemical drawings. SVG is not yet prime time. Here's why. Compare these two images:
- I created the PNG image for the Blaise ketone synthesis article. User:Scott5114 used Inkscape for SVGize it. I don't like the SVG version. The letter spacing is too narrow. The font is changed. The bond lines are too narrow.
- The largest problem is that the SVG version looks really bad in IE. ~K 01:06, 18 April 2006 (UTC)
-
- PNG is a raster format. If you start with a raster format, and go to a vector format, the quality of your image will be constrained by the quality of the algorithm used to trace the raster. This is a tricky problem for highly detailed parts of images, like fonts. I am not surprised by your above result, but it is not a fair test of the SVG format, merely of Inkscape's ability to vectorize PNGs. To do this right, you need to stay with a vector format the whole way.
-
- I have been told that Open Office can convert WMFs (windows metafile, the format used within windows for vector drawings on the clipboard) to SVGs. I do not have Open Office installed. If anyone does, I'd be interested to see your results. Shimmin 11:39, 18 April 2006 (UTC)
[edit] Word from the Village Pump
After my persistent harrassing of the poor folks who so generously give their time answering dumb questions from technically challenged people like me, I got a clear answer:
- "The size (in bytes) of a thumbnail image does not depend on the size (in bytes, or in pixels) of the original full-size image. Period. The only exceptions are if
- the thumbnail would be bigger (in pixels) or the same size as the original, or
- the original image is so huge (something like over 10000 pixels across) that the MediaWiki image resizing code can't handle it."
So we can make and upload images pretty much as big as we want. But how big do we want them to be? Please add to the discussion above. Walkerma 05:07, 14 April 2006 (UTC)
[edit] Next phase
I will take silence to mean that consensus has been reached on using ACS settings for structure drawing. I (or one of you) will update the style guide accordingly soon (I have a lab to go to now!). If you have any problems with using ACS settings, please post something on this page so we can fix it.
What should we do for the next phase? I wonder if we should focus our attentions on laying down standards for 3D drawings. For this we need to bring in the Jmol group. Our focus will be on settings (colours, lengths etc.) rather than implementation. For myself, I'd be happy to see the Jmol folks give us their suggestions, and let us discuss how this fits with other 3D formats. But I know very little about 3D images, I rarely use them. Thoughts, anyone? Walkerma 16:47, 27 April 2006 (UTC)
- I am not an expert on Jmol although I have put Jmol images into several web pages. I think we just have to see how it goes. Some things such as colours are fixed in the Jmol applet. If we do not like them, we discuss it on the Jmol e-mail list and get changes to the applet. That would flow through to what we do here once we install the new version of Jmol on the WP server. We need to also detemine the data file types allowed. On the Jmol wiki, only *.cml, *.pdb and *.xyz are allowed. --Bduke 21:47, 27 April 2006 (UTC)
- Colours are not really fixed in the Jmol applet: all colours can be changed through script commands. A default script can be defined when installing the Jmol extension: it could be used to apply coherent settings (if more features like this are needed, tell me and I will add them). If you want to upload data files with the "upload file" feature of MediaWiki, you will need to decide which extensions are allowed. If you want to put data in wiki pages, deciding which extensions are allowed is not required but should still be done to ensure coherence. NicoV 16:29, 28 April 2006 (UTC)
OK, it looks like we have a quorum already! I forgot to post on WP:Chemistry last night, that's now done, I hope a few others may join us from there. I think first we need to establish what software we are using, and then start discussing simple 2D structure drawing settings. If people want to discuss other issues, though, please feel free.
[edit] Minus superscript is too small
Hello everyone, just dropping in as an outsider here. On Phenol red you'll see a nice chemsketch-produced diagram showing how the structure changes with increasing pH. I think the minus at the sulfate's oxygen is too small and could easily be mistaken for a dot, indicating a lone electron. (For a chemist such an unpaired electron would obviously not make any sense there, but lots of our readers are half-educated like me.) In the original-sized picture the problem is not as severe as in the scaled down version actually shown on the page.
So I'd like to respectfully submit that the powers-that-be consider increasing the fonts of the drawing software when it comes to minus-subscripts.
Best regards, AxelBoldt 17:17, 2 October 2006 (UTC)
- Good point. I usually change them to Symbol font, that does the same thing. Of course if the software producers had any sense it would be automatic...! Walkerma 19:33, 2 October 2006 (UTC)
[edit] SVG with SVG Factory
I have successfully created SVG structures buy creating a structure in ChemDraw, saving as .wmf and then converting to .svg using SVG factory, and then making some small change to the .svg file, which I describe bellow.
The svg files that SVG Factory does not have the svg name space in the file. This need to be manually inserted into your file. the top of your file should look something like the following (inserted text in bold)
<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20000303 Stylable//EN" "http://www.w3.org/TR/2000/03/WD-SVG-20000303/DTD/svg-20000303-stylable.dtd"> <svg xmlns="http://www.w3.org/2000/svg" width="3.0000in" height="2.9221in" viewBox="0 0 231 225">
I will investigate why the text problem is happening tomorrow.
Gary van der Merwe (Talk) 21:32, 9 November 2006 (UTC)
[edit] Question on SVG
I'm having a problem with an SVG and this looks like the best place to go. I uploaded this image to the commons (an SVG made with ChemDraw and Inkscape), and I can't get the picture to show up. It opens just fine in Inkscape, so is it just my computer/configurations, or did I make a mistake in creating the image? Any help would be much appreciated. —ShadowHalo 09:13, 4 January 2007 (UTC)
I can't see it either. Why don't you reupload them? --Rifleman 82 09:32, 4 January 2007 (UTC)
- I think the problem is that when you paste from ChemDraw into Inkscape, it copies the images as a PNG. Then when you upload the .svg file to the Commons, all you're uploading is a blank square and the code in the files is a reference to that PNG. As the PNG is still on your computer, and not on the Commons, all you see is a blank!
- Silly ChemDraw, basically!
- I could, of course, be wrong, but this is what happens in my experience.
- Ben 10:21, 4 January 2007 (UTC)
- Oh, okay. That makes sense. So how does one go from ChemDraw to Inkscape without creating a reference to the ChemDraw image? —ShadowHalo 03:38, 6 January 2007 (UTC)
I don't know! I wish it would work. Does anyone else know?
Ben 14:45, 6 January 2007 (UTC)
Since you're talking about images, perhaps Ben or someone can tell me why the image on the drugbox of ursodiol doesn't display properly...? --Rifleman 82 16:49, 4 January 2007 (UTC)
- Not sure, sorry Rifleman. I had a look and tried it at different sizes. It displayed properly at 800+ px but not at 700px. Weird. I've never experienced that before.
- Ben 17:55, 4 January 2007 (UTC)
[edit] Mediawiki SVG Bug
Hi,
many of you, who are using incscape to create SVGs of chemical formulas will have noticed that subscript and other baseline elements are not correctly rendered by MediaWiki software. There exists an appropriate bug report on Mediazilla, but there are still not enough votes to get any attention for this issue. As user on German Wikipedia I just wanted to ask you to vote for this bug, so that we don't need categories like this any more. Thanks. --TaxmandeTalk (de) 12:28, 26 February 2007 (UTC)
[edit] R-Groups numbering
I've notice that the numbering of R-groups is often given in subscript by editors e.g. .
I think it is more clear to give this numbering in superscript. e.g.
Subscript is usually used to indicate the number of substituents (e.g. -NR2, might be misinterpreted to mean a Nitrogen attached to two R groups). By using superscript, any possible confusion is avoided (i.e. -NR2 means a -R2 group attached to Nitrogen. -- Quantockgoblin 00:46, 21 March 2007 (UTC)
- Yes, superscripts get my vote every time on this. It annoys the heck out of me when I see subscripts used in JOC! I know that in some molecule editors it tends to spit out subscripts as defaults, but is there any reason we can't state that we want superscripts for cases like this? Walkerma 03:09, 24 March 2007 (UTC)
-
- We should outlaw subscripts :-) I'll add it to Wikipedia:WikiProject Chemistry/Structure drawing. Cacycle 03:14, 24 March 2007 (UTC)
[edit] Wikipedia:WikiProject Chemistry/Structure drawing overhaul
I have updated Wikipedia:WikiProject Chemistry/Structure drawing, please have a look at it. Cacycle 02:55, 21 March 2007 (UTC)
- Looks good! I just need to write up the IsisDraw stuff now.... Thanks, Walkerma 04:23, 21 March 2007 (UTC)
[edit] Simple linear structures?
Question, what do people think of chemical structure drawn in a simple linear format like this:
(for the record the above may be corrected so I'll state that the images are not drawn with sp3/sp2 hybridised atoms)
For my 2p worth, I don't like them as they are not strictly factually correct. Maybe I'm just being a stick in the mud? -- Quantockgoblin 02:06, 24 March 2007 (UTC)
- Granted, these don't really indicate the bond angles, but I don't think they're actually wrong are they? If I set up my computer monitor vertically, and draw propane with a "kink" in it like so:
- then I move my eye through 90 ° so it's now looking down on the structure from above, then what I would see would have all three atoms in a line, corresponding to the "ethyl group" picture shown earlier, with R = methyl. Given that this style has been widely used, and indeed is still seen in organic papers today, I think we should accept it. This is particularly true for short things like the ethyl example. I think I might usually prefer to see a bend, but to me it's not a big thing, and in some instances it can look neater to draw things in a linear fashion. What do others think? Walkerma 02:55, 24 March 2007 (UTC)
-
- I think bond angles should be represented in pictures as close to nature as possible, that's what structure images are for. Therefore I am all for chicken wire notation. The upper image is misleading as it mixes semi-correct bond angles with completely wrong ones - it should be replaces asap. For something like R-CH2−CH2 we do not need images, however, this is an adequate in-text style. Cacycle 03:11, 24 March 2007 (UTC)
-
-
- Walkerma, true it possible to draw molecules at very unclear angles whilst being factually correct i.e. n-hexane as a single long line, but that is not really the point. Our job is to be clear and accurate. It is true to say molecules drawn at 90 degree angles are easy to understand (and have the correct connectivity), but I'm not sure they are strictly correct. However, molecules drawn with 120 degree are clear and still easy to understand, and at least when drawn with 120 degree bond angles, there are normally a few angles (i.e. looking down the axis of a bond) where this representation is "true" i.e. the bonds appear to be at 120 degrees. I think the only excuse for the 90 degree approach is when drawing all the hydrogen atoms on a molecule, where otherwise it all becomes too congested to see what is going on. e.g.
-
-
-
- or where in some sugar diagrams e.g.
-
-
-
- where these sugars are drawn 'flat' - but that is done to convey the complex arrangement of the chiral centres (e.g. left = R and right = S etc ... probably guessed the wrong way round!)
-
-
-
- In the end it might just be a question of style - but which ever style we pick e.g. chicken wire notation or the 90 degree approach, I think we should try and be consistent and try to encourage everyone to use the same style where they can. -- Quantockgoblin 23:01, 24 March 2007 (UTC)
-
[edit] ACD ChemSketch - the company is willing to make a Wikipedia Template on their Freeware
Dear all
Regarding some messages on the chemistry project message board, concerning the problem of consistency of chemical images drawn.
It was mentioned that it would be great if we could recommend some freeware to use. The problem like all other drawing packages was that we would need to tell people how to customise the program to our specifications/style guide.
In this regard I sent an email to ACD who distribute freeware called ChemSketch (I've used the program and it works quite well).
see: http://www.acdlabs.com/download/
I asked them if they would consider making us a "wikipedia" template - much like a "JACS" template on a dropdown menu. They said they would if we could thrash out the details of our style-guide.
I think this would be great!
- Freeware for all editors to use
- A pre-set style so no problems with image consistency
I don't see this as getting into bed with big business, we get freeware that include our template, they get to say wikipedia compliant or some such!
See below for the message I sent, and the reply I got (comments please) -- Quantockgoblin 17:06, 4 April 2007 (UTC)
So I need views on:
- Should we do it ..., personally I don't see a problem.
- What is our style? ... I think JACS at 300% scale??
---
(START OF EMAIL - (names and email address removed)
Hello
I'm a part of the Chemistry Group on Wikipedia - I'm sure you've heard of it, it is the free non-profit web-based encyclopaedia which anyone can edit.
- [[AJW>]] For sure I have heard it...use it and am a GRAT fan of the effort. Thanks to all who contribute.
In the Chemistry Group on Wikipedia strive to get consistency in drawing images of compounds.
Please see: http://en.wikipedia.org/wiki/Wikipedia:WikiProject_Chemistry/Structure_drawing
- [[AJW>]] Thanks..I wasn't aware of this page but have just reviewed.
In this regard, do you think you might consider making a 'Wikipedia style' for us as a template style on your Freeware ChemSketch product. That way all users could guarantee consistency in drawing style.
- [[AJW>]] Absolutely, we can look into this... no problem.
Typically we would like the images to be broadly in the J. Am. Chem. Soc., just about 300% larger when saved, and the file to be saved in PNG or (if you can SVG) format.
- [[AJW>]] So you would like the format template shown below but with bigger fonts and with longer bonds??? By a factor of 3? (attached image not included)
If that would be possible, that be great, we could then make ACD/Chem sketch our recommended drawing package for chemical compounds for all users on Wikipedia!
- [[AJW>]] Whatever I can do to make this happen I will. Please confirm the intent and I will mock up an example for you
...
If you think you might be able/willing to help, I can get back to you to confirm exactly what our drawing specifications are.
- [[AJW>]] Looking forward to your feedback.
Best regards ...
(END OF EMAIL)
- That's fantastic! Well done! The starting point is this page. However, I'm not convinced everything is there - we had recommended a size of around 1000px, with a small blank border around, I don't see that mentioned anywhere. (The 1000 px suggestion was for structures and simple reaction schemes - really big schemes would need to be larger, so some flexibility is needed there). The settings are indeed standard ACS settings for bond lengths, fonts, etc., though when displayed online these typically look much bigger than on paper (hence the 1000px bit). I will really try and get the IsisDraw guidelines uploaded there today.
- One thing that would be really great would be if we could omit the image processing part altogether. From ChemDraw or IsisDraw, we typically have to save as TIFF, then re-open in IrfanView or similar, re-size to 1000 px or so, then save as PNG (we'd like probably to do SVG but that is usually lousy for such images). If ChemSketch could generate a PNG file with small border directly, without us needing to use IrfanView etc, that would be wonderful!
- For the longer-term, we would like the ability to machine readable metadata to the files as well, for example InChI. At present, if you have a PNG file of camphor, a computer can't tell that it is camphor and not pinene, or a even a picture of a dog. User:Petermr and myself are just beginning to talk about how to do that, and after my exams are finished I am going to get things started here on Wikipedia to achieve that. So, if ACD is designing this part, it would be best if they could design it in such a way that metadata can be attached to the file, and that metadata can be read once it's on Wikipedia. This would not be needed for the first version, though!
- Thanks again for taking the lead on this, Qgoblin, great work! Walkerma 17:44, 4 April 2007 (UTC)
-
- Great work. If they use PNG they could add an automatic scaling so that you always get an image of, say, 1500 px width, independent of the size of the molecule or reaction scheme. However, SVG would be a much better option. Cacycle 18:09, 4 April 2007 (UTC)
I said I'd get back to them in a couple of days, so we have a little time to sort some of the details out (in fact see below for details of last email).
Summary of what they said:
- They said they would hope to make the new template availed as a downloadable patch, for the latest version (v10), and then presumably incorporated in all later versions.
- They said they could have a template ready for testing quite soon after we give them the details.
My initial idea, which is a simple solution, was just go for a JACS-like format, but where all the bonds fonts etc are scaled up by 300%.
Wish-list (please add to this list):
- PNG format
- modest border (? Px) .
- transparent background would be great.
It would be nice to get all lot of our wish list nailed down as I don't really want to have to go back too many time with requests for modest tweaks, although them seem quite amenable to helping. -- Quantockgoblin 22:18, 4 April 2007 (UTC)
(start of email): AJW,
Thanks for getting back to me so quickly. I'll get back to you in the next few days once I have some of the details thrashed out. Now that I know that you are in principle interested in helping with a template, I just need to thrash out the details with other Wikipedia editors.
- AJW> Good. We can put together a template very quickly.
Just so there is no confusion, for the template to be useful to users on Wikipedia, the template would have to be incorporated in the freeware version of ChemSketch!
- <AJW> Understood. We would add a WIKIPEDIA template in the drop down menu of templates based on your definitions. We'd create it, have you validate it and then incorporate, run through testing and make it available for download.
- Then we'd need to let 3/4 million users know about it to download.
- So, we'd likely make a little patch (if we could) to upgrade their ChemSketch...likely a small dat file.
- Regarding the websearch add-in at http://www.acdlabs.com/servlets/UserAuth?pr=chemsk_websearch we COULD make Wikipedia structure searchable TOO. All we need to know is how to search it with a structure if its feasible.
I have to say I can't comment on ChemSPider database at the moment, as I know little about it. When I get a chance I'll have a look, I'll also raise it with others on the Wiki Chemistry group.
- <AJW> Thanks. When you visit please let me know whether it would be appropriate for me to post something abotu ChemSpider on Wikipedia. I am unsure of Wiki-etiquette and will bow to your understanding of the area (<<-- I've sent something back on this pointing out that if it improves Wikipedia then in principle we might be interested).
- <AJW> Best wishes.
(END OF EMAIL)
Walkerma I've had a quick look at www.webspider.com. I don’t know too much about it but it does have a field marked “InChI” which you mentioned by you above, is the sort of thing you are interested in?
--Quantockgoblin 22:18, 4 April 2007 (UTC)
- I must say I'm quite a fan of chemsketch. When I teach I tell my students that there actually are freely available chemical drawing programs, scribble "chemsketch" on their notes, and tell them to look for it!
I have actually created a Wikipedia template for Chemsketch with the details listed here. It was fine and well for drawing structures, but drawing reactions were problematic - the reaction arrows and + signs all were too small, and I never really got around to the problem. As a result, I adapted the wikipedia template to fit the reaction arrow and + sign, and have been using it since. The moment I process with Irfanview, it seems to give a big nice resolution drawing which nobody has complained of yet.
For ease of use, I would prefer an intermediate between the 300 % ACS and 100 % ACS. Right now I am using approximately 170 %. I find this arrangement more flexible because they are small enough to use in my own work, on scaling down, while when converted to tiff then png, they still are big enough to be sharp at full screen resolution.
Also, this obviates the need to switch between different settings, which themselves are not static.
Comments please? --Rifleman 82 02:52, 5 April 2007 (UTC)
-
- I've never had the need to use 300% of ACS, I often find 100% is OK for reaction schemes, you still need to scale that down to 1000px. Even for single structures, I don't think we need more than 200%. I've just downloaded ChemSketch (I've always used Isis or ChemDraw, I must admit) and it looks extremely good. I was unaware of the InChI compatibility in ChemSketch - I am very impressed that even the free version includes this with full support of eMolecules and PubChem! ChemSpider looks like it will be very interesting too if it takes off. Walkerma 05:31, 5 April 2007 (UTC)
Before responding I want to clarify I am the product manager for Chemsketch so please filter comments with that in mind! I am willing to go to work on the template and appropriate enhancements to ChemSketch to support your efforts once there is general agreement to needs. We live in a world of favorite flavors so hosting the input of tens of thousands of chemists regarding their needs I've come to appreciate different opinions but bottom line...it can't all be done. And...more options is NOT necessarily better. That said let's provide a working template and optimize from there for you? It can all be validated by the group offline before using it on Wikipedia. When there is a starting point for agreement send it through and we can start work. One of you has my email address so those conversations can go offline if you'd like. Questions...is there agreement re SVG over PNG. ChemSketch doesn't support either right now and if we were to choose one to work on I'd like to get group agreement. That said it does support TIFF up to 1440 dpi. However, Wikipedia doesn't support TIFF. Maybe worth the request to support it? Obviously this is a Wiki media decision needing support but TIFF is very common. Looking forward to helping out with this project. --AntonyWilliams 16:09, 5 April 2007 (UTC)
- When I first started using this software several years ago I never knew that my opinions (as part of this group) would matter!
- It indeed is great that ACD is supporting us here. That said, let us acknowledge that I don't see Wikipedia being able to reciprocally endorse ChemSketch; contributors will (and should be) entitled to use any chem editor they choose.
- I believe most here will prefer SVG over PNG, GIF, or JPG. The main problem for most of us has been creating SVGs - with the exception of Fvancellos and Ben (for a while) and BKChem users, most have been producing PNG because most chem editors don't generate SVGs. I've tried to use SVGfactory and Chemsketch EMFs without success.
- If ChemSketch can produce SVGs (AND PNGS!), it will be great. Would ACD be prepared to do this? A commercial version would in probably be out of reach for many here, so it would be best to release it in the freeware version.
- TIFF might be great for publishing applications, but I I see not much value in it because it is not a web standard by any stretch. Even the US PTO had to give a link to an external viewer for their TIFF images the last time (a long time ago) I checked. My 2 cents. --Rifleman 82 16:22, 5 April 2007 (UTC)
[edit] Structure searching within Wikipedia
"Regarding the websearch add-in at http://www.acdlabs.com/servlets/UserAuth?pr=chemsk_websearch we COULD make Wikipedia structure searchable TOO. All we need to know is how to search it with a structure if its feasible."
Qgoblin, it looks like you have started things moving, towards making Wikipedia structure-searchable! Thanks a lot! This is quite a major issue, and a distinct topic by itself. that's why I started a separate header. The question is raised in the email - how can we make our chemicals pages (and maybe our reaction schems too) structure-searchable? It looks like InChI is the way to do that - is that right? - but how should that be done?
I think we need to make sure that whatever we tell ChemSketch now is something that allows things to develop. We don't want to find ourselves limited, then asking them to change the way they search our pages. Here are three stages I can see. We are already set up for Stage 1, but Stage 3 is much harder (but also more powerful. Do we want them to find just the article on the chemical compound drawn, or do we want all structures & reaction schemes to be findable?
- Stage 1: We could try to add InChI into all ChemBoxes - that would be a start. Many already have it anyway. Is that all we can do for now? We 'd still need to make sure that someone searching on (R)-butan-2-ol would find 2-Butanol.
- Stage 2: What would be ideal IMHO would be to draw an reaction scheme or structure in ChemSketch, and when we save it in Wikipmedia Commons it generates the InChI(s) and attaches it (them) to the file somehow. Can this be done? We want someone to be able to draw a structure in ChemSketch (or ChemDraw) and find it in a reaction scheme in the Commons.
- Stage 3: Would we prefer for people to find the image file in context (i.e., in the Wikipedia article where the image is actually used), rather than just the isolated image file? I would say yes, but that would be even harder. I think we'd like to be able to type something like [[Image:MethylBenzoateNitration.png|300px|Nitration of methyl benzoate|reactant=1/C8H8O2/c1-10-8(9)7-5-3-2-4-6-7/h2-6H,1H3| product=1/C8H7NO4/c1-13-8(10)6-3-2-4-7(5-6)9(11)12/h2-5H,1H3]], but I guess that would need some changes to the Wikimedia software. Or is there a better way to do this? Walkerma 05:31, 5 April 2007 (UTC)
I believe that InChI is the best way to go at present for EXACT structure searches since it will be a string lookup. However, in order to integrate the exact structure search out of an application like ChemSketch there might need to be appropriate call to an Index of the strings. Is there any defined API for Wikipedia available for review or someone to talk to from the technical team to discuss the issue of doing this search? BTW, I am the product manager for ChemSketch and fully support doing this and will do everything in my power to make this work for the Wikipedia community --AntonyWilliams 14:58, 5 April 2007 (UTC)
I think it's great that ACDLabs is giving us a hand here. But I think when (or if) we are able to add in-line JMOL or CHIME-type files, all these silly issues about how best to present a chemical structure will be solved. I remember some rumblings of it then. Not sure by whom. Any updates? --Rifleman 82 15:29, 5 April 2007 (UTC)
-
- I had the pleasure of a long chat in Chicago with Bob Hanson, the main writer of Jmol. They had some bugs which were solved about two weeks back. They are currently talking with people at Wikimedia (Tim Starling, I think) and Jmol should be part of Wikipedia very soon. I don't think Jmol is that good for structure searches, though, is it? Walkerma 15:43, 5 April 2007 (UTC)