Octopus
unit_oct_m Module Reference

brief This module defines the class unit_t which is used by the unit_systems_oct_m module. More...

Detailed Description

brief This module defines the class unit_t which is used by the unit_systems_oct_m module.

Atomic weights should be read in "atomic mass units" (u) (not to be confused with mass in "atomic units"), that is, it should be given the relative atomic weight). 1 u is roughly the mass of the proton, and exactly one twelfth of mass of the ^{12}C isotope. The relation of the atomic mass unit and the atomic unit of mass, au_[mass], is:

1 au_[mass] = 5.485799110e-4 u

The atomic unit of mass is the mass of the electron. Unfortunately, the code uses units of mass of (eV/A^2)(h/(2pieV))^2, which are related to atomic units through 1 cu_[mass] = 7.619963358 au_[mass] . So:

1 u = (1/5.485799110e-4) au_[mass] = (1/5.485799110e-4) * (1/7.619963358) cu_[mass] = 239.225360 cu_[mass].

Data Types

interface  operator(*)
 
interface  operator(**)
 
interface  operator(/)
 
interface  sqrt
 
type  unit_t
 
interface  units_from_atomic
 
interface  units_to_atomic
 

Functions/Subroutines

real(real64) elemental pure function dunits_to_atomic (this, val)
 
complex(real64) elemental pure function zunits_to_atomic (this, val)
 
real(real64) elemental pure function dunits_from_atomic (this, val)
 
complex(real64) elemental pure function zunits_from_atomic (this, val)
 
character(len=20) pure function, public units_abbrev (this)
 
type(unit_t) pure function units_multiply (aa, bb)
 
type(unit_t) pure function units_divide (aa, bb)
 
type(unit_t) pure function units_pow (aa, nn)
 
type(unit_t) pure function units_sqrt (aa)
 

Function/Subroutine Documentation

◆ dunits_to_atomic()

real(real64) elemental pure function unit_oct_m::dunits_to_atomic ( type(unit_t), intent(in)  this,
real(real64), intent(in)  val 
)
private

Definition at line 182 of file unit.F90.

◆ zunits_to_atomic()

complex(real64) elemental pure function unit_oct_m::zunits_to_atomic ( type(unit_t), intent(in)  this,
complex(real64), intent(in)  val 
)
private

Definition at line 192 of file unit.F90.

◆ dunits_from_atomic()

real(real64) elemental pure function unit_oct_m::dunits_from_atomic ( type(unit_t), intent(in)  this,
real(real64), intent(in)  val 
)
private

Definition at line 202 of file unit.F90.

◆ zunits_from_atomic()

complex(real64) elemental pure function unit_oct_m::zunits_from_atomic ( type(unit_t), intent(in)  this,
complex(real64), intent(in)  val 
)
private

Definition at line 212 of file unit.F90.

◆ units_abbrev()

character(len=20) pure function, public unit_oct_m::units_abbrev ( type(unit_t), intent(in)  this)

Definition at line 222 of file unit.F90.

◆ units_multiply()

type(unit_t) pure function unit_oct_m::units_multiply ( type(unit_t), intent(in)  aa,
type(unit_t), intent(in)  bb 
)
private

Definition at line 230 of file unit.F90.

◆ units_divide()

type(unit_t) pure function unit_oct_m::units_divide ( type(unit_t), intent(in)  aa,
type(unit_t), intent(in)  bb 
)
private

Definition at line 241 of file unit.F90.

◆ units_pow()

type(unit_t) pure function unit_oct_m::units_pow ( type(unit_t), intent(in)  aa,
integer, intent(in)  nn 
)
private

Definition at line 251 of file unit.F90.

◆ units_sqrt()

type(unit_t) pure function unit_oct_m::units_sqrt ( type(unit_t), intent(in)  aa)
private

Definition at line 289 of file unit.F90.