number_to_lcsymbol Subroutine

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


Source Code

elemental subroutine number_to_lcsymbol(symbol, number)

   !> Atomic number
   integer, intent(in) :: number

   !> Element symbol
   character(len=2), intent(out) :: symbol

   if (number <= 0 .or. number > size(lcpse)) then
      symbol = '--'
   else
      symbol = lcpse(number)
   endif

end subroutine number_to_lcsymbol