Wikipedia talk:WikiProject Chemistry/Structure drawing workgroup/Archive Jun 2007

GChemPaint now able to autogenerate PNGs containing embedded InChI

edit
 
Test PNG of quassin, autogenerated with InChI from GChemPaint

For those running Unix/Gnome, you may be interested in GChemPaint. Jean Bréfort has updated the software to include the features we discussed for ChemSketch above, viz:

  • Draw the structure
  • Create a PNG file directly, with Wikipedia settings
  • Embed the InChI in the PNG in such a way that Google can find it.

He created this PNG of quassin in ChemPaint with an embedded InChI. Feedback is appreciated. Walkerma 05:01, 30 April 2007 (UTC)Reply

Nice one, but I don't use Unix :( Also the diagonal double bonds to oxygen look a little bit out... Physchim62 (talk) 09:28, 30 April 2007 (UTC)Reply

ACD ChemSketch - the company is willing to make a Wikipedia Template on their Freeware

edit

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)Reply

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)Reply
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)Reply

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)Reply

(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)Reply

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)Reply

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)Reply

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)Reply

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)Reply
Rifleman 82, good points as always. In my email above, I think you can see that Tony is aware that we can not directly plug ChemSketch, but I seen no problem in the Chem-Group having ChemSketch as a suggested freeware which conforms to chem-groups drawing style. I think it is true that if ChemDraw (Isis etc) make a template which conforms to our style guide then we will be honour bound to list that product too (although it will still not be freeware!). I also see no problem in ACD stating on their webpage etc, that ChemSketch is Wikipedia compatible, as it will be! -- Quantockgoblin 07:05, 9 April 2007 (UTC)Reply


I think unless I've missed anything important can we agree that the following is a good basis to proceed on (any more comments please!):

