Species
ChemistryLab.CemSpeciesChemistryLab.SpeciesBase.isequalChemistryLab.aggregate_stateChemistryLab.atomsChemistryLab.atoms_chargeChemistryLab.cemformulaChemistryLab.chargeChemistryLab.check_mendeleevChemistryLab.classChemistryLab.componentsChemistryLab.formulaChemistryLab.nameChemistryLab.oxidesChemistryLab.oxides_chargeChemistryLab.propertiesChemistryLab.symbol
ChemistryLab.Species — Type
struct Species{T<:Number} <: AbstractSpeciesStandard chemical species representation using atomic composition.
Fields
name::String: human-readable name.symbol::String: species symbol.formula::Formula{T}: chemical formula with stoichiometric coefficients.aggregate_state::AggregateState: physical state.class::Class: chemical class.properties::OrderedDict{Symbol,PropertyType}: thermodynamic and other properties.
Examples
julia> s = Species("H2O"; name="Water", aggregate_state=AS_AQUEOUS);
julia> atoms(s)
OrderedDict{Symbol, Int64} with 2 entries:
:H => 2
:O => 1Base.isequal — Method
Base.isequal(s1::AbstractSpecies, s2::AbstractSpecies) -> BoolCompare two species for equality based on formula, aggregate state, and class.
Examples
julia> s1 = Species("H2O"; aggregate_state=AS_AQUEOUS);
julia> s2 = Species("H₂O"; aggregate_state=AS_AQUEOUS);
julia> s1 == s2
trueChemistryLab.charge — Method
charge(s::AbstractSpecies) -> Int8Return the formal charge of the species.
Examples
julia> s1 = Species("Ca(HSiO3)+");
julia> charge(s1) == 1
trueChemistryLab.CemSpecies — Type
struct CemSpecies{T<:Number,S<:Number} <: AbstractSpeciesCement chemistry species representation using oxide notation.
Fields
name::String: human-readable name.symbol::String: species symbol.formula::Formula{T}: atomic composition formula.cemformula::Formula{S}: oxide notation formula.aggregate_state::AggregateState: physical state.class::Class: chemical class.properties::OrderedDict{Symbol,PropertyType}: thermodynamic and other properties.
Examples
julia> s = CemSpecies("C3A"; name="Tricalcium aluminate");
julia> oxides(s)
OrderedDict{Symbol, Int64} with 2 entries:
:C => 3
:A => 1ChemistryLab.name — Method
name(s::AbstractSpecies) -> StringReturn the name of the species.
Examples
julia> s1 = Species("H2O"; aggregate_state=AS_AQUEOUS);
julia> s1.name == "H2O"
trueChemistryLab.symbol — Method
symbol(s::AbstractSpecies) -> StringReturn the symbol of the species.
ChemistryLab.formula — Method
formula(s::AbstractSpecies) -> FormulaReturn the Formula object associated with the species.
Examples
julia> s1 = Species("H2O"; aggregate_state=AS_AQUEOUS);
julia> formula(s1) == Formula("H2O")
trueChemistryLab.cemformula — Function
cemformula(s::CemSpecies) -> FormulaReturn the oxide notation formula of the cement species.
ChemistryLab.atoms — Method
atoms(s::AbstractSpecies) -> OrderedDict{Symbol,Number}Return the atomic composition (element => coefficient) of the species.
ChemistryLab.atoms_charge — Method
atoms_charge(s::AbstractSpecies) -> OrderedDict{Symbol,Number}Return atomic composition including the charge as a :Zz key if non-zero.
Examples
julia> s = Species("Ca+2");
julia> atoms_charge(s)
OrderedDict{Symbol, Int64} with 2 entries:
:Ca => 1
:Zz => 2ChemistryLab.oxides — Function
oxides(s::CemSpecies) -> OrderedDict{Symbol,Number}Return the oxide composition of the cement species.
ChemistryLab.oxides_charge — Function
oxides_charge(s::CemSpecies) -> OrderedDict{Symbol,Number}Return oxide composition including the charge as a :Zz key if non-zero.
ChemistryLab.components — Function
components(s::Species) -> OrderedDict{Symbol,Number}Return the components of a Species (atomic composition with charge).
components(s::CemSpecies) -> OrderedDict{Symbol,Number}Return the components of a CemSpecies (oxide composition with charge).
ChemistryLab.aggregate_state — Method
aggregate_state(s::AbstractSpecies) -> AggregateStateReturn the aggregate state of the species.
Examples
julia> s1 = Species("H2O"; aggregate_state=AS_AQUEOUS);
julia> aggregate_state(s1) == AS_AQUEOUS
trueChemistryLab.class — Method
class(s::AbstractSpecies) -> ClassReturn the chemical class of the species.
ChemistryLab.properties — Method
properties(s::AbstractSpecies) -> OrderedDict{Symbol,PropertyType}Return the properties dictionary of the species.
ChemistryLab.check_mendeleev — Method
check_mendeleev(s::AbstractSpecies) -> BoolValidate that all element symbols in the species exist in the periodic table.