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

Hatched wedge vs hatched line
Do we follow IUPAC's suggestion, and use a hatched line for stereochemical bonds pointing away from the viewer? That would seem sensible to me, and is what I have been doing so far. The reason I am asking, is that someone replaced an SVG which had a hatched line as per IUPAC with a PNG which had a hatched wedge on the Tetrahydrocannabinol page. I changed it back, and noted the reason on the talk page, but I just want to be sure that we don't have a specific ruling on the issue. --Slashme 14:59, 5 November 2007 (UTC)
 * The IUPAC recommendations have been updated to discourage hatched lines in favor of wedges. Hang on, I'll track down the link—this has just been discussed elsewhere. Fvasconcellos (t·c) 15:39, 5 November 2007 (UTC)
 * Here we go: 2006 recommendations and relevant discussion at Ben's Talk page on Commons. Fvasconcellos (t·c) 15:44, 5 November 2007 (UTC)

Thanks! I'll update my pictures accordingly (once I get around to it... )--Slashme 19:11, 7 November 2007 (UTC)

BKChem
Has anyone here tried out BKChem for SVG drawing? --Slashme 08:40, 17 October 2007 (UTC)

I think the German chemistry people use it quite a lot. Walkerma 15:36, 17 October 2007 (UTC)

I did some work some time ago: User_talk:V8rik, really promising but with a serious flaw when it comes to subscripts. If that can be fixed I am more than happy to start using it and endorse it. —Preceding unsigned comment added by V8rik (talk • contribs) 17:42, 17 October 2007 (UTC)


 * OK, I see there's a Debian package now, so I'll check it out. --Slashme 19:37, 17 October 2007 (UTC)

I played with BKchem on OS X a few months back (it's in fink, for those who use it), can't remember any glaring problems but I also didn't look at its svg capabilities. DMacks 19:42, 17 October 2007 (UTC)


 * I've tried it out (on Debian Etch). It works, but its SVG is not plug-and-play.  Although the subscripts are (as far as I can see) bog-standard SVG, rsvg messes them up horribly, so if you want to make an SVG, you have to avoid using subscripts, which means specifically telling BKchem not to touch your text (because it helpfully makes "CH3"s for you if you type "CH"), and then put in the subscripts with inkscape afterwards. Another helpful workaround is to select all in inkscape and "ungroup" until no groups are left (because it makes everything a group, for some strange reason).  Then you can select all your backbone lines and combine them into one path (and if you're masochistic like me, join the segments).  You will also want to set the path to "no fill" in this case. This reduces the file size by a huge amount, and makes it much easier to edit.  If you're virulently anti-cruft like me, you can also do a search-and-replace in your svg file to remove fractional parts of numbers (in vim, :.,$s/\([0-9]\)\.[0-9]\+/\1/g just below the preamble, to avoid changing version numbers :-).  In my experience, this makes no difference to the picture (easy to check and fix any minute problems) and saves a lot of data. Call me a maniac if you like, I can take it.


 * Also, and this makes BKchem less of a contender for most people for the moment, you have to manually remove its page size specification, because that confuses Inkscape badly.


 * It also makes its text "Helvetica", so a search-and-replace to "Sans" is a good idea. Not yet production-quality in terms of its interoperability with our other favourite tools, but I like it more than chemtool so far. --Slashme 22:03, 17 October 2007 (UTC)

OK, I hereby nominate User:Mysid as the patron saint of Wikipedia chemists. She wrote a perl script to fix BKchem files: User:Mysid/scripts. --Slashme 08:41, 19 October 2007 (UTC)


 * I've begun to use BKChem regularly. The only problem I've noticed is with subscripts - they appear much larger than they're supposed to, and it makes the image useless, unless corrected before uploading. Fuzzform 21:12, 24 October 2007 (UTC)


 * That's part of what Mysid's script is for. I've started hacking away at it; you can find my hacked version at User:Mysid/scripts/Slashme.  I have tested my version with a variety of improbable molecules, and it seems to generate good output.  Let me know if it works for you. --Slashme 07:53, 25 October 2007 (UTC)