I think the only unresolved issue is in the section below, "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?" Can I suggest that Anthony contact Tim Starling at the foundation if he wants developer help? I believe Tim is a physicist (he wrote some WP element pages!) who is helping get Jmol working on WP. However, for the basic thing of getting Wikipedia settings and SVG export into ChemSketch I don't think there are any remaining issues. Walkerma 07:32, 13 April 2007 (UTC)Reply
ACD ChemSketch: Wish list
  • ACS style but at 200%.
  • Transparent background.
  • Border = 20 px.
  • Save/export in SVG format > PNG format > JPG format. (For testing may be we can use JPG).
  • Prepare patch - put link on this page for download by group to test.
  • Some way of saving InChI data with the image (Can someone who knows more about this pick up Tony's thread below about this - Walkerma, or [User:Rifleman 82|Rifleman 82]]  ??)
Chem-groups Things to do:
  • Download ChemSketch 10, and wiki-tempalte patch when ready.
  • Test it + feedback!
I've sent an email to the Foundation to have Tim Starling contact me. The PNG export from the beta ChemSketch I have looks good but I need the feedback from this team. I think if it would be good if Quantockgoblin could coordinate a test of the beta offline for this team. I need your feedback. We have not dealt with generating the InChI in the wiki file but we can discuss. It is unlikely that it will be a patch for download. It will simply be a new version of the version 10 freeware. --AntonyWilliams 05:00, 19 April 2007 (UTC)Reply
Antony - you certainly move fast! Looking forward to testing out the beta, before the roll out! --Rifleman 82 07:23, 19 April 2007 (UTC)Reply
 
Test PNG of quassin, autogenerated with InChI from Chemsketch
There is a beta-test version of ACD-ChemSketch available for testing with wiki-template with PNG export option. If anyone else is interested in testing the new template then you can send your email address to me via this form:
* http://quantockschool2.tripod.com/qs/popformframe.html
The above form has not been made for this purpose but if you stick your email address in the "name" box then I can forward you a copy of the beta-test license. You email address will not be circulated to any third parties. If you don't mind your email address appearing on this page, you can post it here too -- Quantockgoblin
I can't seem to make it work. You can get me at andreew at gmail. --Rifleman 82 12:08, 19 April 2007 (UTC)Reply
Rifleman 82 I'm not sure why the form is not working. However, mail sent to you on above account -- Quantockgoblin 14:27, 19 April 2007 (UTC)Reply

Not drawn by me but this is an example of an image drawn using ChemSketch, using wiki-template exported as a PNG:

looks good to me -- Quantockgoblin 21:12, 19 April 2007 (UTC)Reply

Looks just fine! Great work, Antony! Qgoblin, I sent you my email address via that form - I'd like to try this too. Thanks, Walkerma 21:20, 19 April 2007 (UTC)Reply
Walkerma, message sent -- Quantockgoblin 21:34, 19 April 2007 (UTC)Reply
Beta testing

I just uploaded a quassin test image above. I note that there are problems- the image is not large, it does not include a border and it is not transparent. I'll play with this some more, I'm just learning it. Walkerma 04:07, 8 May 2007 (UTC)Reply

Change in template/recommended license?

edit

The recommended template for images suggests {{GFDL-self}}, a copyright tag that is now being deprecated (or actually, the whole GFDL* set of license tags is getting shuffled) at Wikipedia:GFDL standardization. Is {{GFDL-self}} (i.e., with disclaimers) still what we should recommend, or prefer {{GFDL-self-no-disclaimers}}?

I think for simple structure drawings or drawings of reaction schemes, we should recommend (a) uploading to commons and (b) use {{PD-self}} or {{PD-ineligible}}. This is what the German group has as policy, and the consensus from the above discussion appears to agree with that. It also makes sense to have a fairly "common" policy for Commons (albeit with PC's qualifier about German copyright law). Pictures may be another matter, and for those we may need to discuss GFDL etc. Walkerma 03:34, 8 May 2007 (UTC)Reply
For a short period {{GFDL-self-no-disclaimers}} should be used instead of {{GFDL-self}} until the latter template has been "legally fixed". As far as I understand it, PD images have actually to be under a dual PD/GFDL license, so we should update our recommendations. Cacycle 20:46, 8 May 2007 (UTC)Reply
I have changed Wikipedia:WikiProject Chemistry/Structure drawing accordingly. Cacycle

CML within SVG file

edit

I have made an SVG structure commons:Image:Amlodipine.svg which contains the CML2 Core molecule definition within the SVG <metadata> tag. I would like to have feedback on this idea.

How I did it:

  1. created the SVG image, with ChemSketch 10.02 Freeware edition, based on Image:Amlodipine.png
  2. saved it as WMF and as CML
  3. imported the WMF format into Inkscape, saved it as SVG and rearranged it a bit at higher zoom
  4. created an XSL stylesheet to go from ChemSketch CML1-ish markup to the CML2Core one
  5. opened the SVG file with a text editor and added the <metadata> element and the CML2 definition
this can be done within Inkscape also, but the editor is not as friendly

Note that the atom and bond positions do not exactly match between the CML and the SVG because of the Inkscape edits. But I think it's OK. The CML metadata can have several uses, not just display. The SVG could be recreated from the CML...one day. DoSiDo 19:25, 13 May 2007 (UTC)Reply

The labels also need to be edited in Inkscape to get them to survive the MediaWiki conversion. Don't forget that we cannot use the SVG subscript function, we have to create smaller numerals and place them by hand in Inkscape. Physchim62 (talk) 14:34, 14 May 2007 (UTC)Reply
This is excellent work! The ChemSketch people (ACD) are themselves looking to make an SVG add-on for the free version of ChemSketch, and it supposedly will contain the InChI as metadata. However, this is several months away; only the PNG test version is available now. Can you clarify what metadata is included in the CML core, and the differences from InChI? Is it searchable, like InChI? I think it's very important to build things like metadata into the software now so that two years from now Wikipedia structures are being routinely found via Google. If we can do that, Wikipedia will become THE place for chemists to come to get information - and more traffic means more Wikipedian chemists helping us!
People here should also be aware of this blog entry by User:petermr, which discusses reading metadata from Wikipedia chemboxes into a free database. Keep up the good work! Walkerma 17:13, 14 May 2007 (UTC)Reply
Thanks for the heads up on InCHI. I think I will add SMILES and InCHI to the metadata section. The CML core can have the same data as the chembox + the positions of the molecules. I don't know if there are tools that can search CML metadata over the web. DoSiDo 02:00, 15 May 2007 (UTC)Reply

About recommending PNG format

edit

I do not understand the following recommendation in Wikipedia:WikiProject_Chemistry/Structure_drawing: "[...] images should be uploaded in the .PNG format. [...] In the future, the images should be uploaded as scalable .SVG files, however, the recommended structure editors do not yet support this.".

Sorry, but it makes no sense to me. If the "recommended editors" do not allow to manipulate SVGs, and wikipedians can not modify them after uploading... how on Earth does uploading a PNG fix the issue? Dumping SVG for PNG because of the former not being editable is not very sound, is it? Moreover, if what it is implied is that the original uploader will have an easier time generating PNGs than SVGs (because "recommended editors" do not allow generating the latter), why is this even mentioned? If the uploader can upload SVGs, she should do so, and if she can't, then advice to upload a PNG is superfluous... she can't do otherwise. — Isilanes

Well, they could upload GIFs or JPGs. We wouldn't want that :) Fvasconcellos (t·c) 19:55, 12 May 2007 (UTC)Reply
  • Agreed. But the recommendation doesn't say that (well, it does: it discourages JPGs). The recommendation, as it reads now, implies that PNG is preferred over SVG. It could unambiguously say: "SVG is preferred, and, barring that, PNG. GIF and JPG discouraged". — Isilanes 21:55, 12 May 2007 (UTC)Reply

Sometimes SVG looks worse than PNG. We should obviously favour good PNGs over bad SVGs.

Ben 23:01, 12 May 2007 (UTC)Reply

Often, SVG is worse than PNG. Exceptions for Fvasconcellos' I guess. The main grouse I have is that the lines and the letters don't fit together nicely, which may be a rendering artifact according to some wikimedia bug report. Since we're on this topic, User:Isilanes, perhaps you can remove the IFDs for those images which are correct because deleting PNGs for SVGs has been suspended on commons due to these issues. --Rifleman 82 02:30, 13 May 2007 (UTC)Reply
Thanks :) I can certainly think of other users who make excellent SVGs, such as NEUROtiker (talk · contribs) and Calvero, just off the top of my head. I'd favor wording which unambiguously recommended SVG if SVGs were as easy to create as PNGs, with the same level of quality. Fvasconcellos (t·c) 02:48, 13 May 2007 (UTC)Reply
Ben is our most knowledgable image creator, and I agree with him and Rifleman82. It's hard to encourage use of SVG when so many of the SVGs we have seen made have been worse than the PNGs they aim to replace. See this example - the original SVG was worse and has now been deleted. We are working with the people at ChemSketch to try and have an SVG-generator inside the molecule editor, and in time such things will probably become standard, but until then it's clearly a challenge (for most of us, at least!). So long-term we expect to strongly support SVG, but for the time being it's a real challenge. Walkerma 02:57, 13 May 2007 (UTC)Reply
Then, can we remove or blank the template: {{Chemical structure}}, since it serves no purpose for the moment? --Rifleman 82 06:18, 13 May 2007 (UTC)Reply
  • Rifleman 82, sorry for the IFDs (at least one was yours). It just thought it was the way to go when replacing with a SVG, but later I decided to IFD only the "bad" PNGs. I guess I was unjust with a bunch of PNGs during the "IFD all" period. I'll revert them, thanks for pointing out. About the image Walkerma mentions, it has a new SVG replacement (Image:Fagnou_fluoroarene_coupling2.svg), which is not being used... why? And why work with ChemSketch? It is comercial, and has, "at most", a freeware version. I use ChemTool, which is free software, and already has SVG exporter (quite a good one). Maybe ChemTool lacks a lot of bells and whistles... but does the task, it's free, and we have to beg to no-one to include features: just fetch the code and modify it. I don't believe we should favor any private company by using their software, even if freeware. Freeware is just the poisoned candy they serve you so that you get hooked, until they can force you to buy. — Isilanes 08:30, 13 May 2007 (UTC)Reply
Thanks for noting my concerns with IFDs. With regard to Chemsketch, nobody is obliged to use them. By working with them, (i.e. telling us what we like to do here) it does serve our interest by providing potential contributors with an easy-to-use tool, pre-configured for our style guide.
Ultimately, most professional chemists here use commercial software, be they ChemDraw, ChemSketch, ISISDraw, etc. The key to having contributors contribute is to make things easy for them and saying that they should only use free (i.e. GNU or similar) software is counterproductive. Do take a look at the discussions here and the discussion on Endnote here, specificially, "Yes, but the point is that many practicing chemists already have Endnote libraries, or can export the citations to Endnote easily from CAS or ISI without having to type in the details, which is the main hassle. --Itub 18:38, 13 April 2007 (UTC)" --Rifleman 82
  • For me, it's fine if everyone uses what thet see fit, commercial or not. However, I am not saying that we should "force" people to use ChemTool. I'm just saying that ChemTool already does what we are asking to commercial programs, but they still can't. Proposing the use of a free software tool is counterproductive, but asking people to settle for PNGs because the commercial programs still can't handle SVGs is not? Wikipedians are expected to contribute with PNGs which will be superseded by SVGs when/if we manage to make a commercial software company do what we want (however willing they seem now)? Shouldn't the efforts be spent in improving the free software programs? After all, Wikipedia is a free encyclopedia, isn't it? Imagine the huge propaganda it would be for company X if they could say: "95% of chemical drawings in Wikipedia were made with our program", and compare it with our pride at saying "95% of chemical drawings here were made with free software". Do we want to collaborate with the former? — Isilanes 11:38, 13 May 2007 (UTC)Reply
As a chemist I use chemsketch. I like it and I'm not interested in learning unix/linux, then learning chemtool, etc. It might be easy, it might not. But I'm not interested because in my professional work it'll be ChemSketch. Same for others who may be using whatever they might be using. Free software does have a place in wikipedia. But, where I am, 70 or so % of chemists use chemdraw (meaning I'm one of the 30 %). So, instead of telling them that there are already free software available which beats what they are using hands down, we should support the output of chemdraw instead of forcing free software on them. Believe it or not, many int his community do not belong to the typical wikipedia demographic of the young, relatively free, university student. --Rifleman 82 12:15, 13 May 2007 (UTC)Reply
Side note: instead of creating new images, do check if there are existing images at commons before creating them again. An example would be Image:1,3,5-triazine.svg which is a duplicate of Image:1,3,5-Triazin - 1,3,5-triazine.svg. Having so many duplicates does not allow us to share images across other language wikiprojects, and is a waste of bytes. This is something maybe all of us can take note of. --Rifleman 82 09:31, 13 May 2007 (UTC)Reply
  • Maybe this is a fault of the uploader of Image:1,3,5-Triazin - 1,3,5-triazine.svg? Why didn't she modify the PNG version to notice that there existed a SVG version? I am converting XXX.png to XXX.svg. Sometimes (well, once) a XXX.svg existed, and I was warned at uploading. That's fine. However, if YYY.svg is the SVG version of XXX.png, and the relevant article points to XXX.png (and YYY.svg can even be orphan), then it is not trivial (i.e. it's a PITA) to match XXX.png with the corresponding YYY.svg, which might even not exist (in general, it doesn't). Anyway, yes, it's something to take into account, specially not to create a SVG without notifying it in the PNG it substitutes. If a SVG does not substitute any PNG, then don't worry, I will not create it, since I am uploading SVGs only for PNGs whose pages asks for SVG counterpart. — Isilanes 11:38, 13 May 2007 (UTC)Reply

