mctc_io_symbols Module

Handle conversion between element symbols and atomic numbers



Variables

Type Visibility Attributes Name Initial
integer, public, parameter :: symbol_length = 4

Maximum allowed length of element symbols


Interfaces

public interface get_identity

Get chemical identity

  • private pure subroutine get_identity_number(nid, identity, number)

    Get chemical identity from a list of atomic numbers

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(out) :: nid

    Number of unique species

    integer, intent(out) :: identity(:)

    Chemical identity

    integer, intent(in) :: number(:)

    Ordinal numbers

  • private pure subroutine get_identity_symbol(nid, identity, symbol)

    Get chemical identity from a list of element symbols

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(out) :: nid

    Number of unique species

    integer, intent(out) :: identity(:)

    Chemical identity

    character(len=*), intent(in) :: symbol(:)

    Element symbols


Functions

public elemental function to_lcsymbol(number) result(symbol)

Convert atomic number to element symbol

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: number

Atomic number

Return Value character(len=2)

Element symbol

public elemental function to_number(symbol) result(number)

Convert element symbol to atomic number

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: symbol

Element symbol

Return Value integer

Atomic number

public elemental function to_symbol(number) result(symbol)

Convert atomic number to element symbol

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: number

Atomic number

Return Value character(len=2)

Element symbol


Subroutines

public pure subroutine collect_identical(identity, mapping)

Establish a mapping between unique atom types and species

Arguments

Type IntentOptional Attributes Name
integer, intent(in) :: identity(:)

Chemical identity

integer, intent(out) :: mapping(:)

Mapping from unique atoms

public elemental subroutine number_to_lcsymbol(symbol, number)

Convert atomic number to element symbol

Arguments

Type IntentOptional Attributes Name
character(len=2), intent(out) :: symbol

Element symbol

integer, intent(in) :: number

Atomic number

public elemental subroutine number_to_symbol(symbol, number)

Convert atomic number to element symbol

Arguments

Type IntentOptional Attributes Name
character(len=2), intent(out) :: symbol

Element symbol

integer, intent(in) :: number

Atomic number

public elemental subroutine symbol_to_number(number, symbol)

Convert element symbol to atomic number

Arguments

Type IntentOptional Attributes Name
integer, intent(out) :: number

Atomic number

character(len=*), intent(in) :: symbol

Element symbol