atom_type Derived Type

type, public, extends(nucleus_type) :: atom_type

type representing an atom


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

real(kind=dp), public :: radius

covalent radius

type(multipoles_type), public :: multipoles

multipoles


Type-Bound Procedures

procedure, private :: init_atom

  • private subroutine init_atom(this, id, species_id, atom_id, charge, radius, coordinate, force, multipoles, overlapped)

    Arguments

    TypeIntentOptionalAttributesName
    class(atom_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) :: radius
    real(kind=dp), intent(in), dimension(:), target:: coordinate
    real(kind=dp), intent(in), dimension(:), target:: force
    type(multipoles_type), intent(in) :: multipoles
    logical, intent(in) :: overlapped

generic, public :: init => init_nucleus, init_atom

  • 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
  • private subroutine init_atom(this, id, species_id, atom_id, charge, radius, coordinate, force, multipoles, overlapped)

    Arguments

    TypeIntentOptionalAttributesName
    class(atom_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) :: radius
    real(kind=dp), intent(in), dimension(:), target:: coordinate
    real(kind=dp), intent(in), dimension(:), target:: force
    type(multipoles_type), intent(in) :: multipoles
    logical, intent(in) :: overlapped

Source Code

    type, extends(nucleus_type) :: atom_type
        private
        !> covalent radius
        real(dp), public :: radius
        !> multipoles
        type(multipoles_type), public :: multipoles
    contains
        private
        procedure :: init_atom
        generic, public :: init => init_atom
    end type atom_type