Template talk:Infobox mineral

(Redirected from Template talk:Infobox mineral/testcases)
Latest comment: 1 year ago by ChemConnector in topic Addition of new fields
WikiProject iconInfoboxes
WikiProject iconThis template is within the scope of WikiProject Infoboxes, a collaborative effort to improve the coverage of Infoboxes 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.
WikiProject iconRocks and minerals NA‑class
WikiProject iconTemplate:Infobox mineral is part of WikiProject Rocks and minerals, an attempt at creating a standardized, informative, comprehensive and easy-to-use rocks and minerals resource. If you would like to participate, you can choose to edit this article, or visit the project page for more information.
NAThis template does not require a rating on Wikipedia's content assessment scale.

Addition of new fields edit

I added a few new fields into the template box, to make it workable for gemological identification and characterisation. Cheers. SauliH 15:48, 23 January 2007 (UTC)Reply

I added "Toughness". There is data on it available for an increasing number of minerals, and techniques for measuring it are improving in consistency. Its presence might be useful to people who think that Moh's scale measures toughness ("It's really hard, I can't understand why it shattered"). I also added the Curie temperature, although obviously this is irrelevant for many minerals. HLHJ (talk) 23:17, 13 August 2017 (UTC)Reply

I think that adding a magnetism field would be valuable and can be included for ferromagnetic minerals.--Polarwander (talk) 16:40, 15 May 2019 (UTC) The field could indicate whether a mineral is ferrimagnetic, antiferromagnetic, etc. Such properties are fundamental properties of the mineral physics and as such warrant inclusion. --Polarwander (talk) 16:43, 15 May 2019 (UTC)Reply

I also think that there would be a good idea. I assume that it would go in Identification? Care to differ or discuss with me? The Nth User 01:09, 16 May 2019 (UTC)Reply

Has the addition of a Chemical Abstracts Service number been considered? For example, for asbestos the CASRN would be 1332-21-4. CASRNs are valuable for chemical mapping purposes in DrugBoxes and ChemBoxes --ChemConnector (talk) 14:10, 22 August 2022 (UTC)Reply

Type locality edit

I'm just wondering if a type locality field would be good for this infobox. Volcanoguy 23:36, 28 June 2017 (UTC)Reply

Parameter check added edit

I have added module:Check for unknown parameters. Articles with unknown (or misspelled!) parameters are listed in Category:Pages using Infobox mineral with unknown parameters (0).

For starters, I have not listed the parameters |image_size=. Because: they are not documented and maybe superfluous. We'll see. (adjusted -12:35, 7 November 2017 (UTC))

Also not OK are |Curie, toughness=. These were announced on this talkpage but not implemented in the template (we can fix that later on). HLHJ -DePiep (talk) 23:01, 5 November 2017 (UTC)Reply

Cleaned up, emptied category. -DePiep (talk) 12:35, 7 November 2017 (UTC)Reply
|toughness= is still not implemented. This causes an error when set (as in Berryite, Erlichmanite) — GhostInTheMachine talk to me 19:33, 18 July 2021 (UTC)Reply

Header background color meaning edit

So the headers can have a background color (Amethyst, Amblygonite). Does it have a meaning? And if so, can we communicate that to the Reader? -DePiep (talk) 00:18, 6 November 2017 (UTC)Reply

SMILES parameter edit

Lately, I've been working on SMILES for minerals like diamond and lonsdaleite, and I thought that there should be a SMILES parameter for me to add them to the infoboxes, but now I realize that this is not the case. I think that it might be a good idea to add a parameter for the SMILES for a finite portion of the crystal. Care to differ or discuss with me? The Nth User 04:21, 31 December 2018 (UTC)Reply

