Template talk:Chembox
![]() | Template:Chembox is permanently protected from editing because it is a heavily used or highly visible template. Substantial changes should first be proposed and discussed here on this page. If the proposal is uncontroversial or has been discussed and is supported by consensus, editors may use {{edit template-protected}} to notify an administrator or template editor to make the requested edit. Usually, any contributor may edit the template's documentation to add usage notes or categories.
Any contributor may edit the template's sandbox. Functionality of the template can be checked using test cases. |
This is the talk page for discussing improvements to the Chembox template. |
|
Archives: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13Auto-archiving period: 2 months ![]() |
![]() | This page is for discussion about format, layout, content (parameters), and application howto of the Chemical infoboxes. Discussions older than several months, and now outdated, are archived. Planning and progress of implementation of these infoboxes to the numerous articles is discussed and (where possible) organized in the Chemicals WikiProject, part of the Chemistry WikiProject. |
![]() | This template was considered for deletion on 2018 November 26. The result of the discussion was "withdrawn". |
![]() | This template does not require a rating on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | |||||||||||||||||||||
|
Local-image parser bug
[edit]{{Chembox}} categorizes an article in Category:Chemical pages containing a local image if |ImageFile=
(or similar field) is an image that is on the local wiki rather than on commons. However, Curium(III) chloride contains the local File:Curium(III) chloride.jpg but is not in the local-image category. It looks like a general bug when the filename contains a parenthesis: switching in other random enwiki images to that article sets the cat, and other chembox articles containing local images with parens does not set the cat. DMacks (talk) 16:48, 10 February 2025 (UTC)
- Bug is in {{ParmPart}}, where {{#titleparts}} doesn't like some URL-encoded strings. It's a documented WP:NCTECHNICAL#Other problematic characters limitation of that parser function. Given we can't be sure how a filename will be passed, we should probably switch to {{string split}} instead of #titleparts or maybe just {{in string}} instead of ParmPart. DMacks (talk) 16:55, 10 February 2025 (UTC)
The {{Chembox Identifiers}} page has an error
[edit]At the very beginning of the page {{Chembox Identifiers}} writes some code:
! colspan=2 style="background: #f8eaba;color:inherit; text-align: center;" |Identifiers |-
That code should not be visible on the page. It shows there is a code error. Please someone repair the error. Bernardirfan (talk) 18:45, 5 May 2025 (UTC)
ECHA InfoCard link on Chembox Identifiers
[edit]In the last few days I have noticed that the links for ECHA InfoCard no longer work, and give blank results. THis may be an error on ECHA's part. But the link from Wikidata works. EG https://echa.europa.eu/substance-information/-/substanceinfo/100.031.926 give blank info, but Wikidata's link https://www.echa.europa.eu/substance-information/-/substanceinfo/100.031.926 works as expected. So perhaps we need to add in "www." Graeme Bartlett (talk) 08:07, 20 July 2025 (UTC)
- The problem has gone away, so was more likely outside of Wikipedia, perhaps in cloudfare or ECHA. Graeme Bartlett (talk) 21:59, 30 July 2025 (UTC)
Find articles that do **not** have InChIs, etc.
[edit]Trying to look for info on this was unproductive on my end, so I gotta ask: is there an (easy?) way to get a list of articles with chemical (or drug) infoboxes that are missing e.g. an entry for the InChI or the IUPAC name?
Every once in a while, I can catch these while looking through entities on my personal list of interest, but it will surely be useful to easily find these articles with missing info so that I (or other people) can handle them. Haoresshin (talk) 03:42, 21 August 2025 (UTC)
- WP:PetScan is one tool that can help. For example, [1] is a live search for "all mainspace pages that contain {{Chembox}} but do not have a link to International Chemical Identifier". That link is in the Chembox title for displaying the InChI value, so I'm using that as a proxy for not having that value. Another useful route is to visit and check the subcats of interest. It catches some missing fields (but not all, even among the standard ones) and some types of mistakes. DMacks (talk) 04:18, 21 August 2025 (UTC)
- [2] is an improved search that "omits chemical-element pages". DMacks (talk) 01:35, 22 August 2025 (UTC)
- Some tools I have used to fabricate SMILES and InChIs if it is not in Wikidata, ChemSpider or PubChem or other databases:
- https://www.leskoff.com/s01817-0 generate inchi from smiles very fast
- https://cactus.nci.nih.gov/chemical/structure inchis and keys but can fail to work
- https://www.novoprolabs.com/tools/convert-peptide-to-smiles-string convert a peptide sequence to SMILES. You may have to stitch together if you hit the length limit, and don't forget disulfide bridges and protein modifications. (For antibody drugs this output would be ridiculously long). Graeme Bartlett (talk) 05:23, 22 August 2025 (UTC)
- Generating SMILES/InChI(Key)s isn't a problem for me; in fact, one reason I have been doing these last few edits over the past few weeks is to test a utility I wrote for generating these identifiers, along with the (properly formatted!) IUPAC name. :) (One critique I have is that some of those web utilities are by default set to use "Kekulized" versions of the SMILES, when the version with aromaticity would be more appropriate, viz.
C1=CC=CC=C1
vs.c1ccccc1
for benzene. Even worse ones neglect stereochemistry!) - Perhaps I'll release that utility publicly someday when I iron out most of its kinks and make it more user friendly...
- Nevertheless, these links might be useful for other people reading this page, so thank you!
- P.S. a SMILES representation of a monoclonal antibody would be too unwieldy to be useful, I agree, but one might still get away with computing the InChIKey, thus recalling its original intent as a hash for molecules. Haoresshin (talk) 05:46, 22 August 2025 (UTC)
- And since you like fixing articles on drugs [3] is for infobox drug rather than chembox. (about 3 times more drugboxes). Graeme Bartlett (talk) 07:20, 22 August 2025 (UTC)