1:24 AM
It starts with the pattern for keywords which is
'(\\$|\\b)' + hljs.IDENT_RE + '\\b'
. Since hljs.IDENT_RE
is defined as starting with a letter followed by \w*
it means that _
are allowed in the middle of symbol names. The list of symbols is not up-to-date AFAIK. Our numbers are definitely not hljs.C_NUMBER_MODE
, no pattern highlighting, etc..
I know that the list of symbols is huge for Mathematica. We could trim this down by converting it into a prefix tree.. and, oh god, someone already implemented this
3
2:13 AM
@bobthechemist - In your example you create a
Molecule
from a string in two very different ways. In Molecule[Entity["Chemical", mol]]
you make an entity first then convert it to a molecule. It looks to the knowledge base for an entity with a given standard name, and uses EntityValue to get properties (like coordinates). But when you type Molecule[mol]
it interprets the string locally.
9 hours later…
11:16 AM
@JasonB. Thanks for the clarification - is
Molecule
computing properties upon request or are values such as the point group in a lookup table? Also, tangentially related, how are we to know that "PointGroup" is a valid property when Molecule[mol]["Properties"]
does not indicate as such? (Granted, in this case one can find "PointGroupString", but I see nothing that suggests that "PointGroup" would work.) 12:14 PM
Molecule
computes everything as needed - so when you ask for Molecule["Methylnitrene"]["PointGroupString"]
it uses the name to create a SMILES string, then makes a chemical graph from the SMILES, computes 3D coordinates using distance geometry embedding, then the MMFF force field to minimize the coordinates, then finds the point group from those coordinates. « first day (3167 days earlier) ← previous day next day → last day (1474 days later) »