quantum_fragment_type Derived Type

type, public :: quantum_fragment_type

quantum system representation (currently can only be one per simulation)


Contents

Source Code


Components

TypeVisibilityAttributesNameInitial
integer, public :: id

id of the quantum fragment

integer, public :: num_nuclei

number of nuclei

real(kind=dp), public :: charge

total charge

real(kind=dp), public :: nuclear_charge

nuclear charge

real(kind=dp), public :: electronic_charge

electron charge

type(nucleus_type), public, dimension(:), allocatable:: nuclei

array of nuclei

type(cell_type), public :: cell

simulation cell data

type(density_type), public :: density

grid representation of the electron density

type(potential_type), public :: potential

grid representation of the external potential

type(multipoles_type), public :: nuclear_multipoles

nuclear multipole moments

type(multipoles_type), public :: electronic_multipoles

electronic multipole moments


Type-Bound Procedures

procedure, public :: init => init_quantum_fragment

procedure, public :: compute_nuclear_multipoles

  • private subroutine compute_nuclear_multipoles(this, origin, order)

    compute multipole expansion of the electrostatic potential from a set of nuclei around an origin

    Arguments

    TypeIntentOptionalAttributesName
    class(quantum_fragment_type), intent(inout) :: this
    real(kind=dp), intent(in), dimension(3):: origin

    origin of the multipole expansion

    integer, intent(in) :: order

    order of the multipole expansion

procedure, public :: compute_electronic_multipoles

  • private subroutine compute_electronic_multipoles(this, expansion_origin, expansion_order, a_start, a_end)

    compute multipole expansion of the electrostatic potential from an electronic density (which is represented on a grid) around an origin

    Arguments

    TypeIntentOptionalAttributesName
    class(quantum_fragment_type), intent(inout) :: this
    real(kind=dp), intent(in), dimension(3):: expansion_origin

    origin of the multipole expansion

    integer, intent(in) :: expansion_order

    order of the multipole expansion

    integer, intent(in) :: a_start

    start index of real space mesh of lattice vector a

    integer, intent(in) :: a_end

    end index of real space mesh of lattice vector a

procedure, public :: centroid => quantum_fragment_centroid

  • private pure function quantum_fragment_centroid(this) result(centroid)

    compute quantum-fragment centroid

    Arguments

    TypeIntentOptionalAttributesName
    class(quantum_fragment_type), intent(in) :: this

    Return Value real(kind=dp),dimension(3)

procedure, public :: center_of_mass => quantum_fragment_center_of_mass

procedure, public :: center_of_charge => quantum_fragment_center_of_charge

Source Code

    type :: quantum_fragment_type
        private
        !> id of the quantum fragment
        integer, public :: id
        !> number of nuclei
        integer, public :: num_nuclei
        !> total charge
        real(dp), public :: charge
        !> nuclear charge
        real(dp), public :: nuclear_charge
        !> electron charge
        real(dp), public :: electronic_charge
        !> array of nuclei
        type(nucleus_type), dimension(:), allocatable, public :: nuclei
        !> simulation cell data
        type(cell_type), public :: cell
        !> grid representation of the electron density
        type(density_type), public :: density
        !> grid representation of the external potential
        type(potential_type), public :: potential
        !> nuclear multipole moments
        type(multipoles_type), public :: nuclear_multipoles
        !> electronic multipole moments
        type(multipoles_type), public :: electronic_multipoles
    contains
        private
        procedure, public :: init => init_quantum_fragment
        procedure, public :: compute_nuclear_multipoles
        procedure, public :: compute_electronic_multipoles
        procedure, public :: centroid => quantum_fragment_centroid
        procedure, public :: center_of_mass => quantum_fragment_center_of_mass
        procedure, public :: center_of_charge => quantum_fragment_center_of_charge
    end type quantum_fragment_type