srim.core package¶
Submodules¶
srim.core.element module¶
-
class
srim.core.element.
Element
(identifier, mass=None)¶ Bases:
object
Element from periodic table
Parameters: - identifier (
str
,int
) – Symbol, Name, or Atomic Number of element - mass (
float
, optional) – Mass [amu] of element. Default is most common isotope atomic weight
Examples
Constructing a Helium Atom.
>>> Element('He') <Element symbol:He name:Helium mass:4.00>
>>> Element('Helium') <Element symbol:He name:Helium mass:4.00>
>>> Element(2) <Element symbol:He name:Helium mass:4.00>
>>> Element('He', 4.3) <Element symbol:He name:Helium mass:4.30>
-
atomic_number
¶ Element’s atomic number
-
mass
¶ Element’s mass
-
name
¶ Element’s formal name
-
symbol
¶ Element’s atomic symbol
- identifier (
srim.core.elementdb module¶
-
class
srim.core.elementdb.
ElementDB
¶ Bases:
object
Element database at
srim.data.elements.yaml
-
classmethod
lookup
(identifier)¶ Looks up element from symbol, name, or atomic number
Parameters: identifier ( str
,int
) – Unique symbol, name, or atomic number of elementNotes
This class is used for creation of elements, ions, etc. but generally will not be needed by the user.
-
classmethod
-
srim.core.elementdb.
create_elementdb
()¶
srim.core.ion module¶
-
class
srim.core.ion.
Ion
(identifier, energy, mass=None)¶ Bases:
srim.core.element.Element
Representation of ion traveling through medium
Similar to
srim.core.element.Element
but associates an energy with the element.Parameters: - identifier (
str
,int
) – Symbol, Name, or Atomic Number of ion - energy (
float
) – Energy [eV] of ion - mass (
float
, optional) – Mass [amu] of element. Default is most common isotope atomic weight
Examples
Constructing a Helium Ion.
>>> Ion('He', 1e6) "<Ion element:He mass:4.00 energy:1.00e6 eV>"
>>> Ion('He', energy=1e6, mass=4.2) "<Ion element:He mass:4.20 energy:1.00e6 eV>"
-
energy
¶ Ion’s energy [eV]
-
velocity
¶ Ion’s velocity [m/s]
- identifier (
srim.core.layer module¶
-
class
srim.core.layer.
Layer
(elements, density, width, phase=0, name=None)¶ Bases:
srim.core.material.Material
Represents a layer in target
Parameters: - elements (
dict
) –- dictionary of elements (
srim.core.elements.Element
,str
, orint
) with properties stoich
(float, int, required): Stoichiometry of element (fraction)E_d
(float, int, optional): Displacement energy [eV] default 25.0 eVlattice
(float, int, optional): Lattice binding energies [eV] default 0.0 eVsurface
(float, int, optional): Surface binding energies [eV] default 3.0 eV
- dictionary of elements (
- density (
float
) – density [g/cm^3] of material - width (
float
) – width [Angstroms] of layer - phase (
int
) – phase of material (solid = 0, gas = 1). Default solid (0). - name (:obj:`str:, optional) – name of the Layer (defaults to chemical_formula)
Examples
Construct a layer of SiC with experimental values.
>>> Layer({ 'Si': { 'stoich': 0.5, 'E_d': 35.0, # Displacement Energy [eV] 'lattice': 0.0, 'surface': 3.0 }, 'C': { 'stoich': 0.5, 'E_d': 20.0, # Displacement Energy [eV] 'lattice': 0.0, 'surface': 3.0 }, density=3.21, width=10000.0)
-
classmethod
from_formula
(chemical_formula, density, width, phase=0, name=None)¶ Creation Layer from chemical formula string, density, width, phase, and name
Parameters: - chemical_formula (str) – see
srim.core.material.Material.from_formula()
for allowed formulas. Quite flexible. - density (
float
) – density [g/cm^3] of material - width (
float
) – width [Angstroms] of layer - phase (
int
) – phase of material (solid = 0, gas = 1). Default solid (0). - name (:obj:`str:, optional) – name of the Layer (defaults to chemical_formula)
Notes
This method is not used as much since you do not have an easy way to set the displacement energy.
- chemical_formula (str) – see
-
name
¶ Layer’s Name
-
width
¶ Layer’s width
- elements (
srim.core.material module¶
-
class
srim.core.material.
Material
(elements, density, phase=0)¶ Bases:
object
Material Representation
-
chemical_formula
¶ Material’s chemical formula
-
density
¶ Material’s density
-
classmethod
from_formula
(chemical_formula, density, phase=0)¶ Creation Material from chemical formula string and density
Parameters: - chemical_formula (
str
) – chemical formula string in specific format - density (
float
) – density [g/cm^3] of material - phase (
int
, optional) – phase of material (solid = 0, gas = 1). Default solid (0).
Notes
- Examples of chemical_formula that can be used:
- SiC
- CO2
- AuFe1.5
- Al10.0Fe90.0
Chemical Formula will be normalized to 1.0
- chemical_formula (
-
phase
¶ Material’s phase
-
srim.core.target module¶
-
class
srim.core.target.
Target
(layers)¶ Bases:
object
Target that Ion Impacts
Parameters: layers (list) – list of srim.core.layer.Layer
to construct TargetExamples
Lets construct a SiC target. While only one layer is shown an arbitrary number of them can be used.
>>> Target([Layer({ 'Si': { 'stoich': 0.5, 'E_d': 35.0, # Displacement Energy [eV] 'lattice': 0.0, 'surface': 3.0 }, 'C': { 'stoich': 0.5, 'E_d': 20.0, # Displacement Energy [eV] 'lattice': 0.0, 'surface': 3.0 }, density=3.21, width=10000.0)])
-
width
¶ total width of target (sum of layers)
-
srim.core.units module¶
Units module to convert some SI units to SRIM units
eV <-> J/eV
amu <-> kg/amu
srim.core.utils module¶
Utility functions that are used to construct Target and Ion
-
srim.core.utils.
check_input
(input_type, condition, value)¶
-
srim.core.utils.
is_greater_than_zero
(value)¶
-
srim.core.utils.
is_one_to_eight
(value)¶
-
srim.core.utils.
is_one_to_seven
(value)¶
-
srim.core.utils.
is_positive
(value)¶
-
srim.core.utils.
is_quoteless
(value)¶
-
srim.core.utils.
is_srim_degrees
(value)¶
-
srim.core.utils.
is_zero
(value)¶
-
srim.core.utils.
is_zero_or_one
(value)¶
-
srim.core.utils.
is_zero_to_five
(value)¶
-
srim.core.utils.
is_zero_to_two
(value)¶