Template talk:Chembox/Archive 7
This is an archive of past discussions about Template:Chembox. Do not edit the contents of this page. If you wish to start a new discussion or revive an old one, please do so on the current talk page. |
Archive 1 | ← | Archive 5 | Archive 6 | Archive 7 | Archive 8 | Archive 9 | Archive 10 |
Some changes to {{chembox new}}
After a discussion on IRC I see that some things in the {{chembox new}} have to be changed, especially regarding the identifiers and probably everything with a unit. I set up a workshop here: Wikipedia:Chemical_infobox/Workshop, feel free to add and/or comment there, or on the talkpage. --Dirk Beetstra T C 16:42, 16 January 2008 (UTC)
Problem- "hover" on image displays image name rather than description
I have just noticed that where we have "ImageName" in the chem box, hover (cursor over image and wait!) on the image displays the literal "ImageFile" rather than "ImageName". Sulfur hexafluoride is an example.Axiosaurus (talk) 11:05, 19 January 2008 (UTC)
- The above was recorded using Firefox- in IE7 hover on image gives no display.--Axiosaurus (talk) 09:05, 21 January 2008 (UTC)
- Thanks for noting this. I made some changes, I now did include the caption parameter in the fields. Could you have another look, I am using Opera/popups, which result in me not seeing a caption at all. It may just not work this way, though. --Dirk Beetstra T C 09:30, 21 January 2008 (UTC)
- In Firefox now get {{{Name}}}. In IE7 still get nothing--Axiosaurus (talk) 10:49, 21 January 2008 (UTC)
- That is curious .. getting closer, apparently .. I'll have a second look later. Thanks! --Dirk Beetstra T C 10:53, 21 January 2008 (UTC)
- Now works OK in Firefox- including for left and right images! Well done! --however IE7 -still nothing displays.--Axiosaurus (talk) 17:02, 21 January 2008 (UTC)
- Oh yeah, I repaired that as well .. :-) .. typo in one of the parameters. That it does not work in IE may be a problem with IE's interpretation. I also played with the width of the box, but it seems I can not force the width to a certain width, only to a minimum width. Still have to try some things there. --Dirk Beetstra T C 18:29, 21 January 2008 (UTC)
Dielectric constant - can't find it and too ignorant to add it!
Trying to replace silver bromide chembox. Dielectric constant is quoted --only field I cannot find a sensible home for. Help! Don't know what I am doing enough to add it. --Axiosaurus (talk) 19:29, 22 January 2008 (UTC)
- Modernists call this relative static permittivity - if it isn't lurking somewhere where I can't find it then I think we need to decide a) whether to add it and then b) what we call itAxiosaurus (talk) 11:56, 23 January 2008 (UTC)--Axiosaurus (talk) 11:56, 23 January 2008 (UTC)
- Hi Axio, thanks for your great help with the hand-coding! I'm sorry I've not been able to help much, due to my day job. But next week I'll be much more free and I'll help you clear the remainder of the list!
- With regard to the dielectric constant - if it doesn't seem to fit any of the fields, just leave it in the <!-- --> . --Rifleman 82 (talk) 14:15, 23 January 2008 (UTC)
- Done.--Axiosaurus (talk) 18:28, 23 January 2008 (UTC)
- It should be included in the "Properties" module, along with the temperature for which we quote it (many important solvents hve large chenges of dielectric constant with temperature). Physchim62 (talk) 16:11, 27 January 2008 (UTC)
- I had a related problem a few days ago. We need custom fields for which we can define the place, the title string, and the content. Please could somebody implement and documentat this. Thanks, Сасусlе 16:31, 27 January 2008 (UTC)
Request for test
Could someone add the field InChIKey
to {{Chembox Identifiers}}? It should fit with {{Chembox InChIKey}}, which is needed as a (short and minor) test on the presentation of InChIs. Physchim62 (talk) 16:14, 27 January 2008 (UTC)
Molecular formula
Please edit the template to say "Formula" or "Chemical formula" instead of "Molecular formula". Many substances are not molecules, as has been mentioned before. I'd be bold and do it but the page is protected. --Itub (talk) 10:32, 19 February 2008 (UTC)
The SMILES field does not show up at all when a user has JavaScript disabled. It should show the whole formula when JavaScript is disabled. AJRobbins (talk) 15:20, 6 October 2008 (UTC)
Class="infobox"
Would there be any objections to switching Template:Chembox new to use class="infobox"? --MZMcBride (talk) 16:43, 22 February 2008 (UTC)
- What happens when you do that? --Rifleman 82 (talk) 17:41, 22 February 2008 (UTC)
- It would change it to be more consistent with other infoboxes. See example code. --MZMcBride (talk) 19:15, 22 February 2008 (UTC)
- Are you talking about aesthetic changes - a white border around each box? Does it solve the bunched-up [edit] tags? Is it possible for you to pick a real article, say hydrochloric acid and do your thing on your sandbox? I was talking to the other wikichem editors on #wikichem, and we're not quite familiar with what you hope to achieve. --Rifleman 82 (talk) 19:46, 22 February 2008 (UTC)
- It would change it to be more consistent with other infoboxes. See example code. --MZMcBride (talk) 19:15, 22 February 2008 (UTC)
The code is here (from MediaWiki:Common.css):
.infobox { border: 1px solid #aaa; background-color: #f9f9f9; color: black; margin-bottom: 0.5em; margin-left: 1em; padding: 0.2em; float: right; clear: right; }
The current class is "toccolours", which only works in monobook skins: there is also a great deal of specified style at the top of {{chembox new}}, some of which would become unnecessary if we changed css-styles. Physchim62 (talk) 14:16, 24 February 2008 (UTC)
Word wrap
Is there any way to change the size of the chembox, so that the maximum width is the size of the picture. In a lot of cases the smiles and IUPAC name are bigger than the image and the article itself is squeezed to the left. -- Panoramix303 (talk) 12:51, 8 March 2008 (UTC)
- Up till now we have not been able to do that. It would indeed be great if we could set either a width for the box, or force it in another way. --Dirk Beetstra T C 14:54, 16 March 2008 (UTC)
- This seems to be a browser problem… fixing the box width works well for some browsers but not for others. This has been a problem for a long time, and we are trying to find fixes for it. Physchim62 (talk) 16:31, 19 March 2008 (UTC)
Agreed, I've run into a similar problem where IUPAC names are so large they run off the page. Such coding would be helpful in preventing this. --Rkitko (talk) 20:46, 24 March 2008 (UTC)
Interwiki additions
Interwiki [[fi:Malline:Yhdiste]]
should be added to Template:Chembox new. Ty, George Esayas (talk) 14:45, 16 March 2008 (UTC)
- Done. Thanks! --Dirk Beetstra T C 14:53, 16 March 2008 (UTC)
Example of SolubleOther
Does anyone have a good example of how the `SolubleOther` field is used? « D. Trebbien (talk) 20:25 2008 March 16 (UTC)
- Benzoic acid « D. Trebbien (talk) 20:35 2008 March 16 (UTC)
Sources
It seems, in accordance with WP:Verifiability, that chemical infoboxes should have a clear set of citations for data. There's a link saying "disclaimer and references" at the bottom, leading to Wikipedia:Chemical infobox, but that leaves a little to be desired. There aren't any proper citations, and it's a Wikipedia: namespace page, which means it isn't treated as a proper article. I wonder if anything could be done about this to improve the appearance of verifiability. Maybe if the "disclaimer and references" link was split into two links:
- Help for editors, which could go to this page, and
- A hidden box that says [show] which would expand into a list of references. Or maybe if the template itself had an option to include some standard <ref> entries (with template syntax you could include which source the info came from). I know it's mostly considered "common knowledge" but when you have so much numeric data it's good form to have a source listed. —Werson (talk) 00:16, 31 March 2008 (UTC)
- I agree that we need to include citations for data in the infoboxes - I try to add it whenever I can. There is a field for a reference (see arabitol, for example), which can be used if there is a single source for the data in the infobox. If there are citations for data in specific fields, usually a normal reference can be added right after the data - most fields will accept text. -- Ed (Edgar181) 11:51, 31 March 2008 (UTC)
- That works! —Werson (talk) 18:07, 31 March 2008 (UTC)
Approximate melting / boiling points
I note that the chembox doesn't correctly handle cases where a melting or boiling point is entered as a range to indicate that the exact value is uncertain (see for example the article on Hexachlorobutadiene. Looking at the calculated values for kelvins, it seems that the range is being interpreted as a subtraction sum as the m.p. kelvin figure given corresponds to +5 degrees C. The Fahrenheit figure is even further out.
Can we enhance the infobox to cope with this ? An alternative would be to have a flag somewhere indicating that the figure is approximate - thoughts anyone? Kiwi137 (talk) 13:26, 28 April 2008 (UTC)
- It can, in these cases not MeltingPtC/BoilingPtC should be used, but the plain MeltingPt and BoilingPt, these just display the value given. The MeltingPt(C,K,F)/BoilingPt(C,K,F) have as an advantage to show all three values, and are 'searchable'. Optimal would be having MeltingPt and BoilingPt without unit, and a MeltingPtUnit/BoilingPtUnit, which could take the values K, F, C or empty. But that would also need a rework of all so many thousand chembox new transcluding pages. Hope this explains. --Dirk Beetstra T C 13:31, 28 April 2008 (UTC)
- Talk:Cyclohexanone is my standard reference to explain why this is not quite as easy as it seems! Physchim62 (talk) 15:57, 28 April 2008 (UTC)
- Hmm, yes, I see what you mean. Thanks for the explanation Dirk, and for fixing the Hexachlorobutadiene entry. --Kiwi137 (talk) 11:29, 30 April 2008 (UTC)
- Talk:Cyclohexanone is my standard reference to explain why this is not quite as easy as it seems! Physchim62 (talk) 15:57, 28 April 2008 (UTC)
Suggestion: Add UN number
Has the addition of UN numbers to the "Identifiers" section of the template been discussed?
It is an important chemical numbering scheme, used world-wide in the context of dangerous goods transportation. RickJP (talk) 10:56, 21 May 2008 (UTC)
- Done, could you please test it for real, templates are always a bit slow to update. The formatting for the number-line is in {{Chembox UNNumber}}. Thanks! --Dirk Beetstra T C 11:24, 21 May 2008 (UTC)
- Great! Tried on Propane and it works. RickJP (talk) 20:30, 22 May 2008 (UTC)
Suggestion: Add ChemSpiderID
During the WP:Chem team IRC Chat this past week a discussion regarding the potential to add a ChemSpider ID to the Chembox to accompany the PubChem, Drugbank and eMolecules links. The WP:Chem team members on the IRC Chat supported the inclusion based on the nature of additional data, content and functionality now available on ChemSPider. --ChemSpiderMan (talk) 01:05, 22 May 2008 (UTC)
- I don't have a problem with adding that, just a bit worried about 'table creep' .. are other organisations also wanting a link then? --Dirk Beetstra T C 10:59, 22 May 2008 (UTC)
- I'll create the field and the template {{Chembox ChemSpiderID}}, I am not putting an external link yet, would like to have more on-wiki discussion for that. --Dirk Beetstra T C 11:02, 22 May 2008 (UTC)
- Fieldname: ChemSpiderID, feel free to make {{Chembox ChemSpiderID}} more clear, and to test the template somewhere. --Dirk Beetstra T C 11:05, 22 May 2008 (UTC)
- Many of these keys to external indices could be solved in a unified way along with the "long InChI breaks the box" problem using either the persondata or secondary-chemical-page ideas we've discussed lately. They would provide a way to have these strings available to search and (optionally) visible in WP articles, but could remove them from the main Infobox. DMacks (talk) 15:46, 22 May 2008 (UTC)
- Have you thought about something like Template:GNF Protein box? For an example of how this could work, go to ADAM9, then look at the "Gene Ontology" section, and click "Show". --Arcadian (talk) 20:02, 22 May 2008 (UTC)
I'd like to revisit this issue. Due to ChemSpiderMan's active involvement here, it might not have been appropriate to have started listing chemspider IDs when chemspider just started. *However*, things have changed. The German Wiki has seen fit to use ChemSpider as a reliable source for physical properties (e.g. http://de.wikipedia.org/wiki/Sorbitanfetts%C3%A4ureester), and PubChem now links to ChemSpider (e.g. http://pubchem.ncbi.nlm.nih.gov/summary/summary.cgi?cid=9690109). Table creep notwithstanding, I think we are ready to include ChemSpider IDs in the chemboxes, and have them link directly to ChemSpider. I'm going to be bold and create the link out - since no articles are affected at present, it makes no difference. But I hope you guys do give feedback, and perhaps we can enable it in our articles. --Rifleman 82 (talk) 18:06, 22 July 2008 (UTC)
- I want to emphasize that de-WP uses ChemSpider in a few occasions inside ref-tags, but not as a parameter in the chemical infobox. There, ref-tags are used much more than it is done here (it is inteded to use ref-tags for all non-trivial data). --Leyo 21:33, 22 July 2008 (UTC)
MeltingPtC
There's a problem with using the MeltingPtC entry: it doesn't work if you use a proper minus sign (−), i.e. it requires a hyphen-minus (-), which is not as good.
Ben (talk) 01:04, 8 June 2008 (UTC)
Disclaimer removed from infobox
I've removed the disclaimer reference in the infobox and renamed the section on this page to reflect the reasoning of the guideline against disclaimers in articles. All site content is already covered by the general disclaimer linked from the bottom of every page.--chaser - t 18:43, 1 August 2008 (UTC)
ChemspiderIDs in drugboxes
Anyone have any problem with adding the ChemspiderID to entries that have drugboxes as opposed to chemboxes? I'm looking to link the entire wikipedia collection to Chemspider, and it seems a large portion of the wikipedia chemical entries are drugs and so have a drugbox, not a chembox. Casforty (talk) 04:26, 21 August 2008 (UTC)
- That should be discussed over at WT:PHARM - they have jurisdiction over the drugboxes. I don't know if they will be as familiar with ChemSpider as the chemists are. Walkerma (talk) 04:49, 21 August 2008 (UTC)
Chembox for NatOrganic and LabChemicals?
Is there any consensus as to whether infoboxes like NatOrganic or LabChemical will be taken under the general Chemical infobox? I occasionally see these kinds of infoboxes, but don't know why they are differentiated from other chemicals. It also seems that a lot of inorganics don't have infoboxes, is that just my perception? Casforty (talk) 02:11, 16 September 2008 (UTC)
- For the sake of consistency, any chemicals articles that use an infobox other than {{Chembox new}} or {{drugbox}} should be converted over to one of those two. -- Ed (Edgar181) 10:40, 16 September 2008 (UTC)
- I actually thought that we already did those, but if you find some which did not get converted, we'd be grateful to know. That also goes for inorganics without chembox, if you encounter them, it would be nice if you could list/tag them somewhere/somehow! Thanks! --Dirk Beetstra T C 11:13, 16 September 2008 (UTC)
- Whenever I encounter articles that use an older infobox, I make an effort to convert them over to {{Chembox new}}. But there are still some that use {{NatOrganicBox}}, {{OrganicBox small}}, {{OrganicBox complete}}, and {{Infobox Explosive}}. (I can't find one named "LabChemical".) They will all get converted eventually, or maybe we could make an organized effort and get them done quickly. Using the "What links here" link for those four templates shows that there are a few dozen at most that use them. There may be some other non-transcluded ones out there too. And of course, many newer chemicals articles have no infobox at all - but dealing with that is an always ongoing job.-- Ed (Edgar181) 12:02, 16 September 2008 (UTC)
- There are also a few ions which have a chembox, which IMHO should be removed. --Rifleman 82 (talk) 05:16, 19 September 2008 (UTC)
- Whenever I encounter articles that use an older infobox, I make an effort to convert them over to {{Chembox new}}. But there are still some that use {{NatOrganicBox}}, {{OrganicBox small}}, {{OrganicBox complete}}, and {{Infobox Explosive}}. (I can't find one named "LabChemical".) They will all get converted eventually, or maybe we could make an organized effort and get them done quickly. Using the "What links here" link for those four templates shows that there are a few dozen at most that use them. There may be some other non-transcluded ones out there too. And of course, many newer chemicals articles have no infobox at all - but dealing with that is an always ongoing job.-- Ed (Edgar181) 12:02, 16 September 2008 (UTC)
Dirk, if there is a place where you want me to list them so they can be converted I will gladly do so. Should I just compile a list of names? Casforty (talk) 04:25, 19 September 2008 (UTC)
- Cas40, if you can be so kind to compile a list, that would be wonderful. You can dump it here, or in WP:Chemical infobox/Unconverted if you prefer. If you have the time, you can quickly generate chemboxes using Diberri's tool in conjunction with a PubChem CID. I can help handcode the rest, of course. --Rifleman 82 (talk) 05:18, 19 September 2008 (UTC)
- I started the list with articles that currently transclude the templates noted above. -- Ed (Edgar181) 22:50, 22 September 2008 (UTC)
- Cas40, if you can be so kind to compile a list, that would be wonderful. You can dump it here, or in WP:Chemical infobox/Unconverted if you prefer. If you have the time, you can quickly generate chemboxes using Diberri's tool in conjunction with a PubChem CID. I can help handcode the rest, of course. --Rifleman 82 (talk) 05:18, 19 September 2008 (UTC)
MeSHName field broken for terms with blank
The MeSHName field is broken for valid terms containing blanks, see the box to the right, the MeSH field is:
| MeSHName = melamine cyanurate
Can somebody fix this? Cacycle (talk) 22:04, 27 September 2008 (UTC)
{{chembox new | Section1 = {{Chembox Identifiers | MeSHName = melamine cyanurate }} }}
- I usually see words joined with "+" signs in mesh names? --Rifleman 82 (talk) 02:50, 28 September 2008 (UTC)
Final deprecation of old chembox
{{Chembox}} is now a redirect to {{chembox new}}. The older version of the chembox can be found at {{chembox old}}, but should no longer be used on articles. Please don't do a massive conversion of the wikimarkup yet – we can do a bot run, but we need to check the IRC bot first. Physchim62 (talk) 09:10, 6 October 2008 (UTC)
- The IRC bot has passed its first tests, steady conversion of wikimarkup can begin
Automatic formulae in the short version
This edit (and experimentation) shows that the automatic formulae and molar masses don't work in the short version of the chembox (without modules). To fix the problem that Geni was referring to, see this edit (easier to give an example than to spell it out!) Physchim62 (talk) 22:43, 8 October 2008 (UTC)
- Is there really a short version of the infobox without modules? Beetstra told me essentially the opposite yesterday--that only very few fields such as the name are supposed to be used outside the modules, even though some other fields are still accepted for historical reasons. In fact, he asked me if I could make a list of the boxes that use these "deprecated" fields. See User talk:Beetstra#Chemical_data_revisited. --Itub (talk) 04:58, 9 October 2008 (UTC)
- Hmm, there used to be one, but maybe it got "deprecated" when we introduced the Identifiers module. Physchim62 (talk) 05:51, 9 October 2008 (UTC)
Minus sign problems
Not only does the input not work properly if you use a minus sign (−) in the template, as pointed out by Ben above, still probably unfixed, but furthermore, the output should be fixed so that it does use proper minus signs in the displayed results after conversions. Can somebody please fix that? Gene Nygaard (talk) 07:47, 19 November 2008 (UTC)
- I don't know if it is even possible for the Wikipedia templating system to handle typographic minus signs in the mathematical expressions used for unit conversion (as far as I remember the string-handling functions that would be required don't even exist). My suggestion: get rid of all the "magic" and let individual editors worry about using most appropriate units and characters and add conversions by hand if really necessary. In most cases, we don't need to list the melting points in three different units IMHO. --Itub (talk) 08:44, 19 November 2008 (UTC)
- The {{convert}} template manages to do that (only for the output part, doesn't attempt to handle the input, I don't think). Maybe you could use it in this template, or go to Template talk:convert and ask for some help. I don't know how it does it, because that is such an overwhelmingly complex template that only one person can edit it.
- Example: {{convert|111|K|°F}} gives 111 K (−260 °F)
- It might also handle two converted outputs at once; yes, it will, e.g. −111 °C (162 K; −168 °F) but I don't know where to find the documentation about how to use that feature, and it would probably have to be tweaked if you wanted to get it in the same format used here now.
- Gene Nygaard (talk) 14:20, 19 November 2008 (UTC)
- I see. Actually it turns out that the Wikipedia template processor can read the typographic minus signs in expressions and treat them like the "regular" minus sign (the hyphen-minus); in a sense MeltingPtC does work (according to my tests), but it prints out a hyphen-minus with the converted value. Now I seem to remember reading somewhere that Wikimedia was recently patched to treat the minus sign like a hyphen minus in expressions. For output purposes, {{convert}} seems to test if a value is less than zero, and if so it presents it using {{Convert/-1}}, which basically prints the typographic minus sign followed by the negative of the number (which, since the number was negative to start with, is its absolute value). So, the problem is fixable after all, with some template hacking (and an administrator willing to edit the necessary protected templates). --Itub (talk) 14:46, 19 November 2008 (UTC)
- I think the relevant bug report is this one: https://bugzilla.wikimedia.org/show_bug.cgi?id=15349 --Itub (talk) 14:52, 19 November 2008 (UTC)
Correct link to IUPAC nomenclature
"IUPAC name" should link to "IUPAC nomenclature" and not "International Union of Pure and Applied Chemistry nomenclature" as it currently does.
- Indeed, agree entirely. Physchim62 (talk) 19:28, 18 December 2008 (UTC)
WHMIS
I think that it would be a good idea to add the Canadian format for hazard materials which is described by the Workplace Hazardous Materials Information System (WHMIS) WHMIS has its own design of logos which vary slightly from the US and European classification system. Could such a parameter be added. Arturkjakub (talk) 21:35, 9 January 2009 (UTC)
- I think it would probably be better to move to the Globally Harmonized System (GHS), as Canada is planning to do in the next year or two. However it's a big job, and there are still plenty of details to sort out. Physchim62 (talk) 11:13, 10 January 2009 (UTC)
LipidBank
{{editprotected}}
Can someone add an optional field for lipidbank.jp identifiers? As far as I can tell there's no more specific template to add this to. It should be straighforward since the id goes at the end of the url, e.g. http://lipidbank.jp/cgi-bin/detail.cgi?id=BBA0024. Thanks, Xasodfuih (talk) 21:55, 15 January 2009 (UTC)
- Support Seems like a useful data resource: more info here. Physchim62 (talk) 22:47, 15 January 2009 (UTC)
- This page isn't protected, go ahead and add it. Stifle (talk) 15:05, 16 January 2009 (UTC)
- No, but Template:Chembox new is protected, and its talk page redirects here. Xasodfuih (talk) 15:57, 16 January 2009 (UTC)
- The requested edit requires a modification to {{Chembox Identifiers}}, but such requests are centralised here. I will try to get an admin who knows the chembox to look at the revision shortly. Physchim62 (talk) 17:20, 16 January 2009 (UTC)
Request to fix a bug (or a help question)
I couldn't set the formula Si3N4 in the infobox of the respective article. It keeps sorting out elements by number, i.e. N4Si3. Any help ? Thank you. NIMSoffice (talk) 00:07, 7 February 2009 (UTC)
Request for new parameters
Could we please add the following parameters to {{Chembox Hazards}}:
GHSPictograms
GHSSignalWord
HPhrases
PPhrases
The corresponding templates already exist, and are intended to allow us to implement the Globally Harmonized System of Classification and Labelling of Chemicals (GHS). For the time being, these parameters should not be used by editors if we already have an EU classification, but can be used if there is no EU classification but a reliable GHS classification (eg, monomethylhydrazine). The EU classifications are being phased out under the CLP Regulation, but we have until December 2010 to figure out how to do a large-scale changeover! I am working on more complete documentation, both for editors and for users. Physchim62 (talk) 11:24, 2 April 2009 (UTC)
- The necessary code is at {{Chembox Hazards/Sandbox}}. Physchim62 (talk) 12:46, 8 April 2009 (UTC)
Links to CommonChemistry.org
As many of you will be aware, CAS is currently beta-testing their new site http://www.commonchemistry.org which contains the CAS Registry Numbers we have been using to verify the chemboxes. As a quick fix, the CAS number field in the chembox was modified so that all CAS numbers link to the new site: however, not all of our CAS numbers have entries at commonchemistry.org! A better solution would be if we only linked those CAS numbers which have been verified against the CAS list. The required code for {{Chembox Identifiers}} and {{Chembox CASNo}} is at {{Chembox Identifiers/Sandbox}} and {{Chembox CASNo/Sandbox}} respectively, and has been tested at {{Chembox/Testbed}}. Note that I've also simplified the code for the Identifiers module and removed the unused parameter EINECSCASNO
. Could someone move the sandboxes over the main templates? Physchim62 (talk) 11:54, 8 April 2009 (UTC)
- FYI, CAS have informed us that they have now added 626 links TO Wikipedia from their site. We will continue our validation work to supply them with more. Walkerma (talk) 15:14, 29 April 2009 (UTC)
Please insert SMILES into SMILES field
Many chemicals have, instead of the SMILES string, a link to eMolecules or ChemSpider or both. Whatever about the merits of these links (see "Justification for Emolecules links?" below), the SMILES string should be included explicitly in this box. The current situation is that you need to click on the link to eMolecules or ChemSpider to find the SMILES string (the SMILES string is embedded in the link to these websites, but it's encoded). SMILES strings have an independent existence that is unrelated to chemical vendor or chemical community websites.
As an example of what I'm talking about, please see the aspirin page. These links are so common that it's not clear to me whether this a Wikipedia:Chemicals policy and that any 'corrections' would be reverted. Baoilleach (talk) 08:19, 29 April 2009 (UTC)
- I agree, besides the problems of eMolecules as a link (commercial; is true for ChemSpider as well; and both are not 'owners' or 'authorities' of SMILES, unlike the ChemSpiderID for ChemSpider, PubChem-number for PubChem or CAS No. for CAS), SMILES are (quite) a bit error-prone, and automatic linking from them may not be a good plan. I also agree that the box should display the SMILES (either behind a show box, or just always), the encyclopedia should be about displaying information, not primarily linking to it. --Dirk Beetstra T C 08:52, 29 April 2009 (UTC)
- I agree also. However, looking at a few chemboxes, I can't see this problem; the aspirin example uses {{drugbox}} instead, so it would need to be discussed with WP:PHARM. Do you have any examples using the chembox (orange) rather than the drugbox (blue)? Walkerma (talk) 15:13, 29 April 2009 (UTC)
- This might be a sign that it's time to start up again the discussion about unifying the appearance of drugbox and chembox, with an eye to a possible union in the future. It would require some compromises (for example, the drugbox community likes CPK coloring for the atoms more than the chembox community), but I think there are paths forwards. Would anyone else like to work on this with me? --Arcadian (talk) 17:21, 29 April 2009 (UTC)
- Apologies if comment was misdirected. I assumed that all chemicals were under the same wikiproject. I assume it's possible to use DBPedia or so to find instances where the SMILES entry in a Chemical infobox contains a link (I have no idea how to do this though). Regarding the comment that SMILES are error-prone, I assume you mean that people sometimes enter incorrect SMILES. It would be possible to automate (at least to some extent) testing of SMILES against PubChem and flag up potential errors. Baoilleach (talk) 09:25, 30 April 2009 (UTC)
- I agree also. However, looking at a few chemboxes, I can't see this problem; the aspirin example uses {{drugbox}} instead, so it would need to be discussed with WP:PHARM. Do you have any examples using the chembox (orange) rather than the drugbox (blue)? Walkerma (talk) 15:13, 29 April 2009 (UTC)
- No problem, Baoilleach. The chemicals are not fully under one wikiproject, though at least Wikipedia:WikiProject Chemicals does also keep an eye on the chemicals classified as drugs (using {{drugbox}}), and some drugs have a chembox ({{chembox}}) because they are 'more' a chemical compound then a drug (err, how do I phrase this .. ), or are more ambiguous in that. However. What I meant with SMILES being error-prone, is that SMILES are not ambiguous (some can be written in different ways and still be correct), sometimes they are indeed typed wrong, sometimes they are vandalised (and they are 'easily' vandalised, but we have User:CheMoBot to keep an eye on that, and sometimes there are cases where one SMILES can refer to more compounds (IIRC discussions about that). It is not 'the best of identifiers', but that is a problem that practically all have. And, as SMILES does not belong to an organisation for as far as I know, it is difficult to link to the 'official smiles site', and other choices are .. well, either commercial or depending on preference, or depending on which database is deemed most complete (we have pretty exotic stuff here, for which we can write a SMILES, but which are not in the bigger databases). Problematic stuff. I would suggest not to link SMILES, but link 'official' identifiers (CASNo to CAS, PubChem to PubChem, ChEbI to chebi, etc.), but just display it.
- Regarding unification. I need to play a bit with an idea, and need 'help' with that. I was thinking to put a new identifier in the body of the {{chembox}}, say 'chemical', which can be empty, or set to 'chemical', 'drug' or something (empty being the same as 'chemical' for later). This a) results in a colouring of the 'chembox', making it e.g. our normal colour for 'chemical', and giving the drugbox colours for 'drug', I think it is possible to propagate the var into the subboxes as well (that is one of the problems). If we can do that propagation into the sub-boxes, then it is easy to adapt some things to flavour the box further. I am thinking about CPK colouring of the formula's, specific external links for specific identifiers, etc. Thoughts? --Dirk Beetstra T C 09:42, 30 April 2009 (UTC)
Cleanup
I am not sure how often it is still there, and hence 'Category:Chemical infoboxes with misplaced or deprecated parameters': I have, in the past, seen articles with {{chembox}} which had some parameters in the main of the box (like boiling point). Chembox does still support that (it is from a very old version of the box), but these parameters should be moved into their own sections (boiling point to properties, InChI and SMILES to identifiers. I adapted the code of the chembox, categorising all articles with that problem into said category, we have to see if and how it fills up and then clean it. I would suggest that once we have cleaned the lot, we remove the support of those parameters from the main chembox, making it dependent solely on the subboxes where it should be. Any help is appreciated. Thanks. --Dirk Beetstra T C 09:56, 30 April 2009 (UTC)
could you add new
Please could you add fields for Specific Surface Area, Pore Volume, and Average Pore Size? thanks E.J.Hoekstra (talk) 16:08, 24 May 2009 (UTC)
- I'll build these into the {{chembox Properties}}. --Dirk Beetstra T C 13:39, 20 January 2010 (UTC)
- Done, AveragePoreSize, PoreVolume, SpecificSurfaceArea. --Dirk Beetstra T C 13:51, 20 January 2010 (UTC)
CAS number
I noticed the CAS number islinked and inside square brackets. Should those brackets be there? I had a look at the code, but have no idea where those brackets come from. Debresser (talk) 19:01, 4 June 2009 (UTC)
- If you take a look at the printed version of the Chemical Abstracts, as a convention, CAS registry numbers [RN] are always displayed within square brackets (e.g., [107-21-1]) as an aid to the reader. So those familiar with the printed version will immediately recognize [107-21-1] as a CAS number. Cheers. Boghog2 (talk) 20:49, 4 June 2009 (UTC)
- Thanks. Debresser (talk) 21:01, 4 June 2009 (UTC)
EC number
I don't find EC-numbers for any chemicals anymore. (Search: "EC-number" or "EC number") Have they been removed from all articles?--Christopher King (talk) 15:42, 13 June 2009 (UTC)
- AFAIK, there is no effort to remove them. I recently added one to PFOA, with only support from a more experienced WP Chem editor. -Shootbamboo (talk) 15:49, 13 June 2009 (UTC)
CAS number
I noticed that the external link for the CAS number in the Chemical infobox has an extra pair of brackets around it. Not only that but the links often (maybe always?) produce a "No CAS Registry Number® matched your search" results page at commonchemistry.org. Try for example, Tyropanoic acid or Tocofersolan. Jason Quinn (talk) 16:36, 25 June 2009 (UTC)
- The general format for a CAS number is with one set of square brackets, so that is correct.
- Indeed, Wikipedia has a wider set of chemicals available than commonchemistry.org does. We did have an off-wiki discussion about this, and the dilemma is between sorting out those that do work and only link those (doable, but quite some work, but we could only linke those that we have validated), or link all and hope that the commonchemistry site expands their set (they keep statistics about what gets clicked and what not). I hope this explains. --Dirk Beetstra T C 16:47, 25 June 2009 (UTC)
- Should the brackets be made part of the link then? The style is confusing as is. Jason Quinn (talk) 19:07, 25 June 2009 (UTC)
- Hmm, you mean in the display of the link? That makes sense, indeed, but not sure if it works (see {{chembox CASNo}}. --Dirk Beetstra T C 19:12, 25 June 2009 (UTC)
- Yes, that can be done if people want it. You need to use [ and ] within the square brackets for the link. Physchim62 (talk) 19:25, 25 June 2009 (UTC)
- I looked at CAS_number and also CAS Registry Numbers FAQ and CAS Number format I found no mention of brackets. Also many other search results seem to use CAS numbers without brackets. Is it certain that brackets are part of a CAS number? It appears to me that they are not, although this is all new to me. Jason Quinn (talk) 20:59, 25 June 2009 (UTC)
- I agree. This is the first time I've seen a CAS number in brackets, and even on the CAS registry site an example is given as follows: "For example, 58-08-2 is the CAS Registry Number for caffeine." So I would vote to remove the brackets. MichaK (talk) 09:12, 20 August 2009 (UTC)
- Both the Kirk-Othmer and the Ullmann's encyclopedias have the convention of writing CAS numbers in brackets, and I think I've seen that convention in other places as well, but in the end I think it is just an editorial convention that they chose and is nothing "official" that needs to be followed by everyone. --Itub (talk) 13:16, 20 August 2009 (UTC)
- Oh, I just saw that there's another thread above where someone pointed out that the printed version of Chemical Abstracts also uses brackets. But still, I don't think we need to use brackets. (Now I seem to remember the Merck Index using brackets too, but I don't have it with me to verify...). --Itub (talk) 13:18, 20 August 2009 (UTC)
- Hmm, perhaps this convention is used to highlight a CAS number in continuous text? Like "Agitation is also caused by caffeine [58-08-2]." Then the bracket convention would signal that it is a CAS number, but we already have a heading next to the number, so it would be redundant. MichaK (talk) 12:06, 21 August 2009 (UTC)
- Being an oldie who remembers the print CAS, I like the square brackets. Also, most chemical catalogues use them too - again, this is in print. Before the Web, I think you NEVER saw a "naked" Registry No. (except inside STN Messenger output), but I have to concede, that online the square brackets are less common (probably because they're easier to code for?). The main argument for keeping them: Square brackets are commonly associated with CAS RNs, so they make it clear what the numbers are, whatever the context. But the brackets look ugly, unlinked around a linked RN. I would say that if we can link the nos. as Physchim62 indicates, that would be the best solution. But if there is a strong reason for removing them, I can live with that, too. Walkerma (talk) 13:35, 21 August 2009 (UTC)
- Hmm, perhaps this convention is used to highlight a CAS number in continuous text? Like "Agitation is also caused by caffeine [58-08-2]." Then the bracket convention would signal that it is a CAS number, but we already have a heading next to the number, so it would be redundant. MichaK (talk) 12:06, 21 August 2009 (UTC)
- I agree. This is the first time I've seen a CAS number in brackets, and even on the CAS registry site an example is given as follows: "For example, 58-08-2 is the CAS Registry Number for caffeine." So I would vote to remove the brackets. MichaK (talk) 09:12, 20 August 2009 (UTC)
We have nowadays the CASNo linking to the commonchemistry website, which is run by CAS. Following the link for benzene (http://www.commonchemistry.org/ChemicalDetail.aspx?ref=71-43-2 71-43-2] gives a page, where they do not use square brackets. I think hence that maybe they should go. Next problem that comes then, is that we use the brackets to notify if the CASNo has been verified. We may have to come up with something else there ( (?) and (?) ??). --Dirk Beetstra T C 13:46, 21 August 2009 (UTC)
- I say no brackets. Although the print that does use them is authoritative and historical, I don't see brackets on CAS #'s in journal publications. So, in my opinion, including them works against us—by creating some confusion (and slightly decreasing the accessibility) for the sake of a specialized print tradition. -Shootbamboo (talk) 22:38, 21 August 2009 (UTC)
Style / code tweaks
I noticed that chembox was using the toccolors HTML class rather than the pre-cooked infobox class. This means that it looks a little out of place and had to employ its own floating code, for instance. I've created a sandbox to work on a fix for this, and the results are available test cases page. Comments? I'm planning on doing further work to make this template easier to maintain in future. Chris Cunningham (not at work) - talk 10:38, 30 July 2009 (UTC)
- Yeah, that looks OK (although I quietly wonder what it will break!). The reason behind the
class="toccolors"
is purely historical: the infobox was written before theinfobox
class was introduced, and we've never changed it for fear of breaking something somewhere on the 5000 or so diverse uses of the template. - The code could certainly be made simpler – I can personally take much of the blame for the bad coding – but we like the modular format, even if it means lots of different templates to watch over. Physchim62 (talk) 14:39, 31 July 2009 (UTC)
- Yeah, much the same situation as with {{drugbox}} (which also recently made the leap). There shouldn't be any fallout at this stage; I do promise to keep an eye on it in any case. Chris Cunningham (not at work) - talk 14:58, 31 July 2009 (UTC)
{{editprotected}}
As there's been no further discussion, requesting sync with the sandbox. As the test cases show, this leads to a significantly more compact infobox without any unpleasant side-effects, and also removes an HTML ID which may cause pages to generate invalid markup right now. Chris Cunningham (not at work) - talk 08:17, 13 August 2009 (UTC)
- Thanks. Just one more sync required for a slight reformatting of the endnotes. Cheers! Chris Cunningham (not at work) - talk 08:39, 13 August 2009 (UTC)
- I tried, it breaks. I also tried to preview the new sandbox on Benzene (in Opera), the box then displays on about half the width of the page (still way too wide), I don't see why. Copying the text from sandbox into the the real template strangely enough resulted in a page-wide box in Opera (explain me why it is not behaving the same, I have no clue). I have reverted, may need some further tweaking. Also, I'd like to keep the {{Chembox header2}} used in the box, I believe it is also transcluded into the 'modules', so all get recoloured in the same way with one edit (that was at least the aim). --Dirk Beetstra T C 08:40, 13 August 2009 (UTC)
- I'd far rather than such short chunks of code weren't separated out - not only is excessive calling of sub-templates bad performance-wise, but it often makes it very difficult to work out exactly where a rule is being applied. The width is indeed problematic; I'll have a look to see why it's being overridden. Chris Cunningham (not at work) - talk 08:50, 13 August 2009 (UTC)
- Hmm, performance is not our problem, but the modular approach does call left and right for some solutions which would indeed be more easy if the modular approach would not be there. Saves edits. The {{intricate}} is there for a reason.
- I have problems reproducing the width problem. In the testcase it is fine .. and it is not that there is something with Benzene. While you are working on it, it has been our long-standing wish to FORCE the width of the chembox to a certain width, not that it adapts its width to the longest chunk of text (which is often the IUPAC-name or the SMILES, we were now forced to put these behind a show-button, which is not optimal). Thanks for all the work, anyway! --Dirk Beetstra T C 08:56, 13 August 2009 (UTC)
- Note: Benzene shows a vertical line, like a column division (it is also in that place), while the title is centered in the header (so it is one cell?). I don't see that with longer titles in the header (Magnesium sulfate does not have it), as if it is there 'overwritten' by the title. It is a bit ugly (and was already there in the old box, and I still see it). Any clue? --Dirk Beetstra T C 09:01, 13 August 2009 (UTC)
- Right, the width conditional is now properly fixed in the sandbox. I'm not sure what you're describing for the title attribute, though. Chris Cunningham (not at work) - talk 09:04, 13 August 2009 (UTC)
I will try it in mainspace. What I mean is, that it looks like the title-cell is split into two cells (there is a vertical divisor visible which seems to split the header into two cells, but the placing of the title does not care about it, that one is centered with respect to the width of the box, not with respect to the 'cell' it is in (which generally is the second column). So it looks like:
| | Benzene |
for a longer name:
| Nitrobenzene |
(as if the line is overwritten). I hope this is more clear, it might be an Opera problem. --Dirk Beetstra T C 09:12, 13 August 2009 (UTC)
- Done, seems to display fine now. Now wait for the server to purge and mayhem to break loose .. ;-) Thanks again! --Dirk Beetstra T C 09:17, 13 August 2009 (UTC)
- Just a minor point, but it seems that when the chembox has a reference, the title no longer has enough room and some letters are cut off at the bottom (see for example diisoheptyl phthalate). -- Ed (Edgar181) 14:32, 13 August 2009 (UTC)
- Eh, sorry Edgar181, I don't see that in Opera. There is still more than enough space left for the reference behind the title. Would this occur on smaller screens, or something like that? --Dirk Beetstra T C 14:51, 13 August 2009 (UTC)
- I tried it by giving a long name using the 'name=' parameter, the ref just hops to the next line. This might be a browser specific problem. --Dirk Beetstra T C 14:53, 13 August 2009 (UTC)
- I'm using IE, and what I see is that there isn't enough vertical space for the title in the specific case of diisoheptyl phthalate: the superscript reference ("[1]") pushes the rest of text downward so that it is no longer centered vertically. The letters that hang below (p and y) are then cut off at the bottom. It's a minor point, but in my naive ignorance of the technical issues, it seems like it should be an easy fix. :) -- Ed (Edgar181) 15:22, 13 August 2009 (UTC)
- I don't know if I'm explaining it well, so here's a bit of screen capture: File:chembox issue.jpg -- Ed (Edgar181) 15:33, 13 August 2009 (UTC)
- The image tells it all. I have removed something, could you try to purge and have a look? --Dirk Beetstra T C 15:40, 13 August 2009 (UTC)
- It looks fine now. Thank you! -- Ed (Edgar181) 16:10, 13 August 2009 (UTC)
- Good. :-) ! --Dirk Beetstra T C 17:48, 13 August 2009 (UTC)
Show/hide button
Why does this template have a show/hide button rather than simply showing the IUPAC name from the beginning? Meeve (talk) 15:25, 14 August 2009 (UTC)
- Some IUPAC names are simply so long that they are cumbersome and take up too much space in the infobox. Also, some browsers do not properly display the IUPAC name (no line breaks) and it makes the infobox wider than the screen. -- Ed (Edgar181) 15:53, 14 August 2009 (UTC)
Unneeded comma
When the CASOther field is used, the CAS number in the chembox is followed by a comma. However, it seems that the most common use of CASOther is to put a qualifier in parentheses such as "(HCl salt)" or "(monohydrate)", or to put a line break followed by additional info (such as magnesium sulfate, for example). In all these situations, the comma is unneeded and just plain looks funny. Can we remove this comma? In any situation where it is wanted, it can then be added manually. ChemNerd (talk) 21:38, 30 August 2009 (UTC)
- Strong support. We're probably need to overhaul our handling of CAS numbers anyway to give due promenence to all verified values. Sometimes there is more than one verified value for a single article, eg Glucose, where we have verified numbers for the generic monosaccharide and also both the α- and β-anomers. Still, removing the comma is simple, so shouldn't wait for a bigger overhaul of {{Chembox Identifiers}}. Physchim62 (talk) 16:42, 2 September 2009 (UTC)
- The sequence in display is 'CASNo CASNo_Comment, CASOther', which means that the first 'CASOther' (which should contain the next CASNo's is separated from the first with a comma. If the CASNo itself needs a comment, one needs to add 'CASNo_Comment'. --Dirk Beetstra T C 13:54, 20 January 2010 (UTC)
Appearing in article namespace
Category:Chemboxes which contain changes to watched fields is appearing in article namespace. This template needs editing to make it hidden or part of Wikipedia namespace. -- Alan Liefting (talk) - 02:08, 6 September 2009 (UTC)
- I think this was already solved. --Dirk Beetstra T C 13:54, 20 January 2010 (UTC)
Template:Chembox SMILES
I've been working on Template:Chembox SMILES, trying to figure out what it is supposed to be doing. Yesterday I greatly simplified the logic. What is left doesn't really make sense - it shows value3 if it is not empty, otherwise it shows value. It doesn't look like any pages are actually using value2 or value3, so I can't tell what they are supposed to be used for. Anyone have any idea? — RockMFR 22:34, 19 September 2009 (UTC)
- No, I have no idea, if we need them we will rebuild them, removal does not seem to have broken anything. --Dirk Beetstra T C 13:55, 20 January 2010 (UTC)
"Metabolism", this also the place for "metabolites"? or is there no such place?
I keep wanting to put what human metabolites are found into those places. You look at "Morphine" it says "Hepatic 90%", so this wouldn't be the place to put it's major metabolites? We need a section of the chemical information box to have that. Morphine would have M3G & M6G, cocaine would have subsections (words only, not a place in the info box, I just imagine it written-) like "pyrolysis: methylecgonidine", etc. Could we work that in or am I missing the place for metabolites not just how excretion is made but what activity or metabolic pathway is made to result in what actual molecules from which (in humans.. since it all assumes in humans, but we have the "Oxycodone" article with chemical molecular metabolites unique to rabbits(!))... thanks.. 4.242.174.200 (talk) 10:45, 15 October 2009 (UTC)
- We have "Metabolism" to try to keep the chembox compatible with Template:Drugbox, so that anything which can be placed in a drugbox can also be placed in a chembox. As for metabolites, I would suggest that the best place for them is in the article text, so that the metabolic pathway can be discussed in more detail (which enzymes are involved, what species differences are known, etc). In many cases, the metabolism of a compound is important in its toxicity. Physchim62 (talk) 10:54, 15 October 2009 (UTC)
- I just thought a quick reference of what metabolites have wikipedia articles and links would be nice to reference there at the top in the box instead of having to dig through the page to actually find them; though I agree they should be discussed as well, much of what needs to be discussed is quickly referenced for ease of finding it there in the chemical box template at the top. What metabolite molecules exist would be nice too IMO. 4.242.174.208 (talk) 13:44, 16 October 2009 (UTC)
- I'll add a field 'metabolites' to the {{Chembox_Pharmacology}}. --Dirk Beetstra T C 13:57, 20 January 2010 (UTC)
Lack of CAS Number not in Catagory
In Category:Chemical pages needing a CAS Registry Number it states "This category is populated by articles which have a {{chembox}} or a {{drugbox}}, but which do not have a CAS Registry Number mentioned in the box."
However I have seen articles with no CAS number and a {{chembox}} (e.g. Polythiazyl) that don't appear in the catagory, so I assume the correct code is not present.
I see that the template {{drugbox}} has the following code...
| bgcolor="#eeeeee" | {{#if:{{{CAS_number|}}} | <span class="reflink plainlinks nourlexpansion">[http://www.nlm.nih.gov/cgi/mesh/2009/MB_cgi?term={{{CAS_number}}}&rn=1 {{{CAS_number}}}]</span> | ?[[Category:Chemical pages needing a CAS Registry Number]] }} {{#if:{{{CAS_supplemental|}}} | {{{CAS_supplemental|}}} }}
I have checked, and I cannot find any code within the {{chembox}} template (or sub templates) which is similar to the {{drugbox}} piece above.
Can someone add the appropriate code to the{{chembox}} template(s). It's a bit advanced for me - I'm still learning that syntax. Ronhjones (Talk) 23:37, 17 November 2009 (UTC)
- The code was indeed missing, or got lost. Added to the template, the pages are now properly categorised. --Dirk Beetstra T C 14:05, 20 January 2010 (UTC)
Missing documentation in Chembox Hazards
The documentation of Template:Chembox Hazards fails to mention that LD50 is one option. Possibly there are other omissions. See, for example, gamma-Butyrolactone, where the LD50 is shown in the Chembox. Albmont (talk) 10:53, 19 January 2010 (UTC)
- I have added all of them now, there were indeed quite some missing. Thanks. --Dirk Beetstra T C 11:21, 19 January 2010 (UTC)
- Thanks. Also, I noticed that the German Chembox includes a "MAK" field (see de:Toluol). This is the threshold limit value or TLV; it seems that the English Chembox does not include it. Albmont (talk) 11:34, 19 January 2010 (UTC)
- Added the Threshold Limit Value, see Toluene, indeed useful to have. --Dirk Beetstra T C 12:43, 19 January 2010 (UTC)
- Further adapted, for those who know the more specific ones, there are now also parameters for TLV-STEL, TLV-TWA and TLV-C. Using these three will automatically make the numbers be followed by a (STEL), (TWA) or (C). --Dirk Beetstra T C 12:55, 20 January 2010 (UTC)