From 2ac3465290e4336ab1236504249e08f766a1a093 Mon Sep 17 00:00:00 2001 From: "Documenter.jl" Date: Thu, 14 Nov 2024 23:55:57 +0000 Subject: [PATCH] build based on 51ae4f8 --- dev/.documenter-siteinfo.json | 2 +- dev/api/index.html | 20 ++++++++++---------- dev/index.html | 2 +- dev/manual/construction/index.html | 2 +- dev/manual/getting-started/index.html | 2 +- dev/manual/particle-types/index.html | 2 +- 6 files changed, 15 insertions(+), 15 deletions(-) diff --git a/dev/.documenter-siteinfo.json b/dev/.documenter-siteinfo.json index 4972875..31bf2c8 100644 --- a/dev/.documenter-siteinfo.json +++ b/dev/.documenter-siteinfo.json @@ -1 +1 @@ -{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-14T21:45:09","documenter_version":"1.8.0"}} \ No newline at end of file +{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-14T23:55:53","documenter_version":"1.8.0"}} \ No newline at end of file diff --git a/dev/api/index.html b/dev/api/index.html index 52af7b3..94fda94 100644 --- a/dev/api/index.html +++ b/dev/api/index.html @@ -1,5 +1,5 @@ -API Reference · ChargedParticles.jl

API Reference

Types

ChargedParticles.ChargedParticleImplType
ChargedParticleImpl <: AbstractParticle

Implementation type for charged particles.

Fields

  • symbol::Symbol: Chemical symbol or particle identifier (e.g., :Fe, :e, :μ)
  • charge_number::Int: Number of elementary charges (can be negative)
  • mass_number::Int: Total number of nucleons (protons + neutrons)
  • mass::Unitful.Mass: Mass of the particle in appropriate units

Notes

  • Mass number : For elementary particles like electrons and muons, mass_number is 0
  • Charge number : electrical charge in units of the elementary charge, usually denoted as z. https://en.wikipedia.org/wiki/Charge_number
source

Constructors

ChargedParticles.ParticleFunction
Particle(str::AbstractString; mass_numb=nothing, Z=nothing)

Create a particle from a string representation.

Arguments

  • str::AbstractString: String representation of the particle

String Format Support

  • Element symbols: "Fe", "He"
  • Isotopes: "Fe-56", "D"
  • Ions: "Fe2+", "H-"
  • Common aliases: "electron", "proton", "alpha", "mu-"

Examples

# Elementary particles
+API Reference · ChargedParticles.jl

API Reference

Types

ChargedParticles.ChargedParticleImplType
ChargedParticleImpl <: AbstractParticle

Implementation type for charged particles.

Fields

  • symbol::Symbol: Chemical symbol or particle identifier (e.g., :Fe, :e, :μ)
  • charge_number::Int: Number of elementary charges (can be negative)
  • mass_number::Int: Total number of nucleons (protons + neutrons)
  • mass::Unitful.Mass: Mass of the particle in appropriate units

Notes

  • Mass number : For elementary particles like electrons and muons, mass_number is 0
  • Charge number : electrical charge in units of the elementary charge, usually denoted as z. https://en.wikipedia.org/wiki/Charge_number
source

Constructors

ChargedParticles.ParticleFunction
Particle(str::AbstractString; mass_numb=nothing, Z=nothing)

Create a particle from a string representation.

Arguments

  • str::AbstractString: String representation of the particle

String Format Support

  • Element symbols: "Fe", "He"
  • Isotopes: "Fe-56", "D"
  • Ions: "Fe2+", "H-"
  • Common aliases: "electron", "proton", "alpha", "mu-"

Examples

# Elementary particles
 electron = Particle("e-")
 muon = Particle("mu-")
 positron = Particle("e+")
@@ -8,34 +8,34 @@
 proton = Particle("H+")
 alpha = Particle("He2+")
 deuteron = Particle("D+")
-iron56 = Particle("Fe-56")
source
Particle(sym::Symbol)

Create a particle from its symbol representation.

Examples

# Elementary particles
+iron56 = Particle("Fe-56")
source
Particle(sym::Symbol)

Create a particle from its symbol representation.

Examples

# Elementary particles
 electron = Particle(:e)
 muon = Particle(:muon)
-proton = Particle(:p)
source
Particle(atomic_number::Int; mass_numb=nothing, Z=0)

Create a particle from its atomic number with optional mass number and charge state.

Arguments

  • atomic_number::Int: The atomic number (number of protons)
  • mass_numb=nothing: Optional mass number (total number of nucleons)
  • Z=0: Optional charge number (in elementary charge units)

Examples

# Basic construction
+proton = Particle(:p)
source
Particle(atomic_number::Int; mass_numb=nothing, Z=0)

Create a particle from its atomic number with optional mass number and charge state.

Arguments

  • atomic_number::Int: The atomic number (number of protons)
  • mass_numb=nothing: Optional mass number (total number of nucleons)
  • Z=0: Optional charge number (in elementary charge units)

Examples

# Basic construction
 iron = Particle(26)        # Iron
 u = Particle(92)          # Uranium
 
 # With mass number and charge
 fe56_3plus = Particle(26, mass_numb=56, Z=3)  # Fe-56³⁺
-he4_2plus = Particle(2, mass_numb=4, Z=2)     # ⁴He²⁺ (alpha particle)

See also: Particle(::AbstractString)

source

Properties

ChargedParticles.atomic_numberFunction
atomic_number(p::AbstractParticle)