Iñaki, why not make some SVGs for articles without images? I think that's a more pressing priority than SVGing our back catalogue of images.

Ben 11:59, 13 May 2007 (UTC)Reply

I'd agree with Ben here. I don't see much point of creating SVGs of structures which already do have structures, when many more structures are lacking. --Rifleman 82 12:15, 13 May 2007 (UTC)Reply

I only replace PNGs when they have poor geometry (e.g. wrong bond angles) or very low resolution. There are some PNG structures in drug articles with a width of 100 px—that's incredibly low. Otherwise, I stick to adding SVGs to articles which have no images. Fvasconcellos (t·c) 16:24, 13 May 2007 (UTC)Reply
User:Isilanes, perhaps you can whip up a replacement image for Image:Ammonium perrhenate.jpg? Thanks! --Rifleman 82 05:28, 14 May 2007 (UTC)Reply

I think that's a very sensible approach. 100 px PNGs are silly - you can't easily use them elsewhere and they usually look ropey. If we spend too much time converting perfectly serviceable (and often visually and technically superior) PNGs to SVGs, we are doing the readership of Wikipedia a huge disservice by limiting our coverage significantly.

Ben 18:34, 13 May 2007 (UTC)Reply

I (and probably many of you) have hundreds of chemical structure source files (e.g. in ChemDraw format) that are only waiting for an updated version of the molecule editor with SVG export. I think the {{Chemical structure}} is unnecessary and possibly counterproductive when it encourages users to recreate existing structures in SVG (in an often superior inferior fashion) instead of drawing missing structures. Cacycle 19:00, 13 May 2007 (UTC)Reply

