<atom>

Represents a chemical element by symbol or atomic number, exposing its periodic-table properties

<atom> is a Subject-specific component that renders the atomic symbol for an element, and contains numerous built-in chemical properties.

Attributes and Properties

Attributes for <atom>

Number display (5)
avoidScientificNotation

boolean. Default value: false. Whether to render numbers in full decimal form rather than scientific notation.

displayDecimals

integer. Default value: 2. Number of decimal places to display when rendering this number.

displayDigits

integer. Default value: 3. Number of significant digits to display when rendering this number.

displaySmallAsZero

number. Default value: 1e-14. Threshold below which numbers are displayed as zero.

padZeros

boolean. Default value: false. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Other (2)

integer. The atomic number of the atom (number of protons).

text. The chemical symbol of the atom (e.g. "H", "He", "Li").

Common to all components (9)
copy

reference. Create an independent copy of another component by reference. Enter a references a $name.

disabled

boolean. Default value: false. Whether this component is disabled and cannot be interacted with.

extend

reference. Extend another component by reference, inheriting its children and attributes. Enter a reference as $name.

fixed

boolean. Default value: false. Whether this component's value is fixed and cannot be modified.

fixLocation

boolean. Default value: false. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

hide

boolean. Default value: false. Whether to hide this component from the rendered output.

isResponse

boolean. Default value: false. Whether this component is treated as a response for the purposes of assessment.

name

text. The name used to reference this component from elsewhere in the document.

styleNumber

integer. Default value: 1. The style number used to select this component's visual styling from the available style definitions.

Properties for <atom name="a">

Number display (5)
$a.avoidScientificNotation

boolean. Whether to render numbers in full decimal form rather than scientific notation.

$a.displayDecimals

integer. Number of decimal places to display when rendering this number.

$a.displayDigits

integer. Number of significant digits to display when rendering this number.

$a.displaySmallAsZero

number. Threshold below which numbers are displayed as zero.

$a.padZeros

boolean. Whether to pad displayed numbers with trailing zeros to fill the requested digits/decimals.

Other (28)
$a.atomicMass

number. The atomic mass of the element.

$a.atomicNumber

integer. The atomic number of the element.

$a.atomicRadius

integer. The atomic radius of the element.

$a.backgroundColor

text. Human-readable name for this component's background color, derived from the active style and theme.

$a.boilingPoint

number. The boiling point of the element.

$a.chargeOfCommonIon

integer. The charge of the most common ion of this element.

$a.density

number. The density of the element at standard conditions.

$a.disabled

boolean. Whether this component is disabled and cannot be interacted with.

$a.electronConfiguration

electronConfiguration. The electron configuration of the element as a math expression.

$a.electronegativity

number. The Pauling electronegativity of the element.

$a.fixed

boolean. Whether this component's value is fixed and cannot be modified.

$a.fixLocation

boolean. Whether this component's location is fixed (preventing it from being moved while still allowing other modifications).

$a.group

integer. The group number of the element in the periodic table.

$a.groupName

text. The descriptive name of the element's periodic group (e.g. "Alkali metals").

$a.hidden

boolean. Whether this component is hidden from the rendered output.

$a.ionizationEnergy

number. The first ionization energy of the element.

$a.latex

latex. The atom rendered as a LaTeX string.

$a.math

math. The atom rendered as a math expression with the element symbol.

$a.meltingPoint

number. The melting point of the element.

$a.metalCategory

text. The metal category of the element (e.g. alkali metal, transition metal, nonmetal).

$a.name

text. The full name of the element.

$a.orbitalDiagram

orbitalDiagram. The orbital diagram of the element.

$a.period

integer. The period number of the element in the periodic table.

$a.phaseAtSTP

text. The phase (solid, liquid, or gas) of the element at standard temperature and pressure.

$a.symbol

text. The chemical symbol of the element.

$a.text

text. The atom rendered as a plain text string.

$a.textColor

text. Human-readable name for this component's text color, derived from the active style and theme.

$a.textStyleDescription

text. Human-readable description of this component's text styling (color and any background color).

Common to all components (4)
$a.doenetML

text. The DoenetML source code that produced this component.

$a.hide

boolean. Whether to hide this component from the rendered output.

$a.isResponse

boolean. Whether this component is treated as a response for the purposes of assessment.

$a.styleNumber

integer. The style number used to select this component's visual styling from the available style definitions.

Examples

Example: Define an <atom> with atomic number

An <atom> component may defined by specifying either its atomic number or its symbol. Once defined, there are many built-in properties of <atom> that can be accessed.


Example: Define an <atom> with its symbol

An <atom> component may defined by specifying either its atomic number or its symbol. Once defined, there are many built-in properties of <atom> that can be accessed.


Example: All the properties at once

The listing above includes all of the chemical properties currently available to the <atom> component.

Attribute Examples

Attribute Example: symbol

The symbol attribute takes the atom’s chemical symbol as input.


Attribute Example: atomicNumber

The atomicNumber attribute takes the atom’s atomic number as input.