nucleus_type Derived Type

type, public, extends(particle_type) :: nucleus_type

type representing a nucleus


Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: id

particle id

real(kind=dp), public :: charge

particle charge

real(kind=dp), public :: mass

particle mass

real(kind=dp), public, dimension(:), pointer:: coordinate=> null()

pointer to coordinate of the particle

real(kind=dp), public, dimension(:), pointer:: force=> null()

pointer to force acting on particle

logical, public :: overlapped

flag indicating that the particle is treated by some other code

integer, public :: species_id

id of CPMD species

integer, public :: atom_id

id of CPMD atom


Type-Bound Procedures

procedure, private :: init_nucleus

  • private subroutine init_nucleus(this, id, species_id, atom_id, charge, coordinate, force, overlapped)

    Arguments

    TypeIntentOptionalAttributesName
    class(nucleus_type), intent(inout) :: this
    integer, intent(in) :: id
    integer, intent(in) :: species_id
    integer, intent(in) :: atom_id
    real(kind=dp), intent(in) :: charge
    real(kind=dp), intent(in), dimension(:), target:: coordinate
    real(kind=dp), intent(in), dimension(:), target:: force
    logical, intent(in) :: overlapped

generic, public :: init => init_nucleus

  • private subroutine init_nucleus(this, id, species_id, atom_id, charge, coordinate, force, overlapped)

    Arguments

    TypeIntentOptionalAttributesName
    class(nucleus_type), intent(inout) :: this
    integer, intent(in) :: id
    integer, intent(in) :: species_id
    integer, intent(in) :: atom_id
    real(kind=dp), intent(in) :: charge
    real(kind=dp), intent(in), dimension(:), target:: coordinate
    real(kind=dp), intent(in), dimension(:), target:: force
    logical, intent(in) :: overlapped

Source Code

    type, extends(particle_type) :: nucleus_type
        private
        !> id of CPMD species
        integer, public :: species_id
        !> id of CPMD atom
        integer, public :: atom_id
    contains
        private
        procedure :: init_nucleus
        generic, public :: init => init_nucleus
    end type nucleus_type