Template talk:Chembox/Archive 4
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 2 | Archive 3 | Archive 4 | Archive 5 | Archive 6 | → | Archive 10 |
Can I add "Optical property" in this table?
Optical property | |
---|---|
Refractive index | ? for 589.2 nm (nD) ? for 486.1 nm (nF) ? for 656.3 nm (nC) |
V-number | ? |
Physchim62 deleted these. So I want to know why I cannot add these.. by Weihao.chiu 15:00, 10 November 2005 (UTC)
- I think these are secondary chemical properties, and belong on the supplemental data page. ~K 16:16, 10 November 2005 (UTC)
- I agree with K and Physchim62. We at WP:Chem actually debated refractive index both here and on my talk page when we set up the page, and we decided to put it on the supplement page. Join WP:Chem and convince us otherwise if you wish! There are hundreds of data we could put in, but we can't fit them all on the main page. Walkerma 17:04, 10 November 2005 (UTC)
- In particular, these are properties which are not important (or even known) for many compounds: that's why I didn't think they should go into the template which is downloaded every time someone wants to insert a table. If you wanted to add a refractive index to a table in an article about an organic liquid, I wouldn't have a problem with it (although don't go too far, the tables are already quite long): add a line in the "Properties" section. Physchim62 (talk) 18:01, 10 November 2005 (UTC)
- Okay~~I will not add these in this table. However these properties are just not important for you but they are important for me. I can understand this, because I am not a chemist. This is jut like that I don't care the Molecular shape, Crystal structure,etc. But I will still add these properties in the individual compound page that is important for me. by Weihao.chiu 07:37, 11 November 2005 (UTC)
- Please can you make sure you add these to the supplement page if at all possible, rather than the main page? I disagree with PC on this, I'm concerned about "table creep" For example, I would love to add NMR spectra for all organics to the table, but I got overruled by others! If there isn't a supplement page as yet, click on the link to it and enter your table on there, as described here. We have a rough template for the supplement page, but we haven't had a formal vote on it yet, just make sure that optical properties are there. We will be sure to include your comments when we formalise the supplement. I have added Abbe number into the "structure and properties" table right below refractive index. Thanks, Walkerma 14:06, 11 November 2005 (UTC)
- I agree with Martin here: let's prevent table creep. Wim van Dorst 21:10, 11 November 2005 (UTC).
External links in tables
I am busy reverting another well meant example of table creep: External links do not work well in tables (they get expanded by some explorers when the table is printed), and to place them there is contrary to the MoS. They should go in the External links section at the bottom of the article. Physchim62 (talk) 10:24, 12 November 2005 (UTC)
- The example in question is {{PubChemRow}}, of which I am the instigator. Please note that one reason I developed it was precisely to avoid table creep — some of the detail available on PubChem (an authoritative, public resource) can be omitted in the infobox (e.g. perhaps the SMILES, which can be very long). Unfortunately, I was not aware of the IE issue, and was wondering if there is a way around it. (TinyURL does not help.) In the meantime, feel free to use {{PubChemLink}} (created by Physchim62). Peak 17:21, 12 November 2005 (UTC)
- PubChem is public, but it is not authoritative. I hoped to use their InChIs in my Compendium of Pesticide Common Names, but I found so many wrong names and structures that I had to generate my own InChIs using ChemSketch. Alan Wood 17:29, 3 March 2006 (UTC)
InChi
Should InChi's be added to the Chembox underneath SMILES? It would make google searching an InChi pull up the wiki page which would be usefull.
For details about InChi see http://wwmm.ch.cam.ac.uk/inchifaq/ (the InChi FAQ)
- I would give this a cautious welcome, although I know that other editors are concerned about keeping table length down to a reasonable size. Physchim62 (talk) 18:02, 19 January 2006 (UTC)
- As one of those "other editors" I would give it a cautious welcome too; I think if this does turn out to be official IUPAC policy then we need to take it seriously, and it would only add one line. I think as an online resource, our users are sitting at a computer - the place where an InChI is most useful. One major problem; When someone like myself writes a table like for alpha-Pinene (done last night) I want to be able to fill out the table completely in one go, using the Aldrich book, the Merck, the CRC and perhaps a couple of other books. As far as I know, none of these lists the InChI at present. With SMILES (which I never personally use) I can ask ChemDraw to do the conversion for me. This InChI generator looks way too difficult for a simpleton like me, and bear in mind that many of our editors do not even have access to ChemDraw. A few pages like ethene already have the InChI listed, but I don't want to see 1000 tables where 990 of them have ? as the entry. Could we make it an optional feature? Walkerma 21:47, 19 January 2006 (UTC)
- If Martin is merely one of 'the other editors' I must consider myself on the far side of the other editors: I'm dead against table creep. And the only way I could agree with InChi in the table is by systematically having it replace the SMILES, which serves exactly the same purpose. Personally I don't use either, and before the WP:Chem I hadn't even heard of either. So not a longer table. Wim van Dorst 22:38, 19 January 2006 (UTC).
- As one of those "other editors" I would give it a cautious welcome too; I think if this does turn out to be official IUPAC policy then we need to take it seriously, and it would only add one line. I think as an online resource, our users are sitting at a computer - the place where an InChI is most useful. One major problem; When someone like myself writes a table like for alpha-Pinene (done last night) I want to be able to fill out the table completely in one go, using the Aldrich book, the Merck, the CRC and perhaps a couple of other books. As far as I know, none of these lists the InChI at present. With SMILES (which I never personally use) I can ask ChemDraw to do the conversion for me. This InChI generator looks way too difficult for a simpleton like me, and bear in mind that many of our editors do not even have access to ChemDraw. A few pages like ethene already have the InChI listed, but I don't want to see 1000 tables where 990 of them have ? as the entry. Could we make it an optional feature? Walkerma 21:47, 19 January 2006 (UTC)
Except where otherwise noted, data are given for materials in their standard state (at 25 °C [77 °F], 100 kPa).
|
Thanks to all who have worked on transcludable versions of the chembox: I am pleased to announce the arrival of {{chembox new}}, which is a fully transcludable version with all parameters optional. This means that the default version is as right! I have included all parameters used in chemboxes, and also some found in {{drugbox}} and {{explosivebox}}, in order to ensure the compatibility with existing versions. The same template can be used for both "simple" and "full" chemboxes. The appearance of the chembox is unchanged from the current versions. See {{chembox subst}} for a list of parameters. Enjoy! Physchim62 (talk) 07:40, 12 April 2006 (UTC)
Anyone know what's wrong with this article? --M1ss1ontomars2k4 05:13, 7 May 2006 (UTC)
- Now fixed. The box expands to the width of the widest entry - in this case the many alternative names widened it a lot. If you insert those br tags (see the changes I made) you can get it to a good width. Also, I noticed that the external link was written like an internal link - for ext links you only use one square bracket, not two, and you use a space instead of a | between the URL and the text part. Thanks for alerting us. Walkerma 05:28, 7 May 2006 (UTC)
MSDS
The MSDS link in the template is written like an internal link with double cornered brackets. Why is that? Do you expect people to copy the MDSD to the wikipedia possibly infringing on copyrights? May this should be changed to external link. I just used the chembox from HCl. Jasu 11:58, 26 May 2006 (UTC)
- You'll notice that if you click on the redlink, it asks you to create a supplementary data page called {{PAGENAME}} (data page). When creating chemboxes, you should also create the associated data page as a home for MSDS links, thermodynamic data, spectral information, etc. Please add in as much of those data as you can! Hydrochloric acid was a featured article before the supplement was created, so it's not quite standard. An article like toluene and Toluene (data page) show how it's to be done. Walkerma 16:29, 26 May 2006 (UTC)
NFPA Fire Diamond
There's a problem with one of the struck Ws in this section, but I don't know enough about the language to fix it. ejstheman 04:09, 31 May 2006 (UTC)
When should they be used?
When should chemboxes be used? This article says it should be used with all chemical articles, but does that include alloys? I am aware of the drugbox and the explosivebox and the elementbox, but what about alloys and dyes? What if I come across drugs article with no box at all? what about ones where the line of distinction is blurred (eg. ascorbic acid). Is it ok to replace old style chemboxes? mastodon 14:52, 2 June 2006 (UTC)
- The article is correct: all. But you have of course found that there is no fine line between 'chemical' and 'non-chemical' articles. When the article is about a subject only marginally about a chemical substance, then it will certainly be difficult to find the chemical (and physical) data to fill the chembox table with. Generally alloys would be out of scope of the chembox, but it may well be that a specific alloy (e.g., stainless steel 317) is of a fixed composition for which these data can well be found. If there's a certain group of chemical compounds (e.g. alloys) with specific data (e.g., shine, tensile strength, etc), perhaps it would be worthwhile to make a wikiproject of your own, with an own alloybox? Wim van Dorst (Talk) 15:59, 2 June 2006 (UTC). PS. Yes, it is highly recommended to update old chembox. Have a look at the worklist of Chemicals wikiproject if you feel like stepping in.
Can someone fix the box in Ethylene glycol? — Omegatron 03:45, 10 August 2006 (UTC)
- I'll have a look. Wim van Dorst (Talk) 18:09, 23 August 2006 (UTC).
Template:Chembox new
It is recomended that the template Template:Chembox new is used.
- I propose a move of Template:Chembox to Template:Chembox old, and a move of Template:Chembox new to Template:Chembox. Any objections? This would make it much easier for beginners to find and start using the chemboxes. Zephyris 15:45, 24 August 2006 (UTC)
- Strong object. This format of the chemical infobox, as used in the wikipedia:WikiProject Chemicals, has been extensively discussed and formalized. See above paragraphs for my and others' arguments to not change the format. I agree, though, that transcluded version has good arguments too. Please do not declare this fixed chembox template out of date or otherwise as 'recommended' to be replaced by something else unless after sufficient discussion on the wikiproject talk page. Wim van Dorst (Talk) 20:27, 24 August 2006 (UTC).
- Object. The chembox new template titles itself after the article. This is broken. Sometimes you want a chembox that is titled differently. Steviol glycoside for example, needs a chembox only for steviol, but chembox new won't call it that. -Amatulic 18:41, 14 November 2007 (UTC)
Subst
Hi all, I saw that User:BetacommandBot started subst-ing the template last night, I have reverted the edits, and blocked the template from substing by betacommanderbot. I am sorry, but I like it in a non-subst way, since it is more easy to see what is there, and it is a lot less code on the page. Any comments? --Dirk Beetstra T C 09:42, 27 August 2006 (UTC)
- I fully agree with you, but I haven't read the arguments that the bot has for subst'ing templates. Having an uncluttered page to edit is my preference too, hence my support for staying with the fixed chembox with the fixed wikitable instead of transclusion. Wim van Dorst (Talk) 22:25, 27 August 2006 (UTC).
Replacement
I am trying dry runs in which I try to replace old 'chemical boxes' with the 'chembox new' (see User:Beetstra/Chemical; don't worry, I won't press save until controversy over this new chemobx is over, and if I do, either this rule will be turned of, or I will revert). But I encounter many problems. I will list problems here:
- Drugbox ({{drugbox}}) contains sometimes more than one image, how to implement? (drugbox var 'image2') Dirk Beetstra T C 10:30, 27 August 2006 (UTC)
- Drugbox contains much more info than I can use in chembox new, anyway Dirk Beetstra T C 10:39, 27 August 2006 (UTC)
- Would it be possible to provide the image size? Dirk Beetstra T C 11:27, 27 August 2006 (UTC)
Could someone look into this? --Dirk Beetstra T C 10:30, 27 August 2006 (UTC)
- Combined images are considered a Nice Thing (tm): see benzene and the talk archives for examples
- If the chemical compound is more important as a drug than as a standard chemical compound, the drugbox takes precedence over the chembox. Choose which is the subject of the article, and then use THAT infobox.
- I gladly leave that to others.
- Wim van Dorst (Talk) 22:21, 27 August 2006 (UTC).
- Why do I now get the feeling, that {{chembox new}} is not accepted, while it is already used on pages. {{Chembox new}} incorporates the {{drugbox}}. --Dirk Beetstra T C 22:45, 27 August 2006 (UTC)
See section 1 and section 13 above how the discussion stood. Indeed some articles have been provided with a new chembox, but these were merely try-outs by PC while developing the transcluded version, and some new people in the WP:Chem project not aware of this point. IIRC, there were several important issues:
- some technicalities on fields with links, now perhaps solved??
- prevention of table creep
IMHO, there has been no further discussion on the chembox, hence the decision of the Chemicals wikiprojects still stands at the fixed wikitable. Wim van Dorst (Talk) 23:05, 27 August 2006 (UTC).
- I thought that I had left things at a state where {{chembox new}} was equivalent to {{chembox}}: never mind! Image size can be changed using the optional parameter ImageSize, which defaults to 200px width. Combined images are a nightmare to code for, the only option I can provide on {{chembox new}} is to ask users to combine the images into a single file. I deliberately created fields for all data which was used on current infoboxes, ie {{drugbox}} and {{explosivebox}}, so that conversion could go ahead without loss of data (even though this might lead to table creep in some isolated cases): on the other hand, if the drugbox has developed since I wrote the code.... please provide examples of the fields which you would like to include but can't. I am currently testing a fix for fields which include URLs, but these still cause problems in a few circumstances (notably printing from IE). The general quetion of table creep is not for me to answer! Physchim62 (talk) 10:11, 31 August 2006 (UTC)
- Oops, forgot to answer this, thanks for the 'reminder' on my talk-page, PC.
- I was programming AWB-box-replacement on a drugbox-page, moving it into a chembox, I seem to be able to do that all automatically. But I indeed encountered quite some variables that did not fit, and then I saw Wim's remark above, so I decided to remove the box-conversion. For a list of things that are not programmed into the {{chembox new}}, see {{drugbox}} (full template). Maybe the drugbox-template should be copy-pasted into the chembox-new? And could you then give a full list (including the optional parameters, like given on {{drugbox}})?
- By the way, I would be in favour of moving all the boxes on chemical pages into the chembox-new, sorting variables into the subboxes where needed (so a page which originally had a drugbox, the template chembox-new would now have a header drugbox in it). How do you chembox-loving Wikipedians think about that! --Dirk Beetstra T C 21:02, 4 September 2006 (UTC)
- I thought that I had left things at a state where {{chembox new}} was equivalent to {{chembox}}: never mind! Image size can be changed using the optional parameter ImageSize, which defaults to 200px width. Combined images are a nightmare to code for, the only option I can provide on {{chembox new}} is to ask users to combine the images into a single file. I deliberately created fields for all data which was used on current infoboxes, ie {{drugbox}} and {{explosivebox}}, so that conversion could go ahead without loss of data (even though this might lead to table creep in some isolated cases): on the other hand, if the drugbox has developed since I wrote the code.... please provide examples of the fields which you would like to include but can't. I am currently testing a fix for fields which include URLs, but these still cause problems in a few circumstances (notably printing from IE). The general quetion of table creep is not for me to answer! Physchim62 (talk) 10:11, 31 August 2006 (UTC)
- I have copied Aspirin to User:Beetstra/aspirin, and run my AWB script with box-replacement on it over it:
- This is a fully automatic run, I don't do anything afterwards (in this case, to show what I do, normally I might change some things). What happens now is that the drugbox gets depopulated in favour of the new chembox, things that do not fit into the chembox, stay in the old box, which is then a second box on the page. If I am sure everything gets depopulated out of a box, I would dare to remove the second, empty box.
- There is still a lot of tweaking to be done (on this specific page I see now that I leave a lot of empty lines, and I should do something about the image size in the new chembox. I should be able to capture that as well).
- I will not run the box-replacement in the real .. I am waiting for comments for now (maybe I should give Martin Walker a hand before I do more tweaking on this script). --Dirk Beetstra T C 22:34, 4 September 2006 (UTC)
- I think {{chembox new}} seems much easier to enter data into, but I'm a bit puzzled by the multiply duplicated fields. Can someone enlighten all of us here, how to use it? --Rifleman 82 00:12, 4 November 2006 (UTC)
subst (encore)
Not sure exactly what substs the bot was making in the above discussion, so I'll just ask straight-out: are we preferring to subst:chembox or just template:chembox unsubstituted? To fix a spacing inconsistency/style issue, I found three different templates all explicitly contained the same footer, and now I see that lots of pages have been subst'ed so the fix will have to be done manually in each page. DMacks 20:19, 5 September 2006 (UTC)
- That is my mistake, the subst were on {{chembox new}}, which, IMHO, is better unsubstituted. So I went to the talk-page of chembox new, not noticing I ended up here. So the discussion was about chembox new. The {{chembox}} needs to be substituted, it is not built in the way chembox new is. What I am trying to program, is a AWB-script that moves all possible chemboxes into the chembox new, but for that the chembox new has to be finished. --Dirk Beetstra T C 20:26, 5 September 2006 (UTC)
Width of chemical infobox
I realize that the chemical infobox usually expands to the width of the longest line. Can we set a default width of perhaps 300 or 350 px in the template to be substituted such that long lines will wrap automatically? This is more aesthetically pleasing than the use of manual line breaks which result in poorly aligned lines. --Rifleman 82 19:15, 3 November 2006 (UTC)
- although a nice idea, I don't believe you can do that: wrapping doesn't occur (or is highly browser dependant) and the box simply as wide as the longest line. The size that you give is the minimum width, not the maximum width. Wim van Dorst (Talk) 22:24, 3 November 2006 (UTC).
- Take a look at benzophenone. I've found that by setting "width=250" in the first line defining the table, I am able to get the "Other solvents" line to wrap:
{| class="toccolours" border="1" width="300" style="float: right; clear: right; margin: 0 0 1em 1em; border-collapse: collapse;"
I've tested this on Firefox and IE on Windows XP and they both work fine. Would you like to test it out on your system? --Rifleman 82 22:57, 3 November 2006 (UTC)
- Good example: the table is as wide as the smiles entry. And the wrapping is within that limit. Note that setting to 150 doesn't have any effect. I don't think implementing will be effective, but as it won't change the table, feel free to give it a try. Do choose a small value, to prevent the browser from making the table too wide. Wim van Dorst (Talk) 23:48, 3 November 2006 (UTC).
- Done. I've set it as 300px which should be adequate for most stuff. Many SMILES even with small are longer than that, but this might reduce the number of line breaks needed! --Rifleman 82 23:58, 3 November 2006 (UTC)
- Check out User:Rifleman_82/Benzophenone. I believe the table width setting defines the maximum possible width, and will wrap text to fit. HOWEVER, if there is a line which exceeds the table width, this length of line will take precedence. That being the case, I'm setting the table width for the template as 200, the same as the default width of the image. --Rifleman 82 00:12, 4 November 2006 (UTC)
- 250px is a set width which is widely used for other infoboxes I deal with (I had forgotten than the chembox didn't have one). It is also possible to set widths for individual columns, although wider text without spaces will override the specification. I suggest the application of the principle that "Chemistry is an experimental science".... Physchim62 (talk) 09:37, 6 November 2006 (UTC)
- Check out User:Rifleman_82/Benzophenone. I believe the table width setting defines the maximum possible width, and will wrap text to fit. HOWEVER, if there is a line which exceeds the table width, this length of line will take precedence. That being the case, I'm setting the table width for the template as 200, the same as the default width of the image. --Rifleman 82 00:12, 4 November 2006 (UTC)
- Done. I've set it as 300px which should be adequate for most stuff. Many SMILES even with small are longer than that, but this might reduce the number of line breaks needed! --Rifleman 82 23:58, 3 November 2006 (UTC)
Molecular formula
Using "molecular formula" as an entry for non-molecular solids such as sodium chloride and silicon dioxide is not strictly correct. An option would be to use a different term such as "empirical formula" when necessary, but I think it would be easier to use a more generic term in all cases, such as "formula" or "chemical formula". Itub 16:05, 6 January 2007 (UTC)
- I could accept a change to Chemical formula, if a serious group of supporters can be found. Wim van Dorst (Talk) 20:36, 6 January 2007 (UTC).
Added SMILES substructure search in eMolecules and PubChem
I have added a SMILES based substructure search for eMolecules and PubChem.
Please comment on possible improvements. Things I considered
- How to improve visualization for SMILES? Smaller font, truncating it?
- Instead of search in should just use images for eMolecules and PubChem?
JKW 14:07, 27 January 2007 (UTC)
- I reacted to this on template talk:drugbox; it may break! --Dirk Beetstra T C 14:15, 27 January 2007 (UTC)
- o.k., I will also answer at template talk:drugbox JKW 14:31, 27 January 2007 (UTC)
Image size
I'm unable to set the image size to anything other than the default 200px. For example, I noticed that acetamide, which uses {{chembox new}}, has a picture that seems too big to me, so I'd like to shrink it. There is a line in acetamide's chembox that says " ImageFileSize=100|" but it still displays at 200px. The instructions for this template indicates that "ImageFileSize" should be used instead, but when I tried that with various values it still seemed to stay at 200px. Probably I'm just doing something wrong, but perhaps there an error in the template. Can someone please demonstrate to me how to set the image size to something other than the default? Thanks. --Ed (Edgar181) 14:43, 3 February 2007 (UTC)
- The template listens to '100px', not to '100' .. should this be changed (I repaired acetamide)? --Dirk Beetstra T C 14:49, 3 February 2007 (UTC)
- Thanks. That was obvious enough that I should have figured it out. --Ed (Edgar181) 15:10, 3 February 2007 (UTC)
Subdiscussion - chembox new
The {{chembox new}} has gone through a big revision these last days, I have been trying to get it into a more consistent format, sorting fields, adding fields (see the 'what links here' on chembox new to see some example pages, in the latest format is oligomycin. It is still fully compatible with the old version, since some documents already use the chembox new (migration to the new format might be a good plan ..). I will continue to work on it in the coming time.
To use the new chembox, either do a subst on {{chembox subst}} (i.e. {{subst:chembox subst}}, save, and edit the page to enter data), or copy the left column from the table at {{chembox new}} (bottom of that page). There is no need to subst chembox new, better not, since when layout changes on chembox new are performed, all templates transcluding chembox new will have the format changes visible (colours, field order, whatever).
One of the major things that has already been done is that the output of chembox new is now clean, it only shows fields which are supplied, and it only shows the sub-boxes when there is data in that subbox available. The subboxes are now rather esoteric, and I still want to play with some of the functions. They contain some automagic: one example, if "pagename (data page)" exists, the chembox new will now automagically pop up a subbox with some links into that datapage). If something does not work properly, poke me, and I will either help you adapt it (so I am not the only one who can break things .. err .. so others can help me repair things), or try to adapt it for you. Or when you think you can use your magic wand to build in more automagic, please help me (one thing I do not know, is there a check possible if "pagename.svg" exists, and if it exists, then automagically shows that picture as the main picture? Of course images can be supplied by hand, I could also use some help with that .. hmm .. I suddenly have an idea .. I'll keep you posted on that somewhere else).
As said, chembox new consists of subboxes, which are sorted a bit by function, pertaining the above colour-discussion, would it be nice to have the subboxes coloured? Personally I think that would be a bit overdone.
Now I have two questions. First, are there fields missing? If so, then please poke me, and I will make an addition. First, there are fields missing, could you supply me with fields that should be here, from whatever field of chemboxes, or even, help add them to the chembox new? And second, would it be an idea to (slowly) migrate to this chembox, instead of the existing chembox? Thanks! --Dirk Beetstra T C 12:58, 3 February 2007 (UTC)
- Relating my earlier idea. Chemical compounds with the chembox that do not have the ImageFile set (hence, do not show an image) are now automagically categorised in Category:Chemical pages needing a structure drawing. --Dirk Beetstra T C 14:39, 3 February 2007 (UTC)
- Thanks for the improvements to the template. I've been holding off on using it because of issues that you seem to have fixed now. Well done! To answer you question about color, I have a strong preference for maintaining a single color throughout the box. --Ed (Edgar181) 15:10, 3 February 2007 (UTC)
- One more comment - many chemical articles have both 2D and 3D images. An improvement I would like to see is the ability to handle two images, just as {{drugbox}} can. I expect that wouldn't be difficult to enable, correct? --Ed (Edgar181) 15:27, 3 February 2007 (UTC)
- Consider it done :-) --Dirk Beetstra T C 16:14, 3 February 2007 (UTC)
- One more comment - many chemical articles have both 2D and 3D images. An improvement I would like to see is the ability to handle two images, just as {{drugbox}} can. I expect that wouldn't be difficult to enable, correct? --Ed (Edgar181) 15:27, 3 February 2007 (UTC)