P.S.: I've moved my version of the script to WikiProject_Chemistry/Structure_drawing_workgroup/Mysid%27s_script, so that we can all hack at it together. It works fine as it stands, but it can be optimised and improved still. It makes creating good SVGs a breeze: Draw it in BKchem, run it through the script, and you're done. If you like you can do minor cleanup with inkscape and/or a text editor, but that's not necessary. --Slashme 08:33, 25 October 2007 (UTC)

Is the rsvg breakage on the Wikipedia-server end of things or on BKchem's? Does whichever-one know about it, have any ETA or other plans to fix it? If "WP's" and "no", would it be worthwhile trying to push this kind of fix as an option in BKchem itself? DMacks 01:02, 26 October 2007 (UTC)


 * It's on librsvg's side: librsvg on Wikipedia or on my computer at home fails to honour  or  tags. Mysid provided the following links:
 * #5792 in Wikimedia Bugzilla, #340047 in librsvg's Bugzilla, so I guess the apropriate parties have been notified. --Slashme 08:19, 26 October 2007 (UTC)

The good news is that Beda (the BKchem developer) will soon be releasing a version which writes code which librsvg understands:

On Friday I have found that new versions of Cairo support SVG export. Because of this I was able to very quickly prepare an SVG export plugin that is of the same quality as other Cairo based exports and seems to be fully compatible with RSVG. I plan to release it on Monday or Tuesday.

I'm sure I'm not alone in applauding his efforts! --196.44.36.252 22:22, 28 October 2007 (UTC)


 * I am eagerly anticipating this new release. V8rik 16:56, 29 October 2007 (UTC)


 * this is the result of bkchem-0.12.0_pre6.exe (Windows), not quiet there (in inkscape the superscripts are not enlarged but correct size / ignored) V8rik 17:32, 30 October 2007 (UTC)




 * Me again. the image above is a regular svg export (no changes there as expected). The new release also has a special svg (cairo) export option (I overlooked that on my first attempt) which unfortunately crashes! —Preceding unsigned comment added by V8rik (talk • contribs) 17:51, 30 October 2007 (UTC)

OK, thanks for the feedback. I'll send him a mail pointing him at this page, and I'll keep on using the old version in the meantime. --Slashme 11:06, 31 October 2007 (UTC)


 * Beda's response:

I think that I have already found the source of the problem. When rendering some text, bkchem gets stuck. For some reason Cairo under Windows provides only very crude steps between different font sizes and bkchem gets stuck in a loop searching for the best suitable font size (Cairo under Linux seems much better in this). I have already fixed the problem of endless loop, unfortunately the big steps between font sizes mean that the text is rendered either slightly smaller or bigger :( I will try to find if there is some solution to this. --Slashme 10:26, 2 November 2007 (UTC)

Another update from Beda: Hi David,

I have just released a new version that should fix the SVG export problem on windows.

Thanks for passing my comments to the Wikipedia, I don't have time myself to watch it :) --Slashme 18:58, 7 November 2007 (UTC)


 * I am happy to announce that the new bkchem version 0.120.pre7 (windows) has the subscript issue solved! Exhibit I: new image in Hantzsch pyridine synthesis. In fact I have been doing a large number of pics already with version 6 (bypassing the subscript issue by not using subscripts) see for example here: Transfer_hydrogenation and I am going to endorse the product on my user page. Would it be interesting to having it endorsed by the structure drawing group as a whole? In the past we have discussed collaborating with chemdraw but no developments there. V8rik 17:50, 13 November 2007 (UTC)

I guess if enough of us list it in "software we use", that's a good enough endorsement, but I would be willing to support a formal endorsement if that were on the cards. --Slashme 15:01, 14 November 2007 (UTC)
 * I have added my name to the list, that is a nice solution, that eliminates the need to explicitly endorse a product. V8rik 17:11, 14 November 2007 (UTC)


 * Fink's bkchem is now at pre7, and the Export SVG via Cairo works fine. The normal Save SVG is still busted, but also fink's librsvg is kinda vintage. DMacks 22:13, 15 November 2007 (UTC)