atomic_structure_init Function

public function atomic_structure_init(self, natoms) result(ok)

Type Bound

atomic_structure

Arguments

Type IntentOptional Attributes Name
class(atomic_structure) :: self
integer :: natoms

Return Value integer(kind=c_int)


Calls

proc~~atomic_structure_init~~CallsGraph proc~atomic_structure_init atomic_structure%atomic_structure_init proc~atomic_structure_clean atomic_structure%atomic_structure_clean proc~atomic_structure_init->proc~atomic_structure_clean

Source Code

  function atomic_structure_init(self, natoms) result(ok)
    class(atomic_structure) :: self
    integer :: natoms
    integer(c_int) :: ok
    ok = self%clean()
    if (ok /= 0) return
    allocate( self%zn(natoms) &
            , self%mass(natoms) &
            , self%grad(3,natoms) &
            , self%xyz(3,natoms) &
            , stat=ok)
!      character(len=2) :: Symbol   !< Atomic symbol
  end function atomic_structure_init