Module talk:MolarMass

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

Objection[edit]

I object to the alpha-mode. -DePiep (talk) 20:15, 26 May 2015 (UTC)[reply]

You're welcome to adjust the mode. You're welcome to WP:AGF. You're welcome to continue down a road against WP:CIVIL and see where it lands you (note that this module has existed for several years). DMacks (talk) 20:17, 26 May 2015 (UTC)[reply]
AGF is not a right. I explained the background to DMacks [1]. Claiming civility while subversing ones own request -DePiep (talk) 20:49, 26 May 2015 (UTC)[reply]

Dot[edit]

I suggest using . as a dot - the other "*" is very diffucult to add, and . are used by Greenwood and Earnshaw (even that its really stange they do so) Christian75 (talk) 20:42, 26 May 2015 (UTC)[reply]

Seems reasonable enough. My original concern when I came across this parser was that decimal-subscripts have no other way to be expressed...supporting the full range of reasonable unified formulas before any structural details. Would need some way of figuring out whether "Ca2.5H2O" is "Ca2•5H2O" or "Ca2.5•H2O". I don't know enough lua to haul in a full BNF parser for a formula grammar. DMacks (talk) 20:56, 26 May 2015 (UTC)[reply]
I see your point (I always forget that the English decimal comma isnt a comma). I think its hard (if not impossible) to do with regular expresion. Maybe the dot should be *. Christian75 (talk) 21:12, 26 May 2015 (UTC)[reply]
Asterisk would be fine. This module seemed a bit confused (or incomplete, depending on what one's goals are) about how complex and pre-formatted a formula it was intending to support. DMacks (talk) 16:47, 27 May 2015 (UTC)[reply]
@DMacks: - I have tried to fix some of the errors. Its now accept crystalization water (but not other kinds of solvents of crystallazation), and it multiply the formula with the leading number. Im not sure how to fix [] unless it should threat them as (). Christian75 (talk) 14:04, 28 May 2015 (UTC)[reply]

Notes[edit]

The following discussion is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.


{{Chem molar mass}} is deployed in {{Chembox}} and {{Drugbox}} (potentially 16k articles). I'll write some notes, ideas & suggestions for Module:MolarMass.

  • The template is in wikicode, not Lua.
  • Source is CIAAW 2013 (see template documentation). I found that the best standard. Non-stable isotopes CIAAW does not mention, I've used our habit of using the most stable isotope (integer then). Could be called OR?
  • Since rounding (number of decimals) can be set, default is 2, an incorredct precision suggestion can be introduced (too many zeros): Pb, round=6: 207.2 g·mol−1 Red XN. Also, when doing the calculation for NaCl:
Na: 22.98976928 g·mol−1
Cl: 35.45 g·mol−1
NaCl: 58.44 g·mol−1 Red XN: the result should be rounded to the lowest precision used, i.e. 2 decimals because of Cl. Note that the intermediate results should not be rounded. (in play when subscripts are used like in H2O).
  • The template does not uses other available info, eg the [a, b] range notation or the bracketed uncertainty like 12.345(6). Would require Lua to use this (to produce MW with uncertainty range!).
  • When in Lua, an extra feature could be added: compare the value with a hardcoded input (eg |molecular_weight=123.56 in a {{Drugbox}} article). A big difference then could be categorised for a maintenance check. -DePiep (talk) 12:49, 16 June 2015 (UTC)[reply]
question: What do you mean with [a, b] range notation? Christian75 (talk) 14:11, 16 June 2015 (UTC)[reply]
See CIAAW e.g. for H. (Also the spreadsheet link on that page has interesting notes on these calculations). So far, the only documentation for the numbers the template uses is in its /doc page. -DePiep (talk) 14:16, 16 June 2015 (UTC)[reply]
  • Another point of interest. For example aspirin, C
    9
    H
    8
    O
    4
    : 180.159 g·mol−1 by {{Chem molar mass}}.
But PubChem says 180.15742 g/mol CID 2244.
An explanation on the PubChem site would help clarifying, but so far I could not find the values they use. And if I do, we'd have to weigh correctness somebhow. -DePiep (talk) 10:48, 17 June 2015 (UTC)[reply]
The discussion above is closed. Please do not modify it. Subsequent comments should be made on the appropriate discussion page. No further edits should be made to this discussion.

—I'm transcluding this discussion section to Template talk:Chem molar mass, where I will add some comments. Wbm1058 (talk) 15:07, 3 July 2015 (UTC)[reply]

OK. I closed this one to prevent multipage-talks. -DePiep (talk) 12:08, 4 July 2015 (UTC)[reply]