Species
Introduction
Species is a type that stores information about a particle.
Getter Functions
massof()chargeof()nameof()kindof()
To access mass or charge of a species, use massof() getter function for mass, and chargeof() getter function for charge. The function will return unit given to @APCdef. See this page for more information.
Use the function nameof() to access the species name.
kindof() returns the kind of the Species.
Construct a Species
Use the constructor Species(::String) to create a species.
Note: Species names follow the OpenPMD standard.
Constructing a Null Species
The Null species is useful for bookkeeping purposes, such as a placeholder in a struct component to indicate an unset species. To instantiate:
julia> Species("Null")
julia> Species() # Same as aboveConstructing Subatomic Species
To construct a subatomic species, provide the exact name of the particle in the name field. Note that the name must be provided exactly.
Example:
julia> Species("electron")For antiparticles, prepend "anti-" to the name.
Example:
julia> Species("anti-proton")See the list of all available subatomic species at the end of this page.
Constructing Atomic Species
To construct an atomic species, include these components in name:
- Atomic Symbol
 - Mass number of the atom (optional), format:
- Mass number before the atomic symbol (accepts unicode superscript)
 - Optional "#" symbol at the beginning
 - If not specified, uses the average of the mass in naturally occurring samples.
 
 - These formats all represent Hydrogen-1:
 
julia> Species("1H")
julia> Species("¹H")
julia> Species("#1H")- Charge (optional), format (all accept unicode superscript):
- "+" for single positive charge
 - "++" for double positive charge
 - "+n" or "n+" for n positive charges
 - "-" for single negative charge
 - "--" for double negative charge
 - "-n" or "n-" for n negative charges
 - Defaults to 0 if not specified
 
 - Add "anti-" prefix to construct an anti-atom
 
Example:
julia> Species("13C+")   # Carbon-13 with a single positive charge
julia> Species("¹⁵N³⁻")  # Nitrogen-15 with a 3 negative charge
julia> Species("Al+3")   # Average Aluminum with 3 positive charge
julia> Species("anti-H") # Anti-hydrogenList of Available Subatomic Species
anti-deuteronanti-electronorpositronanti-neutronanti-protonanti-muondeuteronelectronmuonneutronphotonpion0pion+pion-positronproton