Ask {{Chembox}} (talk). -DePiep (talk) 04:46, 31 December 2018 (UTC)Reply
Better: add |SMILES= parameter and use the input for JSmol external link. As is done in {{Chembox}} Special:WhatLinksHere/Template:Chembox_SMILES. I will work on this later on. Placement at bottom of "General" section? -DePiep (talk) 13:11, 31 December 2018 (UTC)Reply
@DePiep: I meant so something like this interactive view for diamond could be available for all mineral pages. I think that the interactive image would probably be best either just under Formula (repeating unit) or just under Crystal system and Crystal class, the latter of which would be at the end of the General section. I'm also wondering whether it might be a good idea to make a new section for the infobox, called Structure, that would include things such as this, Crystal system, Crystal class, and possibly Crystal habit and/or Cleavage. What do you think? Care to differ or discuss with me? The Nth User 03:14, 1 January 2019 (UTC)Reply
I'm working on a SMILES for Tridymite. I have a fair amount so far, but I'm having difficulty adding the next set of bridges. Care to differ or discuss with me? The Nth User 20:53, 2 January 2019 (UTC)Reply
So, that is an interactive image from commons then (not the SMILES string as have {{Chembox}}, {{Infobox drug}}; which is also linking to an external JSmol rendering site). Can't we offer both options (with the external link, {{Chembox}} way, in case the stl image is not made yet)? That would give the mineral its SMILES string for starters.
re positioning: I'm not familiar with the details of chemistry, nor what to group with 'Structure'. But, for infobox design reasons a dedicated section is to be preferred. It gives the reader items in predictable, grouped, systematic place. (To separate structure from name-items is good to; the identification list could use a refinement too wrt overview & glance reasons). Will add this to the demo. Above "Identification" imo.
In new section "Structure" there would be: image, Crystal system, Crystal class, and possibly Crystal habit and/or Cleavage (since you suggest so). You think one image in here will do, or will there occur a need for more (structural) images?
re creating these images: there is a website using SMILES input from this enwiki to analyse chemical compounds, especially by their chemical parts. People there are active increating (and fixing?) smiles strings. Will come beck here once I've found the url.
FYI: this (the Monthly error report, from TemplateData) is a nice overview of parameter usage. -DePiep (talk) 09:39, 3 January 2019 (UTC)Reply
Shouldn't these parameters go into the new Sturcture section too: Space group, Unit cell? (inspiration from {{Chembox Structure}} documentation). -DePiep (talk) 10:08, 3 January 2019 (UTC)Reply

Proposal: add Structure parameters edit

  • Added: section "Structure"
New and changed parameters for section Structure (see /testcases)
Order Label parameter moved/new note
1 structural image |struct image= new Original request (can be interactive image)
1b structural image caption |struct caption= new not required
1c structural image size |struct imagesize= new not required
1d structural image alt text |struct alt= new not required
2 structural image |struct2 image= new Intended for interactive image
2b structural image caption |struct2 caption= new
2c structural image size |struct2 imagesize= new
2d structural image alt text |struct2 alt= new not required
3 SMILES |SMILES= new does not show; input for Jmol URL external link
4 Jmol (3D model, interactive) |Jmol= new
  • No |SMILES= input → no Jmol link
  • Overwrite SMILES for Jmol image (when SMILES incorrect)
  • Default: uses |SMILES= input string
  • |Jmol=none = suppress this link
This table follows talks, and so can change.

-DePiep (talk) 11:47, 3 January 2019 (UTC)Reply

Note: Repositioning existing parameters wrt structure is deferred to the next talk topic. Rearranging ALL parameters & sections, see next subsection. -DePiep (talk) 12:56, 6 January 2019 (UTC)Reply


  • The_Nth_User As the testcases show: the image can look great in there, but it is only interactive when expanded (in media screen mode).