Do you mean in an inferior fashion? If so, I thoroughly agree. I, too, have thousands of ChemDraw files waiting to be reborn as shiny SVGs. I was able to make a few SVGs from ChemDraw using a 30-day trial of Adobe Illustrator, but AI costs stacks of cash to buy and even then it's a bit involved to get a workable chemical SVG out. It'd be so good if we could go into ChemDraw and click Save as SVG and that was it - upload to Commons and Bob's your uncle.
Ben 21:49, 13 May 2007 (UTC)Reply
On an aside, (this isn't criticism, Ben, please don't take it as such) I noticed that the SVGs you uploaded (created with AI) have a distinctively larger footprint compared to those created by other users, including myself. Anyway, as pretty much anyone agrees, the best option would be direct export, straight out of the molecule editor—the only cross-platform program I know with this capability is BKchem, and I'm not really keen on its results. Does anyone know an editor that will 1) Run on Windows, 2) export directly to SVG, 3) give excellent results and 4) be free? :O) Fvasconcellos (t·c) 22:09, 13 May 2007 (UTC)Reply
In response to Cacycle, using a vector format is much better than either a pixel-format or a proprietary one. It is more future-proof even if there are not many chem tools exporting into SVG format now, or they do so badly. SVG is in XML, therefore, there are already many tools to manipulate and transform it. For example, it is possible to add metadata about the drawing within the SVG file such as its Chemical Markup Language (see commons:Image:Amlodipine.svg). From the CML, it is possible to recreate another SVG drawing or export to other formats such as PNG, PDF, text or mediawiki markup. About the quality of SVG chem structures, some people could volunteer to review them. I am more of a software developer than a chemist, so I would hope someone reviews my structures. DoSiDo 22:40, 13 May 2007 (UTC)Reply