Return the atomic number (number of protons) of the particle.

Examples

```julia fe = Particle("Fe") println(atomic_number(fe)) # 26

e = electron() println(atomic_number(e)) # 0

source

Properties

ChargedParticles.atomic_numberFunction
atomic_number(p::AbstractParticle)

Return the atomic number (number of protons) of the particle.

Examples

```julia fe = Particle("Fe") println(atomic_number(fe)) # 26

e = electron() println(atomic_number(e)) # 0

source
ChargedParticles.mass_numberFunction
mass_number(p::AbstractParticle)

Return the mass number (total number of nucleons) of the particle.

Examples

fe56 = Particle("Fe-56")
 println(mass_number(fe56))  # 56
 
 e = electron()
-println(mass_number(e))  # 0
source

Type Checking

ChargedParticles.is_ionFunction
is_ion(p::AbstractParticle)

Check if the particle is an ion (has non-zero charge and is not an elementary particle).

Examples

julia> is_ion(Particle("Fe3+"))
+println(mass_number(e))  # 0
source

Type Checking

ChargedParticles.is_ionFunction
is_ion(p::AbstractParticle)

Check if the particle is an ion (has non-zero charge and is not an elementary particle).

Examples

julia> is_ion(Particle("Fe3+"))
 true
 julia> is_ion(Particle("Fe"))
 false
 julia> is_ion(electron())
-false
source
ChargedParticles.is_chemical_elementFunction
is_chemical_element(p::AbstractParticle)

Check if the particle is a chemical element.

Examples

julia> is_chemical_element(Particle("Fe"))
 true
 julia> is_chemical_element(electron())
-false
source
ChargedParticles.is_default_isotopeFunction
is_default_isotope(p::AbstractParticle)

Check if the particle is the default isotope of its element.

Examples

julia> is_default_isotope(Particle("Fe-56"))
+false
source
ChargedParticles.is_default_isotopeFunction
is_default_isotope(p::AbstractParticle)

Check if the particle is the default isotope of its element.

Examples

julia> is_default_isotope(Particle("Fe-56"))
 true
 julia> is_default_isotope(Particle("Fe-57"))
-false
source
ChargedParticles.is_protonFunction
is_proton(p::AbstractParticle)

Check if the particle is a proton (has symbol 'H', charge +1, and mass number 1).

Examples

julia> ChargedParticles.is_proton(proton())
+false
source
ChargedParticles.is_protonFunction
is_proton(p::AbstractParticle)

Check if the particle is a proton (has symbol 'H', charge +1, and mass number 1).

Examples

julia> ChargedParticles.is_proton(proton())
 true
 julia> ChargedParticles.is_proton(electron())
-false
source
ChargedParticles.is_electronFunction
is_electron(p::AbstractParticle)

Check if the particle is an electron (has symbol 'e', charge -1, and electron mass).

Examples

julia> ChargedParticles.is_electron(electron())
+false
source
ChargedParticles.is_electronFunction
is_electron(p::AbstractParticle)

Check if the particle is an electron (has symbol 'e', charge -1, and electron mass).

Examples

julia> ChargedParticles.is_electron(electron())
 true
 julia> ChargedParticles.is_electron(proton())
-false
source

Constants

ChargedParticles.PARTICLE_ALIASESConstant
PARTICLE_ALIASES

Dictionary of common particle aliases and their corresponding (symbol, charge, mass_number) tuples.

Each entry maps a string alias to a tuple of (symbol, charge, mass_number)

source
+false
source

Constants

ChargedParticles.PARTICLE_ALIASESConstant
PARTICLE_ALIASES

Dictionary of common particle aliases and their corresponding (symbol, charge, mass_number) tuples.

Each entry maps a string alias to a tuple of (symbol, charge, mass_number)

source
diff --git a/dev/index.html b/dev/index.html index 41124be..5f7f5bc 100644 --- a/dev/index.html +++ b/dev/index.html @@ -21,4 +21,4 @@ Alpha particle charge: 3.204353268e-19 C Iron charge: 4.806529901999999e-19 C Iron-56 mass number: 56 -Deuteron mass: 1.008 u

Manual Outline

+Deuteron mass: 1.008 u

Manual Outline

diff --git a/dev/manual/construction/index.html b/dev/manual/construction/index.html index 4df4e76..a92dc99 100644 --- a/dev/manual/construction/index.html +++ b/dev/manual/construction/index.html @@ -67,4 +67,4 @@ catch e println("Error: ", e) end
Error: KeyError(:XX)
-Error: KeyError(-1)
+Error: KeyError(-1) diff --git a/dev/manual/getting-started/index.html b/dev/manual/getting-started/index.html index 4203d4b..4588f05 100644 --- a/dev/manual/getting-started/index.html +++ b/dev/manual/getting-started/index.html @@ -55,4 +55,4 @@ println("Deuteron mass number: ", mass_number(deuteron)) println("Tritium mass number: ", mass_number(tritium))
Fe-56 mass number: 56
 Deuteron mass number: 2
-Tritium mass number: 3
+Tritium mass number: 3 diff --git a/dev/manual/particle-types/index.html b/dev/manual/particle-types/index.html index 565bcf5..a3c0fc4 100644 --- a/dev/manual/particle-types/index.html +++ b/dev/manual/particle-types/index.html @@ -48,4 +48,4 @@ t = Particle("T+") println("Triton: A = $(mass_number(t))")
Alpha: Z = 2, A = 4
 Deuteron: A = 2
-Triton: A = 3
+Triton: A = 3