Parameters SMILES and Jmol: to be discussed later ({{Chembox}} option still possible).
Other parameters, moved: makes sense? Ordering is ok? -DePiep (talk) 11:54, 3 January 2019 (UTC)Reply
@DePiep: I mentioned the interactive view as an example of having any sort of rotatable image or model, not necessarily that they would have to be on Wikimedia Commons. Including the SMILES was actually intended to serve that purpose, as the Jmol diagram is rotatable, but I see no reason why functionality for interactive media shouldn't be added to the template. While having both a Jmol image and interactive media might be somewhat redundant (although each has its own advantages and disadvantages), there are plenty of examples where a SMILES likely wouldn't render properly or would be too limited in size (SMILES can only have ten ongoing loops at a time, and while the same digit may be used for multiple loops as long as none of the loops with the same digit overlap, as the crystal gets larger and larger, loops have to span more and more atoms, so it gets more and more difficult to prevent loops with the same digit from overlapping. Crystals where each atom is bonded to more other atoms on average are even harder.) to give a good representation of the crystal structure (Some minerals, like melanophlogite, have relatively many atoms per unit cell.), or could be difficult to create due to difficulty keeping track of all of the atoms. The SMILES that I have done so far (like diamond and lonsdaleite) are pretty much ideal because they have relatively small and uncomplicated unit cells, each atom is bonded to relatively few other atoms and only as many atoms as it would be bonded to in ordinary chemistry. Also, while each SMILES would have to be made separately (although SMILES for atoms the same structure could be interconverted with a find-and-replace or two), there would only have to be one interactive media file per basic structure. In short, I think that the option for an interactive media view is a good idea because we shouldn't rely on SMILES. Care to differ or discuss with me? The Nth User 20:19, 3 January 2019 (UTC)Reply
OK. First, below I have created an separate section for the order and grouping of all parameters. That leaves this section to discuss the new parameters re Structure (original question), like SMILES and Jmol. -DePiep (talk) 09:02, 4 January 2019 (UTC)Reply
re interactive image like Jmol in there: AFAIK, it is not yet possible to incorporate the Jmol option right into Wikipedia (Wikimedia). (Has to do with extensions; was discussed at Chembox talk. Also Phabricator: T18491 &etc.). So {{Chembox}} can have static images (drawings, pictures) and the external link to Jmol (where there is an interactive image, {{Chembox}} sends the SMILES string). That is how {{Chembox}} and {{Drugbox}} are today. Then you demonstrated the interactive image diamond lattice on commons. Very interesting. The testcases show that it is not interactive when in infobox, but is interactive when clicked (that is: opened in imageview).
I made the demo (see testcases) do this: allow new |struct image=, and |SMILES=. The struct image can have any commons image (both static and interactive). The SMILES input is used in the Jmol link. I will add a SMILES/Jmol demo to the testcases.
This has great flexibility: one can add a static structure image (eg for complicated Melanophlogite), or an interactive excternal lnk image (Jmol link using SMILES). Note that this template is not helping creating and testing a SMILES string.
Open questions are: a. should the two be exclusive (allow either image or SMILES-for-Jmol input)? b. Should we show the SMILES string literally (not exactly for the human eye, but may be good for a search-engine)? My opinion: allow both image and Jmol link, independently; do not show the SMILES string, or in smaller print. -DePiep (talk) 10:06, 4 January 2019 (UTC)Reply
I agree with you for both. For the first, making them exclusive would be unnecessary considering that there's no negative effect from having both, and there might be SMILES rendering differences between different software vendors, so having the option for both is the best. As for showing the SMILES for the crystal, I don't think that it would be useful for searches because most sites probably don't use SMILES for crystals, and even if they did, there would be no telling how much of the crystal they include, and there would be dozens, if not hundreds, different potential SMILES for the same thing. Care to differ or discuss with me? The Nth User 00:50, 5 January 2019 (UTC)Reply
OK. So the demo now has/does:
  • New section Structure
  • New parameters |struct image, SMILES, Jmol= (and -size etc.)
  • Existing parameters in original position (reordering is discussed in separate section)
  • plus workings: |Jmol= can overrule |SMILES= input (helps data integrity); |Jmol= input categorises the article ("SMILES is not same as Jmol string"); Jmol has option "none" (to suppress link; while SMILES may be available).