AI adds loads of proprietary metadata that no-one wants or needs. I couldn't figure out how to ditch it, hence my mahousive SVG files. In response to DoSiDO, I wouldn't say that SVG is much better than PNG etc. It has various advantages, that you mention, but to me they seem less important than simply having a clear, easily manipulated 2D chemical structure or reaction scheme.

Fancy things that SVG can do are fine, but the vast majority of people who read WP chemistry articles are probably not experts in chemical informatics and don't care about CML. Not that those features aren't useful - I bet in a few months or years time, there will be loads of ways we can all exploit them to great benefit. And anyway, I bet quite a large proportion of chemical SVGs on WP contain no chemical metadata whatsoever, so they're not that great.

I like PNGs because they're quick and easy for me to make and they don't go wrong - they're robust and reliable.

Ben 22:49, 13 May 2007 (UTC)Reply

Ben, I am trying to find a way to automate the creation of SVG chemical structures for this project. Two years ago, I played with CML to SVG to PNG to PDF etc... So these "fancy" things are already a reality. I think it would be much faster and reliable to program the SVG conversions than to do them by hand. This does not necessarily exclude human reviews. I have to work on adapting my javascript/xslt code to the mediawiki universe. The chem tools will probably incorporate export to SVG at one point, but we don't have to wait for them. And, anyway, they will probably add unwanted proprietary metadata. DoSiDo 16:30, 14 May 2007 (UTC)Reply

