Jump to content

Template talk:Chembox

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

This is an old revision of this page, as edited by 158.129.151.7 (talk) at 15:23, 10 January 2012 (Use of Crystallography Open Database (COD) numbers in Chemboxes?: Adding my e-mail, deleting uninformative sentence). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

WikiProject iconChemistry Template‑class
WikiProject iconThis template is within the scope of WikiProject Chemistry, a collaborative effort to improve the coverage of chemistry on Wikipedia. If you would like to participate, please visit the project page, where you can join the discussion and see a list of open tasks.
TemplateThis template does not require a rating on Wikipedia's content assessment scale.

IUPAC name is broken

All articles which emply Chembox have a blank in the IPAC name, below the images of the molecules, even though there is the following in the source: 'IUPACName=...'.

If you click on the "Show" button in the box, the IUPAC name will display. If you have any more problems, please let us know. Physchim62 (talk) 20:20, 15 February 2009 (UTC)[reply]
Hiding all IUPAC names behind a collapsible list, just because a few ultra-long, multi-hyphenated ones (like the Violaxanthin example) break the infobox formatting, seems a little heavy-handed. In particular, to the casual reader, it suggests that the IUPAC name is not usually used, and is hence only shown if you specifically ask for it by clicking on a button. This inaccurate impression is further confirmed when the revealed name does not look obviously problematic, just a bit more formal. If no fully automated solution to the formatting problem is possible, perhaps the default should still be to display the name, but with some way to override the default in the Chembox source (e.g., using "IUPACNameLong = ...")? Hqb (talk) 18:02, 10 March 2009 (UTC)[reply]
Could we have a parameter like we have in talk page templates, "nesting=yes"; perhaps a "hide=yes" option? I agree with Hqb that the present situation is unsatisfactory. Thanks, Walkerma (talk) 23:56, 10 March 2009 (UTC)[reply]
Wish we had text mw:Extension:StringFunctions enabled on en.wikipedia--the box could alter its display depending if the name were longer than some predefined value:( DMacks (talk) 01:53, 11 March 2009 (UTC)[reply]
It is not acceptable to hide all chemical names. Until we have an automatic version we should either use another parameter to decide if we hide the name or use css to display a scrollbar if the name length is too long (width, max-width, overflow). Cacycle (talk) 13:18, 2 April 2009 (UTC)[reply]
Drugbox, e.g. Fluoxetine uses the entire width of the infobox to display the IUPAC name. Seems however a breaking space needed to be added manually. We could do that, or could use a no-width optional break (& #8203;) to indicate the best place to break. Anyway, hiding the IUPAC is the worst solution. Lmatt (talk) 23:13, 15 April 2009 (UTC)[reply]
Breaking spaces are not necessary for the drugbox, but they improve layout for some of the more complicated IUPAC names. No-width breaks have been discussed and found a good idea, but actually they are not much used. I, too, would support using the whole width of the chembox to show the IUPAC name. --ἀνυπόδητος (talk) 10:02, 20 January 2010 (UTC)[reply]

Has this topic been dropped? It seems that the consensus was that the current default hiding of the IUPAC name is a bad thing. -- ToET 01:36, 10 October 2009 (UTC)[reply]

Request for action: reinstate full IUPAC name as shown by default

Following the above discussion there seems to be a consensus developing that for several reasons it is a bad idea to universally suppress the IUPAC name by default, and that instead the IUPAC name should be shown by default, with facility for it to be hidden in specific cases as flagged.
If there are no rebuttals or disagreements lodged, then action should be taken to implement the above changes. —DIV (138.194.12.32 (talk) 03:40, 20 January 2010 (UTC))[reply]

I have implemented this, add a parameter 'IUPACName_hidden = yes' to hide it by default. Will tweak {{chembox IUPACName}} further soon, though I would like to keep a 'hide' button there, so people with a really small screen can still choose to 'hide' names which we think are not too long, but who give problems for some.
I would not 'break' the names in some way, I am not sure how search engines (and not just google ..) etc. will cope with this. Though that problem is 'minimal' for IUPACName's, it may give problems with SMILES and InChI (where I am now tempted to implement the same option, show by default, hide as a choice). --Dirk Beetstra T C 10:37, 20 January 2010 (UTC)[reply]
While the chemboxes are not adapted these with a large IUPAC name are much broader now. 'IUPAC name shown should be the default with an option for hidden if desired.
May be something like this: "| state = collapsed" (must be editable).--Wickey-nl (talk) 14:45, 20 January 2010 (UTC)[reply]
By the way, why is it changed without looking to the suggestions above (Hqb, Walkerma). And "using the whole width of the chembox to show the IUPAC name" seems a good idea.--Wickey-nl (talk) 15:02, 20 January 2010 (UTC)[reply]
I have for now chosen to make the name visible as a standard, with an option to hide it (the hide button), and with a box-parameter to hide it as standard for the long ones ('IUPACName_hidden = yes' in the body).
We could consider to rewrite the ones which are in the body of the chembox (IUPACName, OtherNames and SystematicName) to show in a 'two row' format, in stead of a two-column format. I'll have a play with that. --Dirk Beetstra T C 15:32, 20 January 2010 (UTC)[reply]
I have made it two rows, now. One of the longer I now found is Citrinin, which shows nicely. I find it a bit unfortunate that the {{Collapsible list}} standard shows its 'title' in boldface, we may want to remove that template and do it by hand. How does this look (you may need to purge the page to show the new format, or go to the edit-mode). I would like to see now some REALLY long names which result in really wide boxes. Any available? --Dirk Beetstra T C 15:52, 20 January 2010 (UTC)[reply]
Another one: Neohesperidin dihydrochalcone. --Dirk Beetstra T C 16:29, 20 January 2010 (UTC)[reply]
Thank you. I would say aligning left would give a more quiet image. Examples: EDTA, Pentetic acid and the above mentioned Violaxanthin.--Wickey-nl (talk) 16:32, 20 January 2010 (UTC)[reply]
I have cleaned the OtherNames fields. To me they look fine, but you can play a bit with the three templates: Template:Chembox IUPACName, Template:Chembox OtherNames and template:Chembox SystematicName (they are not protected, but still be sure to test before leaving them, they are still transcluded heavily and could leave a mess. --Dirk Beetstra T C 08:06, 21 January 2010 (UTC)[reply]
I wonder why there are two templates, Template:Chembox IUPACName and template:Chembox SystematicName (both protected).
For me, "ID" after ChemSpider is disturbing and superfluous.--Wickey-nl (talk) 14:44, 21 January 2010 (UTC)[reply]
Two answers:
Acetic acid and Ethanoic acid, one is IUPAC recommended, the other one would be systematic.
ID .. hmm .. I see the problem. We have 'CAS Number', 'EC Number', 'UN Number', 'RTECS Number', which all make sense, for ChemSpider we say 'ChemSpider ID' (I think that Antony would use that as well, though), but then we don't have it for PubChem .. should it then be PubChem ID/Number as well? --Dirk Beetstra T C 14:54, 21 January 2010 (UTC)[reply]
Systematic name is often used as synonym for IUPAC name. But yes, there is a difference.
Just remove ID. It has no function. For all items one word.--Wickey-nl (talk) 15:03, 21 January 2010 (UTC)[reply]
So I'll leave both, just to be able to use them.
Removed ID. --Dirk Beetstra T C 15:09, 21 January 2010 (UTC)[reply]
Latest iteration is very nice, my compliments. --Rifleman 82 (talk) 02:13, 22 January 2010 (UTC)[reply]

IUPACName_hidden = yes

This does not work (See [1]).
In many articles the IUPAC name is only short because it is the wrong name.--Wickey-nl (talk) 11:24, 10 March 2010 (UTC)[reply]

Nope, it does (you spelled the name of the parameter wrong ..). --Dirk Beetstra T C 11:27, 10 March 2010 (UTC)[reply]
Ah, I copied the misspelling above.--Wickey-nl (talk) 12:32, 10 March 2010 (UTC)[reply]

Image problems

I've come accross a bug in the chembox when it displays left and right images, see Glucose and Fructose for examples. When the two images have different heights, the shorter image is aligned to the top of the cell, rather than being center aligned as would be more attractive: it also seems to be left-aligned rather than center-aligned along the horizontal of its cell. I cannot even manage a quick fix to the problem by adding padding, as I haven't been able to override the common style for infoboxes: at least that's where I think the problem is, maybe I'm looking in the wrong place ;) We've recently changed the CSS class for the chembox (see above), and I suspect this might be the cause of the problem, but I'm not blaming anyone! I'd just like to see if anyone has ideas for the solution that seems to escape me for the moment :) Physchim62 (talk) 17:00, 2 September 2009 (UTC)[reply]

I have no ideas to suggest, but I do hope this gets done. I have to avoid putting two images of different heights side by side with each other. It would be much better if the vertical align was central. --Ephemeronium (talk) 16:25, 23 October 2010 (UTC)[reply]

{{editprotected}} Regarding {{chembox}}:

The old links in the format http://www.whocc.no/atcddd/indexdatabase/index.php?query=N06AA09 are broken.

The new format is: http://www.whocc.no/atc_ddd_index/?code=N06AA09

There's an additional parameter now to show an extended description. This is kind of nice, but pushes the info on the drug quite a bit further down the screen: http://www.whocc.no/atc_ddd_index/?code=N06AA09&showdescription=yes

MichaK (talk) 13:59, 18 December 2009 (UTC), copied here from Template talk:Drugbox by ἀνυπόδητος (talk) 15:36, 18 December 2009 (UTC)[reply]

Updated {{Chembox ATCCode}} since this is not edit protected, but I'd rather someone check my edits. And should "showdescription=yes" be included? --ἀνυπόδητος (talk) 16:11, 18 December 2009 (UTC)[reply]
No complaints, so I guess it went ok. —TheDJ (talkcontribs) 11:00, 20 December 2009 (UTC)[reply]
I don't think that the 'showdescription=yes' is needed (one can toggle that on the page itself by clicking the 'Show text from Guidelines'/'Hide text from Guidelines'). Are there cases where one then would get a very large list, or is it still all contained in about a screen full (the example here is about a full screen for me)? --Dirk Beetstra T C 09:13, 27 January 2010 (UTC)[reply]
Found an example with a longer text [2]. Most pages seem to be about the length of amitriptyline, but I've only checked about a dozen random examples. --ἀνυπόδητος (talk) 10:55, 27 January 2010 (UTC)[reply]

I'm not a specialist on this, so I'll ask 'what would the reader want to get'? I think specialists would have enough on the compact page, but that is not who we are writing for. However, how many non-specialists would actually follow this link to get more understanding of the subject (as opposed to mere curiosity of 'what does this button do'). --Dirk Beetstra T C 11:37, 27 January 2010 (UTC)[reply]

New online tool for collecting ChemBox data

We have just connected a demo CGI to our portable Web sketcher at http://www.xemistry.com/edit/frame.html which we hope will be helpful for collecting chemical structure identifiers for the standard chemical infobox. Draw a compound (example: pyridine) in the sketcher, then press the "Compute Wikipedia Data" button in the form below. The tool will scan various Internet-accessible databases and format a cut&paste-ready chembox section for Wikipedia editing with the harvested data.

Feedback is appreciated! —Preceding unsigned comment added by 217.232.234.237 (talk) 20:23, 18 December 2009 (UTC)[reply]

MainHazards

Template:Chembox RPhrasesTemplate:Chembox SPhrasesTemplate:Chembox MainHazardsTemplate:Chembox Autoignition
Hazards
Flash point

Anyone know why the "MainHazards" field doesn't display in the chembox at 2-Ethylhexanoic acid? -- Ed (Edgar181) 15:29, 4 January 2010 (UTC)[reply]

See Template:Chembox Hazards. The block starting with the line {{#if:{{{EUClass|}}}{{{RPhrases|}}}{{{SPhrases|}}}{{{RSPhrases|}}}| only displays if one of the params EUClass RPhrases SPhrases RSPhrases are present; and conversely, everthing after the pipe (|{{#if:{{{GHSPictograms|}}}) down to SkinHazard displays only if none of these params is present. No idea why it is written this way. --ἀνυπόδητος (talk) 17:20, 4 January 2010 (UTC)[reply]
Assuming I understand it correctly, I don't think it should function this way. There shouldn't be any reason for the variables to be dependent on each other like this. The markup is a little beyond me, but could you suggest an appropriate fix? -- Ed (Edgar181) 20:15, 6 January 2010 (UTC)[reply]
Hold on, I have to think a bit... --ἀνυπόδητος (talk) 12:01, 7 January 2010 (UTC)[reply]
How is that? I removed the conditions in the main block, so that EUIndex, EUClass, RPhrases, SPhrases, RSPhrases, GHSPictograms, GHSSignalWord, HPhrases, PPhrases, MainHazards, InhalationHazard, IngestionHazard, SkinHazard, EyeHazard can all be displayed simultaneously if specified. You can try it out by inserting parameters into the template at the beginning of this section. The source code is at User:Anypodetos/Sandbox. Are you sure there was no good reason for introducing these restrictions in the first place? --ἀνυπόδητος (talk) 19:36, 7 January 2010 (UTC)[reply]
Your changes seem reasonable to me, but I don't know if there was a specific reason for the current coding. User:Beetstra and User:Physchim62 have done most of the work on the chembox templates, so I have asked them for their input (Dirk Beetstra seems to be on holiday, though). It's probably best to hear from them before making any non-trivial changes to the template. Thanks for your help. -- Ed (Edgar181) 21:02, 7 January 2010 (UTC)[reply]

The conditions are (were) there to discourage people from adding unsourced data about hazards. It is simply too easy to say that every chemical compound has a hazard, along the line of "all chemicals are dangerous and should be handled with care"! You can get nasty skin irritation from handling sodium chloride in industrial circumstances, for example, while potassium chloride is both a "salt substitute" and an essential part of the lethal injection used in most executions in the U.S.
The EU criteria are far from perfect, but they are at least published and external of Wikipedia: for this reason they have been preferred over the judgments of individual editors for use in the infobox. Some chemicals have 'unusual' hazards (eg, hydrofluoric acid) but these should really be discussed in the article text rather than simply being in the infobox. Physchim62 (talk) 22:00, 7 January 2010 (UTC)[reply]

To take the example of 2-ethylhexanoic acid, it is really not useful to classify this compound as flammable when it's flash point is 110 °C (230 °F). No regulatory body would classify it as flammable, and you would have to take a blow torch to a sample to ignite it! The description of "flammable" simply doesn't concord with the definition that our users would give it. Physchim62 (talk) 22:18, 7 January 2010 (UTC)[reply]
OK, you're right, the use of "flammable" in that case may not be appropriate. But if it were flammable, do think it would be appropriate for the MainHazards field to show "flammable"? -- Ed (Edgar181) 01:55, 8 January 2010 (UTC)[reply]
the initial conditions have to be there, they are there to make sure that the module is only displayed if one of the parameters has value (some chemboxes do have the modules in them, but none of the parameters have a value, just to make it easy for others to give them one when they are found). The initial condition has to contain all of the variables that are generating something to display in the template. If it is not there it shows, like the box just above this paragraph on the right... --Beetstra (public) (Dirk BeetstraT C on public computers) 21:57, 7 January 2010 (UTC)[reply]
Note: I didn't remove the initial conditions of course; just the ones that prevent some of the fields to display if some others are present. I'm not saying I'm sure it should work like that – I leave the judgement to you. --ἀνυπόδητος (talk) 07:12, 8 January 2010 (UTC)[reply]

CAS number: where to link?

Could {{Chembox CASNo}} be modified to link to the CAS No. tool at Toolserver (http://toolserver.org/~magnus/cas.php), like {{CAS}}?

And while I am at it: {{CAS}} seems to behave strangely with the second parameter. Could somebody have a look at the example in the template's documentation – surely this isn't meant like that? ἀνυπόδητος (talk) 12:01, 7 January 2010 (UTC)[reply]

No, I disagree. CAS numbers are given out by CAS, and therefore they are linking to commonchemistry.org, just like pubchem should link to pubchem, chemspiderid to chemspider, etc. etc. --Beetstra (public) (Dirk BeetstraT C on public computers) 13:59, 8 January 2010 (UTC)[reply]
Yes, but PubChem provides (to my knowledge) results for all compounds with PubChem ids, while commonchemistry.org has only "~7900 chemicals of widespread general public interest". The first example I found is 115-93-5 which isn't on commonchemistry, but ChemSpider and ESIS retrieve the structure of cythioate. The CAS No. tool would provide people with more links to increase the chances to find something useful instead of "No CAS Registry Number® matched your search." --ἀνυπόδητος (talk) 22:36, 8 January 2010 (UTC)[reply]
True, but I still hope that the CAS will see that they get hits on those compounds which are not on their site, but do have the interest from Wikipedia users, and that they will also add them to their site then. And for me the argument that we link to the official place is stronger than that we link to a place where more information can be found (though the CAS site may give some information). Users will quick enough learn that the other sites linked to will give more and better information then the CAS site (which may be an incentive for CAS as well .. they could link through to relevant information on their side). --Dirk Beetstra T C 09:41, 11 January 2010 (UTC)[reply]
Okay, you have convinced me :-) I just think it's a bit strange that {{chembox}}, {{drugbox}} and {{CAS}} link to three different places... I'll suggest that drugbox's link be changed. Cheers, ἀνυπόδητος (talk) 12:43, 11 January 2010 (UTC)[reply]

No place for second PubChem number

Can it be added, also in the documentation?--Wickey-nl (talk) 11:06, 20 January 2010 (UTC)[reply]

Added for PubChem and ChemSpiderID, could you please test and see if it displays correctly? --Dirk Beetstra T C 11:37, 20 January 2010 (UTC)[reply]
Only the number is displayed, not as a link. And no space between. I also would add a comment: 6441444 (Zinc-DTPA).
And the similar ChemSpiderID should be placed immediately after PubChem.--Wickey-nl (talk) 11:59, 20 January 2010 (UTC)[reply]
Hmm .. there is a   there, it should show a space (but I see what you mean).
I will move the ChemSpiderID just below the PubChem, ordering is anyway 'arbitrary'.
Linking is there difficult, that is something that would need a larger change (I'll try and work on that later). --Dirk Beetstra T C 12:21, 20 January 2010 (UTC)[reply]
I created a solution for it, which may work, but which needs testing. You can now use PubChem for the main one, and next ones supply in PubChem1 through PubChem5; each can separately be verified, commented, etc. The rest can go into PubChemOther. Similarly goes for CASNo and ChemSpiderID. --Dirk Beetstra T C 12:53, 20 January 2010 (UTC)[reply]
Great! You are fast. Redirect 6441444 to the subpage 6441444&loc=ec_rcs without changing the displayed number is probably too much.
The fact that comments after the number may not be used with a space instead of &nbsp: is not obvious for the user. You have to know it.--Wickey-nl (talk) 14:26, 20 January 2010 (UTC)[reply]
What I meant was, that the template puts a   there .. it is curious it does not display it. --Dirk Beetstra T C 14:28, 20 January 2010 (UTC)[reply]
We talk about two different spaces. The one between the two numbers is solved now. The other is between the number and the comment. A normal space will give a strange effect.--Wickey-nl (talk) 14:14, 21 January 2010 (UTC)[reply]
I have inserted two   before the CASOther and CASNos fields, those may have been missing, but before the comment (CASNo_Comment) there was one already. Were you talking about the former two? --Dirk Beetstra T C 14:45, 21 January 2010 (UTC)[reply]
I was talking about the PubChem line. Can you adapt the examples in Template:Chembox and Template:Chembox Identifiers? Otherwise people will not use it.--Wickey-nl (talk) 14:54, 21 January 2010 (UTC)[reply]
Is it the examples (which you can edit, click the edit button in the green box, the documentation is not protected), or the code (which you can't edit)? --Dirk Beetstra T C 14:55, 21 January 2010 (UTC)[reply]

How to put a comment at a PubChem number [3]? What is the real function of PubChemOther?--Wickey-nl (talk) 11:55, 12 March 2010 (UTC)[reply]

  • PubChem is the main PubChem number, PubChem1 is the second, etc.
  • PubChem_Comment is the comment for PubChem, PubChem1_Comment is the comment for PubChem1, etc.
  • PubChemOther can be used for other information, or when one runs into a real excess. In the old version, that was where the additional PubChems were stored, they should in the end be converted into the new system. --Dirk Beetstra T C 12:00, 12 March 2010 (UTC)[reply]

By the way, I solved Maltose. --Dirk Beetstra T C 12:01, 12 March 2010 (UTC)[reply]

Thanks for your quick help. PubChem_Comment was not yet documentated.
Another question on the wrong place: ImageName does not do anything (I work on linux and tried with several browsers). Is it for a caption below the picture, or only for a popup?--Wickey-nl (talk) 12:53, 12 March 2010 (UTC)[reply]

ImageName is an old parameter in the old chemboxes. I don't think it does something at the moment, it could be revived, maybe. --Dirk Beetstra T C 13:46, 12 March 2010 (UTC)[reply]

Sometimes indispensable. E.g with left + right image or if one of two isomers is showed.--Wickey-nl (talk) 14:02, 12 March 2010 (UTC)[reply]

Just for information: the link for the french chembox (chimiebox on WP:fr) is fr:Modèle:Chimiebox. Can someone do the correction ? I can't because the page is protected. Thank you. Biglama (talk) 12:28, 27 January 2010 (UTC)[reply]

In fact, you can, as it is on the documentation. But I'll add it for you. Thanks. --Dirk Beetstra T C 14:01, 27 January 2010 (UTC)[reply]

Alt text

{{editprotected}}

Can an alt text field be added to the images in this infobox? This allows for a description of the image suitable for screen readers, accessibility aids and text web browsers.

I can change the caption to images (like this), but it's not really correct as it changes the tooltip. I'd like to suggest that {{chembox}} and {{chembox image}} pass a parameter (ImageAlt perhaps?) to {{chembox image2}}. Part of chembox image 2 could be changed to [[File:{{{File}}}|{{{Size}}}|alt={{{Alt|{{{Caption}}}}}}|{{{Caption}}}]]. --h2g2bob (talk) 01:34, 9 February 2010 (UTC)[reply]

That all looks good except that the default alt text should be empty, as alt text and caption/tooltip have different functions (see WP:ALT). I've implemented this in the sandbox with this patch to {{Chembox}}, this patch to {{Chembox image}}, this patch to {{Chembox image2}}, and this patch to {{Chembox image sbs}}. This all checks out with the test cases that I've modified in Template:Chembox/testcases. Can someone please install these four patches? Please be careful not to install the "/sandbox" strings in the sandboxes when they invoke other sandbox templates. Thanks. Eubulides (talk) 03:36, 12 February 2010 (UTC)[reply]
I have installed the four patches. I hope/think I did not include any /sandbox references, but please check if all is working now. Thanks! --Dirk Beetstra T C 08:11, 12 February 2010 (UTC)[reply]
Thanks, it looks good. I documented the new parameters. Eubulides (talk) 08:55, 12 February 2010 (UTC)[reply]
Looks good, thanks! --h2g2bob (talk) 22:20, 15 February 2010 (UTC)[reply]

Items found in the French chembox but not in the English chembox

I'm trying to import French's fr:Polyéthylène chembox, but there are a few things that (I think) there is no equivalent in the English (and its clones :-) ) boxes:

  • TTransitionVitreuse - should be Glass transition temperature
  • constanteDielectrique - should be Dielectric constant
  • pointCritique - should be Critical point
  • pointTriple - should be Triple point

BTW, is there any specific area for polymers in the Chembox? Albmont (talk) 18:40, 4 March 2010 (UTC)[reply]


Critical point, hmm, would that be critical temperature, critical pressure or critical volume?
Glass transition sounds rather proprietary to glass. Best to just add this in the article instead.
Could you describe Triple Point for me and tell me what unit it is in?
DrBurningBunny (talk) 22:28, 24 April 2011 (UTC)[reply]

Grammatical Error in Chembox?

"Except where noted otherwise, data are given for materials in their standard state (at 25 °C, 100 kPa)"

"Data are given" should be "Data is given" —Preceding unsigned comment added by 94.195.41.207 (talk) 13:32, 15 March 2010 (UTC)[reply]

Nah, data is plural. --Dirk Beetstra T C 13:35, 15 March 2010 (UTC)[reply]
Data takes a singular or plural verb. --Cheminterest (talk) 20:42, 26 March 2010 (UTC)[reply]

Molecular mass VS Molar Mass

The data on chemical drugs where the chem box lists the "Mol. mass" in "g/mol". I believe the problem is the "Mol. mass" redirects to "Molecular Mass" wikipedia article, but it should redirect to "Molar mass" (which is measured in g/mol).

(First post in a discussion! Hope everything's in check, gonna work on figuring this Wikipedia functionality out in the near future) :)

Adenylated (talk) 02:45, 3 April 2010 (UTC)[reply]

Note: This discussion is continued at Template talk:Drugbox. Physchim62 (talk) 17:02, 8 April 2010 (UTC)[reply]

Adding an image caption?

In Starch I tried to add a caption to an image using the ImageName parameter, but it doesn't seem to work as advertised in the Chembox template documentation. Is there some other parameter to be used for captions? AxelBoldt (talk) 03:48, 6 April 2010 (UTC)[reply]

You can see the text when you move the mouse over the image. --Leyo 14:17, 7 April 2010 (UTC)[reply]
Should be repaired. See here (above the heading Change link) --Wickey-nl (talk) 15:23, 7 April 2010 (UTC)[reply]
Is it also possible to add a caption (i.e. an explanatory text below the image) rather than a rollover text? AxelBoldt (talk) 16:30, 8 April 2010 (UTC)[reply]
Not at present, but it could be done fairly easily if there is demand for the feature. Physchim62 (talk) 17:03, 8 April 2010 (UTC)[reply]

The feature is obviously broken now. No captions appear. Whodunnit? —QuicksilverT @ 17:44, 22 April 2010 (UTC)[reply]


Why Is It So Difficult To Repair The Image Caption Feature???

--Wickey-nl (talk) 13:43, 23 May 2010 (UTC)[reply]

pH

On the chembox there is not pH witch is good information —Preceding unsigned comment added by Ebe123 (talkcontribs)

The pH is not a substance property but a property of a solution. --Leyo 22:17, 2 May 2010 (UTC)[reply]
The related substance properties are pKa and pKb. They are in the chembox. --ἀνυπόδητος (talk) 07:30, 3 May 2010 (UTC)[reply]

{{editprotected}}

In analogy to the IUPHAR ligand parameter that has been added to the {{Drugbox}} template, I would like to request that this parameter also be added to the Chemical infobox. The code has already been added to the sandbox (see here and here) and a test case has been created (see User:Boghog2/Sandbox5). Thanks. Boghog (talk) 06:54, 5 May 2010 (UTC)[reply]

Is it a parameter people are interested in? How many people know what an IUPHAR ligand is?--Wickey-nl (talk) 09:16, 5 May 2010 (UTC)[reply]
Five different editors have already supported adding the IUPHAR database link to the Drugbox template (see here and here). The complication is that many Wikipedia ligand articles transclude the Chemical infobox instead of the Drugbox. Hence for completeness, I have requested that the parameter also be added to the chemical infobox. Boghog (talk) 09:42, 5 May 2010 (UTC)[reply]
It is an informal policy that any info that can go into a drugbox should be able to be placed in a chembox, so yes, we should add this field. Physchim62 (talk) 09:46, 5 May 2010 (UTC)[reply]
 Done (not that I've heard of it...) I've changed the test page to confirm it works as expected.  Ronhjones  (Talk) 20:35, 5 May 2010 (UTC)[reply]
Thanks Physchim62 for your support and Ronhjones for implementing the IUPHAR parameter! Boghog (talk) 19:02, 6 May 2010 (UTC)[reply]

{{editprotected}} The last edit to this template, added a lot of use of /sandbox code. Could that part of the last edit be reverted but keeping the originally requested change. thanks. -- WOSlinker (talk) 18:39, 22 May 2010 (UTC)[reply]

 Fixed — Martin (MSGJ · talk) 07:01, 23 May 2010 (UTC)[reply]

which MSDS to link?

What is the criteria for choosing which external MSDS to link in the externalMSDS field? Also, if the NFPA data from two different MSDS's contradict, which one should be chosen, and by what criteria? Thanks.—Tetracube (talk) 20:12, 1 June 2010 (UTC)[reply]

I always link to the International Chemical Safety Card (ICSC) if it is available, and use the ICSC values for the NFPA parameters. Physchim62 (talk) 11:48, 22 June 2010 (UTC)[reply]

GHS classifications

Editors who work in the European Union may have started to notice new hazard pictograms on bottles. The reason is that the EU is changing over to the Globally Harmonized System (GHS) for hazard classification and labelling. For pure substances, the changeover will be effective from 1 December 2010. The downside of this is that, from December, all the R- and S-statements in our chemboxes will be obsolete...

At present, there are three reliable sources (that I know of) for the new GHS classifications:

Around the end of 2010, the European Chemical Agency Classification & Labelling Inventory should come on line: in principle, this will contain classifications for all pure chemicals that are commercially available in the EU.

Editors can add GHS information to the Hazards section of the chembox already (see Hexyllithium for an example). For the moment, the section has been coded so that GHS info is not displayed if there is data in the older EU format: this is to try to avoid box creep. It would be easy to swap the two over in December, so that the older classifications are only shown if there is no GHS data.

If anyone is writing new articles or doing major updates, can you think to look for GHS safety data to include, as I'm not sure how much (if any) of the changeover can be done automatically. Cheers! Physchim62 (talk) 11:48, 22 June 2010 (UTC)[reply]

Please, this template is protected, would someone who is able to edit be so friendly to alter the prevalence of the R/S senteces and the GHS-phrases. When doing so, please add an entry for the pictograms too, the solution I used in 1,2-Dibromo-3-chloropropane and Acephate is somewhat noughty from a dictionary point of view.
Template {{GHSp} ???}} is intended to show all the GHSdata. The relavant data may be taken from {{SigmaLink}} (how to do so so documentation of SigmaLink.T.vanschaik (talk) 21:02, 23 May 2011 (UTC)[reply]

Incorrect HMIS information

Not sure how widespread this is, but the HMIS info listed for dimethylacetamide says that it's flammability rating is 0, just like water. NFPA 704 says that materials with a flash point between 38 and 93C should have a rating of 2, which is what DMAc is normally listed as (DMAc flashes at 70C). —Preceding unsigned comment added by 71.75.33.24 (talk) 15:18, 1 August 2010 (UTC)[reply]

The EMA's website for looking up drug licence details has changed, and with a much more complex URL. To aid maintence of {{Chembox}} and {{Drugbox}}, seemed easiest to creat a subtemplate to format the url. The code change at Drugbox is this, but I'm not familar enough to see where this goes for Chembox. David Ruben Talk 15:35, 22 August 2010 (UTC)[reply]

Excessive box width

in sodium hydroxide might be caused by multiple CAS headers. Is there a way to tidy this up? Materialscientist (talk) 02:28, 4 September 2010 (UTC)[reply]

Yes, the same happens with multiple PubChem and ChemSpider numbers. Limit the possible maximal width? --Wickey-nl (talk) 16:21, 7 September 2010 (UTC)[reply]
I have adapted the code for CASNo, ChemSpiderID and PubChem, there were non-breaking spaces, which seemed to be the problem. --Dirk Beetstra T C 18:39, 7 September 2010 (UTC)[reply]

Other names

Is it necessary to put in the article title and the chembox title into the "other names" section if they are not the IUPAC name?--Mikespedia is on Wikipedia! 02:24, 5 September 2010 (UTC)[reply]

Chembox too long

The chembox is much too long. I have even overlooked the second one in Pyran. The chembox is longer than the article itself. Chemboxes disturb the page layout. Believe me, not everyone is interested in the density and the standard enthalpy of formation of Glucose, certainly not every time.

Pictures and names are core information and should always be visible, but the other sections should be collapsed by default, like on the pages of Chemspider.

And please let the box show, after several requests, the captions of the images, to let the reader know which isomer is displayed, which kind of representation or that it are crystals.--Wickey-nl (talk) 11:11, 10 November 2010 (UTC)[reply]

  • Another possibility is to keep pictures and names only, along with a button/internal link to the bottom of the page. There, a frame with all technical data can be showed across the whole page width.--Wickey-nl (talk) 11:06, 11 November 2010 (UTC)[reply]
I've added captions, you can use ImageCaption, ImageCaption1, ImageCaption2, ImageCaptionL1, ImageCaptionR1, ImageCaption3, ImageCaption4, ImageCaptionL2, ImageCaptionR2.
I'm not sure about length of chembox. We could try and write collapsibility into the modules, but I'd like to hear more about that before implementing. (by the way, why does Pyran have two, if Pyran is a mixture then there should be one for the 'common' mixture, and not for the different consituents (they should be on their own pages)). --Dirk Beetstra T C 11:16, 22 November 2010 (UTC)[reply]
Thank you very much. Captions should stay short and they can, because full names are not necessary. Since you choose new terms, existing names will not appear automatically. As for Pyran, it was not my work. Galmicmi changed it in may. Not a good idea; I shell reverse it.--Wickey-nl (talk) 13:35, 22 November 2010 (UTC)[reply]
Pyran should have two chemboxes, not one. For the two different isomers. The way it is now is just confusing. --Rifleman 82 (talk) 14:31, 22 November 2010 (UTC)[reply]
Well, Pyran should not have a chembox, or a chembox ONLY for the mixture, and the two possible (3?) should have each their own chembox on their own page. --Dirk Beetstra T C 14:35, 22 November 2010 (UTC)[reply]
Two pages for this compound is too much, two chemboxes is confusing. A chembox for the mixture is a good compromise.--Wickey-nl (talk) 11:00, 23 November 2010 (UTC)[reply]
I chose new terms on purpose, the old ones are sometimes filled with a proper caption, but there are also several cases where it is not. Just to avoid page breakage I think it is better to start from scratch and use a term which is really suggesting that it is for the caption. I hope this explains. --Dirk Beetstra T C 13:47, 22 November 2010 (UTC)[reply]
OK, I had understood that. I think the combinations ImageFile-ImageCaption and ImageFile1-ImageCaption1 do not work.--Wickey-nl (talk) 14:24, 22 November 2010 (UTC)[reply]
Fixed, I think (forgot one sub-sub-template and it sub-sub-sub-template). Please test it. --Dirk Beetstra T C 14:31, 22 November 2010 (UTC)[reply]
Almost perfect. Only the lining for caption L1/R1. Has break/whitespace between image and caption.--Wickey-nl (talk) 15:01, 22 November 2010 (UTC)[reply]
Saw that, sometimes they do not appear at the same height or something like that. It is now simply on 'the next line' under the image:
'image<br /><div align="center">captiontext</div>'
Not sure how to fix that. --Dirk Beetstra T C 15:19, 22 November 2010 (UTC)[reply]
Used in glucose. The imagesize changes the hight. But why there is more whitespace in L1/R1 than in 0/1?--Wickey-nl (talk) 16:15, 22 November 2010 (UTC)[reply]
In glucose, there are two orgins to the spacing issues in the L1/R1 that I see. First, File:Glucose_chain_structure.svg is shorter than File:D-glucose-chain-3D-balls.png: each's caption is "same distance" below its image and the images are vertically aligned at the top of their cells, so the shorter image's caption floats up. Second, there is a <br> between the image and the caption, which makes an extra line of whitespace. Now just need to resolve "how to make it look better" (consensus on v-align for first and template origin of second). DMacks (talk) 11:10, 23 November 2010 (UTC)[reply]
You mean, the <br /> does not have to be there, DMacks? Without it the text will also appear at the next line anyway? --Dirk Beetstra T C 11:15, 23 November 2010 (UTC)[reply]
Hold on, I may have misread a source (crappy side-scrolling!). DMacks (talk) 11:19, 23 November 2010 (UTC)[reply]
Yup, misread it. The difference seems to be that the sbs images themselves are wrapped in two levels of <div> whereas the full-width ones are not. Wikipedia talk:Chemical infobox/demo1.html is a skeletal form based on extracted HTML of glucose that faithfully seems to reproduce the issue. Maybe some difference between {{Chembox image2}} and {{chembox image sbs}}. DMacks (talk) 11:40, 23 November 2010 (UTC)[reply]
(Without technical knowledge; may be just a stupid remark): If you align the images at the bottom the captures will get the same distance to the image?--Wickey-nl (talk) 11:51, 23 November 2010 (UTC)[reply]
No, the problem is, that there are, for some obscure reason, a varying number of 'newlines' between the image and the caption. Bottom aligning would put the caption at the bottom, and the image with a varying number of lines above it. --Dirk Beetstra T C 11:53, 23 November 2010 (UTC)[reply]
I meant align at bottom the images only. Aren't they aligned apart?--Wickey-nl (talk) 12:13, 23 November 2010 (UTC)[reply]
And don't forget, there can be a browser related issue. I use Firefox on linux.--Wickey-nl (talk) 17:08, 23 November 2010 (UTC)[reply]
Sure, there can be a browser related issue as well, but there are already differences in the plain html. --Dirk Beetstra T C 17:58, 23 November 2010 (UTC)[reply]
I closed up some of the whitespace between the image and its caption in the side-by-side part. DMacks (talk) 13:24, 24 November 2010 (UTC)[reply]

Show buttons

Can the show buttons of smiles etc. be on the title line, if hidden (to make the box shorter), or does it give problems if two files/ smiles are given?--Wickey-nl (talk) 14:38, 22 November 2010 (UTC)[reply]

Needs an overhaul, will work on it when I have time. --Dirk Beetstra T C 14:48, 22 November 2010 (UTC)[reply]
Bit more info, when opened, the link between the InChI and the InChIKey that belongs with thát InChI should be clear. Moreover, it would be good that they all open in one single click (i.e., if you open InChI, that you see all InChI's, that it is clear which one is the StdInChI (and which the other flavours), and which are the InChI<->InChIKey combinations). May not be trivial ... --Dirk Beetstra T C 14:52, 22 November 2010 (UTC)[reply]
OK. Better not ad hoc fix, to avoid faults.--Wickey-nl (talk) 15:03, 22 November 2010 (UTC)[reply]
One button for ALL (more data) items would be the ultimate sollution for a growing chembox. Either a show/hide button or a simple link to a subpage, which would avoid the need for java! We can discuss about what should be always visible core information. The molecular formula is for sure and should even be higher in the box.--Wickey-nl (talk) 11:08, 23 November 2010 (UTC)[reply]
Well, that is the issue. The data is 'grouped' now by type. And for most Mw is an important thing, others might be more interested in exact mass, or in refractive indices or dipole moments or X-ray data. I could feel for collapsing the sub-boxes completely, though even that is .. questionable, as there will always be people, like me, who want to type 'benzene', and see immediately the boiling point without having to look for it. --Dirk Beetstra T C 11:24, 23 November 2010 (UTC)[reply]
Consider the (far)most important user-target. I guess most readers are common people. Many will also be technically interested, though. The compromise is one click more to see all data at once.--Wickey-nl (talk) 12:03, 23 November 2010 (UTC)[reply]

Use minuses instead of hyphens for negative values

Several quantities are display with hyphens rather than minuses. See dioxygen difluoride for an example, which lists the melting point as "−154 °C, 119 K, -245 °F" instead of "−154 °C, 119 K, −245 °F". Thanks. Headbomb {talk / contribs / physics / books} 01:49, 24 November 2010 (UTC)[reply]

Why do the temperature-related subtemplates ({{Chembox MeltingPt}} and {{Chembox BoilingPt}}, not sure if there are others) roll their own converters instead of handing off to {{Convert}} (or its subtemplates)? DMacks (talk) 02:34, 24 November 2010 (UTC)[reply]
Because they predate {{Convert}} ;) Physchim62 (talk) 13:35, 24 November 2010 (UTC)[reply]

Storage of InChIs

I've been adding InChIs to Chem/Drugboxes - and in many cases using the ChemSpider Wikibox to generate formatted data. Currently, this generates an InChI entry with the output "| InChI = InChI=1..." Which appears to be sensible on the basis that there is an entry title (| InChI = ) and then the appropriate data (InChI=1...).

At the moment the Chem/Drugboxes display this in an ugly way. It seems that they are programmed to accept data in the format "| InChI = 1..." I would like to propose a rexamination of this approach. The "InChI=1..." is an integral part of the InChI itself - if you remove the "InChI=" part it will not be understood by the current InChI software/resolvers (I haven't tested all of them). Even the format that it is displayed in the Editing view "InChI = 1..." is not handled. I understand that the wiki box displays the InChI in the correct format, but I would suggest that it makes more sense to store the information in it's original usable state, rather than stripping out information then re-inserting it upon display.

I will be requesting that the ChemSpider developers change some of the output generated for the Wikibox data (to provide InChI keys and Std InChIs) I can ask them to change the format of the InChI output - but I would suggest that it might be better to change the behaviour of the Chem/Drugboxes themselves. --14:01, 28 November 2010 (UTC) —Preceding unsigned comment added by The chemistds (talkcontribs)

As an addition I was wondering if it might make sense to use the same formatting for the SMILES entry in Drug boxes and Chem boxes rather than having one with all caps and one with all lower case? It's not hugely important I just thought it might make sense for the formatting of both boxes to be as similar as possible. --The chemistds (talk) 14:14, 28 November 2010 (UTC)[reply]
SMILES is case sensitive (lower case = aromatic), so neither drugbox nor chembox should be all-lower or all-caps (and neither is as far as I see). --ἀνυπόδητος (talk) 14:19, 28 November 2010 (UTC)[reply]
Bit of a misunderstanding here. To clarify, in a Chembox a SMILES entry is prefaced with "| SMILES = " in a Drugbox one uses "| smiles = ", if you add an entry in a Drugbox using "| SMILES =" (upper case) it is not recognised as a field in the Drugbox and therefore not displayed. Just try changing the entry in the drugbox and previewing the result. It's not the end of the world that this difference exists. It just that greater uniformity between Chemboxes and Drugboxes might desirable. --The chemistds (talk) 19:22, 28 November 2010 (UTC)[reply]
OK, now I got you. By the way, a lot of parameters have different names in drug- and chembox (CAS_number/CASNo, ATC_prefix/ATCCode_prefix etc). The cleanest solution would probably be merging the two, but such proposals have never led to anything. --ἀνυπόδητος (talk) 08:37, 29 November 2010 (UTC)[reply]

Two points here:

1) InChI. I think I should say 'I have chosen' (we did not discuss this) to remove the 'InChI=' part from the InChI identifier and make the box handle that. ChemBox displays the InChI correctly, and renders it correctly:

<td align="center" colspan="2"><a href="/enwiki/wiki/International_Chemical_Identifier" title="International Chemical Identifier">InChI</a></td>
</tr>
<tr>
<td align="center" colspan="2">
<div class="NavFrame collapsed" style="border:none;padding:0;">
<div class="NavHead" style="font-size:105%; background:transparent;" align="left"> </div>
<div class="NavContent" style="font-size:105%; text-align:left;">InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H</div>
</div>
</td>

And that is what Google will index, so searching on the InChI of benzene should show you this page (it is there, result number 27 in my case; chemspider fills the top positions). Also the internal wikipedia search (due to the format of the parameters) results in the same (except for the 2nd inchi, 'InChI1' etc.). Although recoding the box and letting it being done by the parameter would result in the same.

Reasons for omitting 'inchi=': a) it is being used in a mixed up way, there were more without than with. b) when using the 'inchi=' in the identifier, in the edit-box you see 'InChI=InChI=1/C6H6/c1-2-4-6-5-3-1/h1-6H' .. I have seen cases where not-knowing editors remove one instance of InChI= 'because now the parameter is filled twice, with a reasoning 'that can't be right' (and that breaks the InChI in the rendered text). For me it is fine either way, I'll go on for now adding them without, if the consensus changes, I would consider asking chem_awb to run and replace them, and adapt the code (CheMoBot will keep an eye if they get changed somewhere, unfortunately there are no functions to check if the contents of a parameter starts with 'inchi=', that needs to be done with bot-scripts or similar.

2) Indeed, as Anypodytos says, there are many parameters different between the boxes. A best would be to either generate a merger, or to 'clone' chembox to 'drugbox' (using a different colour scheme e.g.) and move all to the new format (or give all a chembox). But that never has gained much traction. A third option is to make the boxes listen to multiple parameters (we could program it in such way that both 'smiles' and 'SMILES'/ 'CASNo' and 'CAS_number' are giving the proper output in drugboxes and chemboxes.

Hope this helps. --Dirk Beetstra T C 09:36, 29 November 2010 (UTC)[reply]

ad 2) Generally, I'm not very happy with multiple names of params. It only causes confusion to newbies (Um, what's the difference between CASNo and CAS_number? Hey there is a documentation. It's 30 kB long...) and bots (if CASNo in template: cas=CASNo else if CAS_number in template: cas=CAS_number... wait, which name has the higher priority?) A possibility would be to change the param names of, say, drugbox, and have a bot rename the params in the transclusions. --ἀνυπόδητος (talk) 10:02, 29 November 2010 (UTC)[reply]
I agree with that (and I already have that problem with CheMoBot in a way. Which one is the verified one in InChI, InChI1, InChI2 ... for now I chose to ignore those, and verify StdInChI. Rename the whole would be an option (a nice task for chem_awb). --Dirk Beetstra T C 10:07, 29 November 2010 (UTC)[reply]

@Dirk Beetstra - With respect to the formatting of the InChI string in the Wikibox - I understand the issues with the appearance of InChI= twice. And I see that the current approach works as it stands, I guess my point was that the solution seems to be to change the data (in this case the InChI string) and then apply formatting in the Chembox template to make it look like the original data, rather than retaining the integrity of the data and just applying a change to the Chembox template to avoid the inelegant appearance of the the data. There is nothing wrong with the current approach per se, its just that it might cause problems in the future if the data is to be reused (either in the Wikiverse or elsewhere). I thought I'd just point it out.

As for the point you might make about InChI1, InChI2 etc - shouldn't all of these be verified, so long as they also possess an accompanying comment/label? The two obvious use cases I would present are; Amino acids and sugars.

Often the names of the proteogenic Amino acids do not explicitly state any sterochemistry but in many contexts the L-stereochemistry (the naturally occurring biological form) is considered to be implicit - therefore it seems that there should be the CSID and InChI for the racemic compound and the L-stereoisomer (in which case one might as well include the details of the non-natural enantiomer as well, for completeness/comparison). One still needs to have the CSIDs and StdInChIs for both the racemic and the L-enantiomer structures.
With sugars such as D-glucose, you can have the open chain form, alpha and beta pyranose forms, and the alpha and beta furanose forms (nevermind the undefined/mixed anomer forms) which means that there are 5 (or 7) different structures each with their own CSID and StdInChI.

As it stands is it possible to use StdInChI1, StdInChI2, StdInChI1_comment, StdInChIKey1 and StdInChIKey1_comment etc in Chemboxes? I haven't tried yet. If not I'd suggest that they will be necessary - otherwise, there should be some guidance on how to choose which structure should be used to generate the StdInChI in the sort of situations that I describe above. --The chemistds (talk) 00:50, 1 December 2010 (UTC)[reply]

  • Regarding re-use .. as long as it is done here properly, if someone would source Wikipedia and then re-use the InChI's - it is just a matter of adding it again, or using a similar approach. Not that it is our problem, but this saves 6 bytes on every revid :-p
  • Hmm .. did not look at it that way. Maybe it is needed indeed, though one could choose to store one in StdInChI (of the 'main form' or something), the next in InChI, InChI1, etc., and the rest in InChI_Other. But we might want to expand on StdInChI in the end, indeed. --Dirk Beetstra T C 15:08, 6 January 2011 (UTC)[reply]

Validation output violates self-reference guidelines

Please see Wikipedia talk:WikiProject Chemicals/Chembox validation#Infobox additions violate self-reference guidelines. Thanks. Kaldari (talk) 23:26, 6 December 2010 (UTC)[reply]


Hi, I am the Chemical Curator for ChEMBL at the EBI, Hinxton, UK. We would really like to add a ChEMBL ID link to the ChemBox. How would we go about doing this?

Thanks, Louisa Bellis Louisajb (talk) 12:13, 16 December 2010 (UTC)Louisa Bellis 16 Dec 2010Louisajb (talk) 12:13, 16 December 2010 (UTC)[reply]

Well,  Done. Louisajb, as I said on your talkpage, I am interested in a list of these, linked to other identifiers. --Dirk Beetstra T C 15:21, 16 December 2010 (UTC)[reply]

Request for addition: additional hazardous material codes/class diamonds

G'day guys! I'm currently in the process of re-writing the much neglected Hazchem article into something much cleaner, clarified, better referenced and more informative than the old article (which my working version can be found through my user page).

One thing I would like to raise with the project is the possible addition of Hazchem codes, hazard class diamonds (see: dangerous goods) and ADR HIN parameters so that the chembox, so that the chembox has a more worldwide perspective on dangerous goods, in addition to just the US' NFPA 704 diamond. A complete list of Hazchem codes and HIN's for a vast number of hazardous materials (or chemicals) by UN number can be found in the Australian Dangerous Goods Code which is available freely from here so finding Hazchem codes and HIN's isn't a problem. As I come across UN numbered substances, I'd be more than happy to include it's respective Hazchem code, class diamond and HIN.

Choosing a hazard class diamond is a little more difficult, although the ADGC specifies that "Substances (including mixtures and solutions) and articles subject to this Code are assigned to one of nine classes according to the hazard or the most predominant of the hazards they present." (pg. 34 of the ADGC, Vol 1, Part 2). Perhaps this can be added later when a more reliable method of classifying substances becomes available to us, as in a reference-able source.

Considering how the NFPA 704 diamond has been implemented in the chembox, perhaps the number identifying the class (i.e. "class_diamond = 7" which displays the generic radioactive class diamond) allows the easy allocation of class diamonds to materials?

Does anyone else have any thoughts or objections?

Cheers!

DeltaFalcon talk / contribs 06:53, 31 December 2010 (UTC)[reply]

Related link, possibility of a separate "Dangerous Goods" infobox?
DeltaFalcon talk / contribs 08:12, 9 January 2011 (UTC)[reply]

Line wrap problem for long chemical formulas

A problem with a chemical formula in the currect version [4] of Solanine (if you see a "[show]" link in the "InChI" field then click it) was reported at Wikipedia:Help desk#Problems displaying this Wikipedia page in Firefox. In my Firefox (and Opera but not IE or Google Chrome), a long string without certain characters (spaces, slashes, maybe others) doesn't cause line wrap but instead lengthens a line or widens an infobox. The problem here was the parameter (apparently an International Chemical Identifier):

StdInChI = 1S/C45H73NO15/c1-19-6-9-27-20(2)31-28(46(27)16-19)15-26-24-8-7-22-14-23(10-12-44(22,4)25(24)11-13-45(26,31)5)57-43-40(61-41-37(54)35(52)32(49)21(3)56-41)39(34(51)30(18-48)59-43)60-42-38(55)36(53)33(50)29(17-47)58-42/h7,19-21,23-43,47-55H,6,8-18H2,1-5H3/t19-,20+,21-,23?,24+,25-,26-,27+,28-,29+,30+,31-,32-,33+,34-,35+,36-,37+,38+,39-,40+,41+,42-,43+,44-,45-/m0/s1

Above it's written with a leading space so no line wrapping is supposed to occur. Here is the same source line without a leading space:

StdInChI = 1S/C45H73NO15/c1-19-6-9-27-20(2)31-28(46(27)16-19)15-26-24-8-7-22-14-23(10-12-44(22,4)25(24)11-13-45(26,31)5)57-43-40(61-41-37(54)35(52)32(49)21(3)56-41)39(34(51)30(18-48)59-43)60-42-38(55)36(53)33(50)29(17-47)58-42/h7,19-21,23-43,47-55H,6,8-18H2,1-5H3/t19-,20+,21-,23?,24+,25-,26-,27+,28-,29+,30+,31-,32-,33+,34-,35+,36-,37+,38+,39-,40+,41+,42-,43+,44-,45-/m0/s1

In my Firefox and Opera, it only wraps at slashes and this part is displayed on one line going off the right edge of my screen:

c1-19-6-9-27-20(2)31-28(46(27)16-19)15-26-24-8-7-22-14-23(10-12-44(22,4)25(24)11-13-45(26,31)5)57-43-40(61-41-37(54)35(52)32(49)21(3)56-41)39(34(51)30(18-48)59-43)60-42-38(55)36(53)33(50)29(17-47)58-42

Is there a chemical rule requiring such strings to be written without spaces or something else that will allow line wrapping? Even if there is such a rule, I think it's better to break it than to break a page display for readers with common browsers, at least when the result is as bad as the infobox in Solanine. PrimeHunter (talk) 01:45, 28 January 2011 (UTC)[reply]

This is a bit perennial (and goes for the InChI's, SMILES and for some IUPACNames) - It is exactly why there is a show/hide button (standard set to 'hide') - 'breaking' these identifiers gives as a problem that searches (internal and external, both incoming and outgoing) would be 'broken'. It is a common problem, but a simple 'F5' or a click on the 'hide' solves the problem in both cases. The only really sensible solution would be to 'force' the width of the cell to a maximum (hints welcome - I've tried some things but nothing seems to really help), and that the contents then is either 'force-wrapped', or that it gets a horizontal scroll bar below. Except for restricting cell width giving force-wrapping, most are ugly solutions .. It should be noted, that for most people, seeing this value is not of prime importance, but it is important that the values get rendered into the final result of the page, as that is what gets indexed by Google - and also, especially the StdInChI is the identifier to find these compounds by (in different modes), all others are less specific and more error prone than the StdInChI - breaking the full string or similar will make these compounds 'unfindable' - a problem which is less important (though might still be annoying) for SMILES and the full IUPACName. I hope this explains. --Dirk Beetstra T C 08:10, 28 January 2011 (UTC)[reply]
Thanks for the explanation. With JavaScript disabled in Firefox you get http://i.imgur.com/HdPV5.png at Solanine with no hide option. I don't know a good portable solution. PrimeHunter (talk) 13:54, 28 January 2011 (UTC)[reply]
I think we've looked at adding horizontal scrollbar to those long strings. Can't remember if there was a technical impossibility, a rendering mess, we just forgot to deal with it, or actually we never thought of it until now. DMacks (talk) 15:24, 28 January 2011 (UTC)[reply]
(edit conflict)I read the Help desk thread after this one. Sigh. This will affect only a very small number (the relative few people who have Java turned off, and who visit one of the few chemicals/drugs which have an impossibly long and unbreakable InChI/IUPACName/SMILES) of people (I agree, it should not happen at all ..), so I guess that for now we could leave it, but it adds to the (already existing - 'We' are already waiting for a long time to be able to force the (maximum) width of a box to, say, 25% of the pagewidth, something that, AFAIK, can not be done with the code at the moment.) urge of finding a permanent solution. Aargh .. now that we put so much effort in making sure that these chemicals can reliably be found, it is that same key that is breaking things .. --Dirk Beetstra T C 15:29, 28 January 2011 (UTC)[reply]

Duplicate warning

Is it necessary to issue the same warning twice? Once before the main text body and once more inside it. I think only one of these should be used, preferably the one inside the text body. Nutster (talk) 04:11, 13 February 2011 (UTC)[reply]

Ticks and crosses for validation

Just looking at Aspartame and I noticed that there is an unverified change. What particularly drew my attention is that the ticks are (correctly) not linked, but the red cross next to the KEGG entry is linked.

I'd submit an {{editprotected}} request, except I can't work out where the cross actually is in the code. Could someone more familiar with the template locate the cross images (both the one next to the field in question and the one in the footer) and add |link= to the end of the [[Image:]] or [[File:]] call?

Thanks! — OwenBlacker (Talk) 20:40, 17 February 2011 (UTC)[reply]

The difference is in {{Tick}} vs {{Cross}}: exactly as you say, Tick has link= but Cross does not. There does not seem to be any standard for this among the Template:Check mark templates options and I'm not sure what centralized place would even discuss them. DMacks (talk) 21:06, 17 February 2011 (UTC)[reply]
I couldn't quickly locate a place to discuss the general issue and per a nearly-year-old non-responded-to query on Template talk:Cross there doesn't seem to be anyone actively working on them, so I added link= and will watch if anyone complains there. May take a while for that change to propagate up through the levels of templates that create the infobox and eventually regenerate the page with that new behavior. DMacks (talk) 15:30, 19 February 2011 (UTC)[reply]

Need critical point temperature/pressure

That really seriously needs to be an optional parameter.Rememberway (talk) 18:32, 30 March 2011 (UTC)[reply]

"Chembox new"

The documentation page (Template:Chembox/doc) mentions "chembox new" a number of times. Isn't that outdated terminology? --ἀνυπόδητος (talk) 11:14, 4 April 2011 (UTC)[reply]

Probably, and even id it was "new", it's not an appropriate attribution - if we'd tag every new change in Wikipedia as such, then that term would become the tribble of Wikipedia... Mikael Häggström (talk) 16:22, 30 April 2011 (UTC)[reply]
Once upon a time there was {{Chembox}} and {{Chembox new}}. Chembox new was the non-table version of the chembox, while chembox was written as a substituted table. We had I think ~ 30k articles so the changeover was not instantaneous... I'll fix the documentation and search for further instances, but if you see it please let me know. --Rifleman 82 (talk) 02:50, 1 May 2011 (UTC)[reply]

Merging drugbox into chembox

There was an unanimous support from the wp:WikiProject Pharmacology to merge Template:Drugbox into chembox (see Template talk:Drugbox#Advantages of a drugbox/chembox merger). Therefore, I'd like to ask here at the chembox side, is this a good idea? Mikael Häggström (talk) 15:55, 8 May 2011 (UTC)[reply]

Making chemboxes in separate templates

With the WP:STRATEGY of making it easier for newcomers in mind, I propose making chemboxes as separate templates, so that, when pressing an article's edit button (such as that of methanol), a {{Template:(chemname)-chembox}} is shown at the top of an article, followed by a hopefully humanely presented intro text, rather than the daunting wiki-syntax that currently overwhelms the poor editor. (This has been supported for the drugbox at talk:Drugbox#Make separate templates of drugboxes.) Mikael Häggström (talk) 16:16, 8 May 2011 (UTC)[reply]

Policy or guidelines don't allow for links from article to WikiProjects yet this template has one. Can we have it changed? -- Alan Liefting (talk) - 09:30, 18 May 2011 (UTC)[reply]

Has been discussed before .. hardly anything is not allowed (for almost everything WP:IAR applies), leaving it out is not an option (no-one would understand), and unless someone comes up with a proper solution, I do not think that it is replaceable. I'll dig up the earlier discussion now. Thanks! --Dirk Beetstra T C 09:33, 18 May 2011 (UTC)[reply]
Can't find the discussion, sorry. --Dirk Beetstra T C 09:37, 18 May 2011 (UTC)[reply]
Wikipedia talk:WikiProject Chemicals/Chembox validation#Infobox additions violate self-reference guidelines I think? DMacks (talk) 12:54, 18 May 2011 (UTC)[reply]

JMol structure problem: multicomponent compounds

It appears the external system that does the JMol 3D images (based on infobox SMILES= parameter) does not work correctly for multicomponent compounds that have specific geometric relationships for the components. For example, ferrocene and chromocene are rendered with the two Cp rings and the metal atom all coplanar rather than the actual positions and orientations of the sandwich compound. That makes sense, because SMILES is only connective data for individual components, not geometric relationships among separate components. So we need a field that can provide additional/alternative data to feed to the JMol engine (or if that cannot be done easily, a field to cause the infobox to suppress the JMol field). DMacks (talk) 17:23, 17 September 2011 (UTC)[reply]

Too long! Too long! Too long!

The chembox for the caffeine article is absurdly, ridiculously long. I would like to move a lot of the information, such as the Identifiers, Properties, Hazards, and multiple pictures, onto a separate data page, but as far as I can see the template provides no support for doing so. Is there any reasonable way of handling this sort of problem? Looie496 (talk) 21:11, 23 September 2011 (UTC)[reply]

Notice: The user just removed lots of important information from the chembox without waiting for an answer. I restored it. There is certainly no need to hurry here. --Leyo 07:20, 24 September 2011 (UTC)[reply]
Was not removed just split and placed lower in the article.--Doc James (talk · contribs · email) 11:23, 24 September 2011 (UTC)[reply]

Merging drugbox into chembox: take 2

The section immediately above and the discussions here and here illustrates a general problem that we are facing in articles where the subject is both notable as a drug and as a chemical. One potential solution is to (1) merge the {{drugbox}} into the {{chembox}}, (2) make various sections of the merged infobox optionally collapsible, and (3) provide some flexibility in the order that sections are displayed (e.g., current order for chemicals that are not drugs but clinical section near the top for chemicals that are drugs). There is consensus from WP:PHARMA for this merger. Finally while we are at it, it would be good if the chembox could be updated to use the more modern {{infobox}} system which offers a cleaner, less clutter syntax and a built in mechanism for special purpose templates (where each chemical would have a separate page for its chemical template that is transcluded back into the chemical article as proposed here). I realize that implementing this proposal will require a substantial effort, but I think the long term benefits justify the effort. Is there support from WP:Chem for such an undertaking? Boghog (talk) 03:07, 26 September 2011 (UTC)[reply]

We could also merge the chembox into the drugbox for drugs that are both chemicals and drugs. Usually most people are more interested in the drug properties than the chemical properties. Collapsibility is definitely needed. Else it screws up the formating of the rest of the article.Doc James (talk · contribs · email) 03:43, 26 September 2011 (UTC)[reply]
Point (3), the order of sections, is already configurable in the chembox. We'd only need to add the recommended order for drugs to the documentation.
Collapsibility is a good idea. The chembox has also got the possibility to move information to a data sheet (a subpage of the article), though I've never really understood how to do this. --ἀνυπόδητος (talk) 08:41, 26 September 2011 (UTC)[reply]
I think that most chemists would be agreeable to a merger. The boxes can be quite long, but they are fairly unobtrusive and if various sections were made collapsable, so much the better. One reason to merge these boxes is to reinforce the unity of molecular sciences, all drugs are organic compounds and all organic compounds have biological effects.--Smokefoot (talk) 12:24, 26 September 2011 (UTC)[reply]
Is the suggestion to merge them completely for all pages or just for article that have both chemical and pharmaceutical uses.Doc James (talk · contribs · email) 12:52, 26 September 2011 (UTC)[reply]
Many chemicals with pharmaceutical uses already use the new chembox. As do chemicals which can be used as explosives, e.g. nitroglycerin. I think the issue is for drugbox to be merged with chembox, something which we have supported when polled, but have never implemented. --Rifleman 82 (talk) 15:16, 26 September 2011 (UTC)[reply]
The idea is to add all of the drugbox's fields to the chembox as far as they are missing (like the monoclonal antibody fields) and then delete/redirect the drugbox. This would give a unified appearance, and it would put an end to differently named fields (eg. ATCCode_prefix in chembox vs. ATC_prefix in drugbox). Of course, not all chemicals would show all drugbox fields, as empty fields are hidden anyway. --ἀνυπόδητος (talk) 15:20, 26 September 2011 (UTC)[reply]
Can someone create what this would look like for say the medication lisinopril so that they can be compared? Doc James (talk · contribs · email) 12:22, 27 September 2011 (UTC)[reply]

(outdent) Template talk:Drugbox/Archive 7#Single chemical drugs provides an example for policosanol with a chembox. However, if the chembox would be redesigned to use {{infobox}} as Boghog proposed above, it would probably look more loke the present drugbox. --ἀνυπόδητος (talk) 09:04, 28 September 2011 (UTC)[reply]

This example is missing the "clinical data" section... Doc James (talk · contribs · email) 10:33, 28 September 2011 (UTC)[reply]
That's because the chembox doesn't have such a section yet. And that's why I wrote "The idea is to add all of the drugbox's fields to the chembox as far as they are missing" above. The Clinical data section will look just like all other sections except that it will have "Clinical data" written on top. --ἀνυπόδητος (talk) 11:58, 28 September 2011 (UTC)[reply]
What is the status of this proposal to merge Chem and Drug boxes, it's over a month since there was any discussion about taking this further (apologies if the discussion has continued elsewhere and I haven't seen it. --The chemistds (talk) 14:44, 18 November 2011 (UTC)[reply]

Prototype merged chem/drug box

A prototype merged chem/drug box based on the {{infobox}} system has been written ({{Chembox Drug/sandbox}}) and one example can be seen here (left right-side testcase). In common with the current chembox, the order to the sections can been changed. What is new is that each of the sections has an optional "State" parameter that can be set to "collapsed" or "expanded". In addition, an "path" parameter may be added that supports special purpose transcluded templates (see the "v ·· e" links at the bottom of the example). At the moment the IUPAC Name and a short Chemical Properties sections are hard wired to appear at the beginning of the infobox in an expanded state. Please note that this is very much a prototype template and there is a great deal of more work needed to handle special cases, debugging, and most importantly making sure that a majority of both the Chemical and Pharmacology Project members are happy with the template. Boghog (talk) 11:26, 2 October 2011 (UTC)[reply]

Can we move the clinical data after the IUPAC name? Otherwise looks good. Doc James (talk · contribs · email) 12:22, 2 October 2011 (UTC)[reply]
The clinical data is after the IUPAC name. Were you actually suggesting the opposite? I think it is very reasonable to place the IUPAC name right after the chemical structure these are closely linked. At the same time, there may be cases where including an IUPAC name may not be appropriate (e.g., biologics). I have therefore converted the hard wired "IUPAC name" and "Chemical data" sections to sections that are now optional and can be moved up or down if desired. Boghog (talk) 18:09, 2 October 2011 (UTC)[reply]
It looks to me like it is after the chemical data rather than the IUPAC name... --Doc James (talk · contribs · email) 20:28, 2 October 2011 (UTC)[reply]
OK, I see you meant moving the clinical data directly after the IUPAC name. In the latest implementation of the template, all the sections are optional and can be moved up or down as desired (see for example Template:Chembox_Drug/testcases, top right vs. bottom right). In addition, there is now a "IUPAC name" (see top right testcase) and "chemical summary" (see bottom right testcase) sections. Both contain the IUPAC name. The intention is that one or other can be used, but normally not both in the same infobox. Again, the idea behind "chemical summary" section is to summarize the most basic information that is contained in the "chemical data" section if the later section is collapsed. If the "chemical data" section is not collapsed, then there would be no reason to include the "chemical summary" section. Boghog (talk) 04:59, 3 October 2011 (UTC)[reply]
I suppose you mean the right-hand side? Yes, that looks good to me. When other people are happy with it, I suggest we collect a list of differences between drugbox and chembox that will have to be considered before the actual merger is done. --ἀνυπόδητος (talk) 13:09, 2 October 2011 (UTC)[reply]
Sorry, you are right. I meant right-hand side. Also good suggestion concerning compiling a list of differences. These differences could be divided into aesthetics (e.g., borders in chembox vs no borders in drugbox), parameter names, displayed names, external links, etc. In addition, there is some duplication of parameters between the sections, some of which in unavoidable since not all sections will be included in all infoboxes. Boghog (talk) 06:06, 3 October 2011 (UTC)[reply]

Are you going to merge the Chemical data and Properties sections? At the moment, formula and mass occur twice. The caption "Chemical data" would be better in my opinion because it is more specific, and because (for drugs) it nicely matches "Clinical data" and "Pharmacokinetic data". --ἀνυπόδητος (talk) 18:19, 2 October 2011 (UTC)[reply]

I was not planning on merging these two sections. I created the Chemical Data section in response to Rifleman's concern above that if the properties section were collapased, then a certain amount of basic chemical data (i.e., "vital stats") should be displayed. Perhaps conditional code could be added to the template so that if the chemical properties section were included, the display of the formula and mass in the properties section would be suppressed. Boghog (talk) 18:34, 2 October 2011 (UTC)[reply]
So is the proposal than to use the second one for substances that are primarily medications/recreational drugs and use the 4th one for substances that are primarily chemical substances?Doc James (talk · contribs · email) 20:55, 7 October 2011 (UTC)[reply]
Yes, that is basically what I had in mind. In order to be acceptable to both projects, I think some flexibility in the template will be required. Boghog (talk) 21:15, 7 October 2011 (UTC)[reply]

LD50

Should the LD50 be included in the chembox? Whoop whoop pull up Bitching Betty | Averted crashes 22:07, 30 September 2011 (UTC)[reply]

It's already included in the {{Chembox_Hazards}} module. --Rifleman 82 (talk) 23:04, 30 September 2011 (UTC)[reply]
Thanks. Whoop whoop pull up Bitching Betty | Averted crashes 03:01, 1 October 2011 (UTC)[reply]

Viscocity?

Would it make sense to add a field to the properties section for listing the dynamic viscosity of the chemical at a specific temperature? Regards, RJH (talk) 15:02, 13 October 2011 (UTC)[reply]

'Viscosity' is there .. --Dirk Beetstra T C 15:18, 13 October 2011 (UTC)[reply]

{{chembox}} doesn't reflect topmost name in {{DISPLAYTITLE:}}

Is there a way to make the {{chembox}} template check for the {{DISPLAYTITLE:}} template's name in the body of the article for the article title? That is, before the chembox template automatically uses the article name itself? Many chemicals have italicized lettering for cis/trans etc., which would be more proper of the heading box in chembox, using as it does the chemical name for the molecule in question. Nagelfar (talk) 20:36, 16 November 2011 (UTC)[reply]

How much info to display?

What's the general philosophy on how much information to display in the chembox? I ask because for the article psilocybin, another user recently expanded the chembox to now include physical data that I cannot easily verify, and which isn't mentioned in the article text itself (like boiling point, log P, acidity, basicity and others). I don't know whether to trim some of this info, or leave it in under the assumption that it might be useful to someone sometime. If there is info in the chembox not in the text, should this also be cited inline? Sasata (talk) 19:29, 29 November 2011 (UTC)[reply]

Use en dash instead of hyphen for temperature ranges

It has been more than a year since a similar error was reported in the section "Use minuses instead of hyphens for negative values", and nothing has been done to fix the Chembox properties template. A similar error is that a hyphen is used instead of an en dash to indicate a range of temperatures when values are provided for MeltingPtFL and MeltingPtFH or BoilingPtFL and BoilingPtFH, or if the temperatures are given in K or °C. I could give it a shot, but if you think that would probably work out well, you really shouldn't be using nitrous oxide and working in Wikipedia at the same time. Chris the speller yack 02:31, 11 December 2011 (UTC)[reply]

Use of Crystallography Open Database (COD) numbers in Chemboxes?

Would the Wikpedia community be interested add reference to the Crystallography open database (COD,http://www.crystallography.net)? Data in COD come from peer-reviewed scientific press, the database is free (as in freedom), and we offer persistent URIs to link to HTML pages or CIF format files (like http://www.crystallography.net/7050897.html for Aspirin or http://www.crystallography.net/2001546.html for Ibuprofen). The COD number (uniquely assigned persistent identifier) could be quoted in Chembox, linking to the appropriate crystal structure HTML page or file. Saulius Gražulis, grazulis at ibt dot lt, 158.129.151.7 (talk) 15:23, 10 January 2012 (UTC)[reply]