See testcases; try preview. -DePiep (talk) 13:08, 6 January 2019 (UTC)Reply
If you think the new parameters are working and looking OK, we can formaly propose this change here. This way, the Structure is added nicely without disrupting other sections. I prefer, and strongly advise, to keep this change separate from the all-parameters-review in the next section. These two topics are independent, which makes the discussions less complicated. - DePiep (talk) 13:14, 6 January 2019 (UTC)Reply
@DePiep: Looking at the test cases, I realize that there might be some minerals where both a static image and an interactive media exist on Wikimedia Commons. Maybe capability should be added for two structure images. Care to differ or discuss with me? The Nth User 03:39, 7 January 2019 (UTC)Reply
Will add |struct2= set. Are you sure this adds info? After all, they are the same structure ({{chembox}} sometimes has three or four images of the same molecule in top... Bad for an infobox). Or could it be that the 2nd image wil be used for variants (that would be good)?
Any other improvements? -DePiep (talk) 09:05, 7 January 2019 (UTC)Reply
Added |struct2 image= to the testcases. I am not enthousiastic, because it inevitably leads to infobox creep. Once available, there is no treshold (in practice) to prevent usage. This way, the infobox keeps growing with more details ', which is not good per WP:INFOBOX concept. First of all: such a second image could be in the article, but not everything from the article must be in the infobox. Second, if there would be an important variant, we should rebuilt the infobox to give a major variant same space (without corrputing/exploding the infobox). Do these situations exist? -DePiep (talk) 11:29, 7 January 2019 (UTC)Reply
In other words, The_Nth_User: please rethink your request for a 2nd structural image: does does it really belong in an infobox (=/= a data sheet; complete article sumup, ...; worth the expansion in there)? But OTOH: if we must expect minerals with equally important structural variants, it might be good. (I leave this to you, after using your reply we can go live and address next section). -DePiep (talk) 08:27, 8 January 2019 (UTC)Reply
@DePiep: Maybe the parameter for the 2D, static image could be |struct_2D= or |struct_static=, and the parameter for the 3D, rotatable media could be |struct_3D= or |struct_rotate=. For structural variants each variant that's notable enough for an image on Wikipedia or Wikimedia Commons would probably have its own page, or at least its own section, and the infobox could be put there. Care to differ or discuss with me? The Nth User 00:51, 13 January 2019 (UTC)Reply
@The Nth User: Done, except that the names are like |struct image, struct2 image= for simplicity. (adding "3D" to the name will not prevent editors using it for flat images, with some reason). So I have added these parameters a;; in the new section "Structure":
|struct image=
|struct caption=
|struct imagesize=
|struct alt=
|struct2 image=
|struct2 caption=
|struct2 imagesize=
|struct2 alt=
|SMILES=
|Jmol=
Will put this live in a minute. -DePiep (talk) 10:43, 14 January 2019 (UTC)Reply

Proposal: Group and reorder all parameters edit

I've gone through the parameters and divided them into sections the best that I could. (Section names are in italics. Parameters whose suggested section boxes have been merged especially go together and should be next to each other in their respective sections (in my opinion).) For the section that I put as chemistry-related attributes, the main criterion that I used was whether or not I would expect to see it in the properties section of Template:Chembox. Also, for that one, I don't think that chemistry-related attributes should be the actual title of the section. Care to differ or discuss with me? The Nth User 21:38, 3 January 2019 (UTC)Reply
Parameters Suggested section
image top
name general
category general
formula chemistry-related attributes or general?
strunz chemistry-related attributes
dana
unit cell structure
struct image structure
struct2 image structure
Jmol (by SMILES) structure
molweight chemistry-related attributes
color/colour optical
habit structure?
twinning
symmetry structure
system
class
cleavage structural-related properties (subsection of structure or properties?)
fracture
tenacity
toughness properties
mohs
luster/lustre optical
streak properties or optical
diaphaneity optical
gravity chemistry-related attributes
density
polish optical?
opticalprop optical
refractive optical
birefringence
pleochroism
2V
dispersion
extinction
length fast/slow
fluorescence optical or properties?
absorption
melt chemistry-related attributes
Curie properties
fusibility properties?
diagnostic general
solubility chemistry-related attributes
impurities chemistry-related attributes
alteration properties?

IMA symbol? edit

The template data includes an "IMA symbol" parameter and so it is being added to articles, but the documentation section omits it and template itself does not seem to allow it — GhostInTheMachine talk to me 10:51, 14 December 2021 (UTC)Reply