I think that's a good idea - I guess you mean we'll be able to create an SVG structural formula by typing code rather than drawing in ChemDraw or similar. However, there should still be the option to create images by hand.

Creating a chemical structure is not like formatting mathematical expressions with LaTeX - very often, especially for complicated structures that can be drawn many ways, you need someone with an eye for design and an understanding of chemistry to choose the clearest and best orientation. The code would have to allow that flexibility or it would only be useful in limited circumstances.

Additionally, coding can be cumbersome, especially for complicated molecules. It might often be much quicker and easier to sketch in ChemDraw and export to PNG than to faff around with complicated syntax. And what about labelling distances and angles within molecules, such as Image:Thionyl-chloride-2D-dimensions.png?

I'm not asking for us to restrict progress, I just hope we don't consider manually-created images obsolete any time soon, because they have many advantages that cannot be achieved automatically. We should by all means pursue CML, InChI, Jmol etc., but let's not ditch a quick, efficient and easy method of conveying information. We need to be not only future-proof but also present-proof! No point filling WP with ugly SVGs. It takes me about 1 minute tops to create, edit and upload a 2D chemical PNG. I see no reason why the two cannot coexist peacefully.

Ben 16:36, 15 May 2007 (UTC)Reply

As I understand it (from the discussion below), you would draw the structure in ChemDraw or ChemSketch (in Windows XP), then do "Save as SVG with CML" to make the file - is that right? It should still take about a minute, the main difference being that there is now chemical information hidden behind the pixels. No extra work. Is that right? Walkerma 18:56, 15 May 2007 (UTC)Reply

Hoping not to cause upset since I am the product manager for ChemSketch...I am watching this with interest of course. We DO want to support SVG export directly and make it available in ChemSketch ...commercial ware and freeware. Since there are over 760,000 downloaders of the freeware that have NOT purchased ChemSketch this is done as a public service...it is not poisoned candy until people buy. I am wondering whether there is value in us adding a direct SVG export to ChemSpider so that Wikipedians can search the structure by name and, if they agree with the displayed structure as is, can simply export the SVG. We could define a Wikipedia format for export if someone wants to assist. Since ChemSpider is very much Web 2.0 in nature...a permanent beta...we could likely get this done fairly quickly if there was support. --AntonyWilliams 20:12, 15 May 2007 (UTC)Reply

If we're talking about what you suggest, Martin, then that'd be great. Hopefully you could tag components like angle labels as ignorable, so any structure searching method wouldn't get confused by the presence of extra objects.
Ben 21:53, 15 May 2007 (UTC)Reply