Octopus
unit_system_oct_m Module Reference

This module defines the unit system, used for input and output. More...

Detailed Description

This module defines the unit system, used for input and output.

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

Data Types

type  unit_system_t
 

Functions/Subroutines

subroutine, public unit_system_init (namespace)
 
subroutine, public unit_system_get (uu, cc)
 
subroutine unit_system_init_atomic (uu)
 These routines output the unit-conversion factors, defined by [a.u.] = input*u.unit, output = [a.u.]/u.unit. More...
 
subroutine unit_system_init_ev_ang (uu)
 
subroutine, public unit_system_from_file (uu, fname, namespace, ierr)
 This is a very primitive procedure that attempts to find out which units were used to write an octopus file, whether "multipoles", "cross_section_tensor", etc. More...
 

Variables

type(unit_system_t), public units_inp
 the units systems for reading and writing More...
 
type(unit_system_t), public units_out
 
type(unit_t), public unit_one
 some special units required for particular quantities More...
 
type(unit_t), public unit_angstrom
 For XYZ files. More...
 
type(unit_t), public unit_ppm
 Parts per million. More...
 
type(unit_t), public unit_debye
 For dipoles. More...
 
type(unit_t), public unit_invcm
 For vibrational frequencies. More...
 
type(unit_t), public unit_susc_ppm_cgs
 Some magnetic stuff. More...
 
type(unit_t), public unit_kelvin
 For converting energies into temperatures. More...
 
type(unit_t), public unit_femtosecond
 Time in femtoseconds. More...
 
type(unit_t), public unit_amu
 Mass in atomic mass units (AKA Dalton). More...
 
type(unit_t), public unit_kilobytes
 For small amounts of data (natural code units are bytes) More...
 
type(unit_t), public unit_megabytes
 For large amounts of data (natural code units are bytes) More...
 
type(unit_t), public unit_gigabytes
 For larger amounts of data (natural code units are bytes) More...
 
type(unit_t), public unit_ev
 For output energies in eV. More...
 
integer, parameter, public units_atomic = 0
 
integer, parameter, public units_eva = 1
 
integer, parameter, public units_fs = 2
 

Function/Subroutine Documentation

◆ unit_system_init()

subroutine, public unit_system_oct_m::unit_system_init ( type(namespace_t), intent(in)  namespace)

Definition at line 184 of file unit_system.F90.

◆ unit_system_get()

subroutine, public unit_system_oct_m::unit_system_get ( type(unit_system_t), intent(out)  uu,
integer, intent(in)  cc 
)

Definition at line 370 of file unit_system.F90.

◆ unit_system_init_atomic()

subroutine unit_system_oct_m::unit_system_init_atomic ( type(unit_system_t), intent(out)  uu)
private

These routines output the unit-conversion factors, defined by [a.u.] = input*u.unit, output = [a.u.]/u.unit.

Definition at line 394 of file unit_system.F90.

◆ unit_system_init_ev_ang()

subroutine unit_system_oct_m::unit_system_init_ev_ang ( type(unit_system_t), intent(out)  uu)
private

Definition at line 443 of file unit_system.F90.

◆ unit_system_from_file()

subroutine, public unit_system_oct_m::unit_system_from_file ( type(unit_system_t), intent(inout)  uu,
character(len=*), intent(in)  fname,
type(namespace_t), intent(in)  namespace,
integer, intent(inout)  ierr 
)

This is a very primitive procedure that attempts to find out which units were used to write an octopus file, whether "multipoles", "cross_section_tensor", etc.

Todo:
Although it seems to work in most cases, it is obviously a very weak code.

Definition at line 490 of file unit_system.F90.

Variable Documentation

◆ units_inp

type(unit_system_t), public unit_system_oct_m::units_inp

the units systems for reading and writing

Definition at line 161 of file unit_system.F90.

◆ units_out

type(unit_system_t), public unit_system_oct_m::units_out

Definition at line 161 of file unit_system.F90.

◆ unit_one

type(unit_t), public unit_system_oct_m::unit_one

some special units required for particular quantities

For unitless quantities and arithmetics with units.

Definition at line 164 of file unit_system.F90.

◆ unit_angstrom

type(unit_t), public unit_system_oct_m::unit_angstrom

For XYZ files.

Definition at line 165 of file unit_system.F90.

◆ unit_ppm

type(unit_t), public unit_system_oct_m::unit_ppm

Parts per million.

Definition at line 166 of file unit_system.F90.

◆ unit_debye

type(unit_t), public unit_system_oct_m::unit_debye

For dipoles.

Definition at line 167 of file unit_system.F90.

◆ unit_invcm

type(unit_t), public unit_system_oct_m::unit_invcm

For vibrational frequencies.

Definition at line 168 of file unit_system.F90.

◆ unit_susc_ppm_cgs

type(unit_t), public unit_system_oct_m::unit_susc_ppm_cgs

Some magnetic stuff.

Definition at line 169 of file unit_system.F90.

◆ unit_kelvin

type(unit_t), public unit_system_oct_m::unit_kelvin

For converting energies into temperatures.

Definition at line 170 of file unit_system.F90.

◆ unit_femtosecond

type(unit_t), public unit_system_oct_m::unit_femtosecond

Time in femtoseconds.

Definition at line 171 of file unit_system.F90.

◆ unit_amu

type(unit_t), public unit_system_oct_m::unit_amu

Mass in atomic mass units (AKA Dalton).

Definition at line 172 of file unit_system.F90.

◆ unit_kilobytes

type(unit_t), public unit_system_oct_m::unit_kilobytes

For small amounts of data (natural code units are bytes)

Definition at line 173 of file unit_system.F90.

◆ unit_megabytes

type(unit_t), public unit_system_oct_m::unit_megabytes

For large amounts of data (natural code units are bytes)

Definition at line 174 of file unit_system.F90.

◆ unit_gigabytes

type(unit_t), public unit_system_oct_m::unit_gigabytes

For larger amounts of data (natural code units are bytes)

Definition at line 175 of file unit_system.F90.

◆ unit_ev

type(unit_t), public unit_system_oct_m::unit_ev

For output energies in eV.

Definition at line 176 of file unit_system.F90.

◆ units_atomic

integer, parameter, public unit_system_oct_m::units_atomic = 0

Definition at line 178 of file unit_system.F90.

◆ units_eva

integer, parameter, public unit_system_oct_m::units_eva = 1

Definition at line 178 of file unit_system.F90.

◆ units_fs

integer, parameter, public unit_system_oct_m::units_fs = 2

Definition at line 178 of file unit_system.F90.