mimic_particles Module

contains particle types



Contents


Derived Types

type, private, abstract :: particle_type

base type for particles

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

type, public, extends(particle_type) :: nucleus_type

type representing a nucleus

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
generic, public :: init => init_nucleus

type, public, extends(nucleus_type) :: atom_type

type representing an atom

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
generic, public :: init => init_nucleus, init_atom

type, public, extends(particle_type) :: site_type

non-atomic site (e.g. bond midpoints)

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

real(kind=dp), private, dimension(3):: internal_coordinate

coordinate of site

real(kind=dp), private, dimension(3):: internal_force

force acting on site

type(multipoles_type), public :: multipoles

multipoles associated with the site

Type-Bound Procedures

procedure, public :: init => init_site

Functions

public pure function compute_minimum_distance(particles_one, particles_two) result(minimum_distance)

computes minimum distance between two sets of particles

Arguments

TypeIntentOptionalAttributesName
class(particle_type), intent(in), dimension(:):: particles_one
class(particle_type), intent(in), dimension(:):: particles_two

Return Value real(kind=dp)

public pure function compute_centroid(particles) result(centroid)

compute centroid of a set of particles

Arguments

TypeIntentOptionalAttributesName
class(particle_type), intent(in), dimension(:):: particles

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

public pure function compute_center_of_mass(particles) result(center_of_mass)

compute center-of-mass of a set of particles

Arguments

TypeIntentOptionalAttributesName
class(particle_type), intent(in), dimension(:):: particles

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

public pure function compute_center_of_charge(particles) result(center_of_charge)

compute center-of-charge of a set particles

Arguments

TypeIntentOptionalAttributesName
class(particle_type), intent(in), dimension(:):: particles

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


Subroutines

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

private subroutine init_site(this, id, coordinate, force, multipoles, overlapped)

Arguments

TypeIntentOptionalAttributesName
class(site_type), intent(inout) :: this
integer, intent(in) :: id
real(kind=dp), intent(in), dimension(:):: coordinate
real(kind=dp), intent(in), dimension(:):: force
type(multipoles_type), intent(in), optional :: multipoles
logical, intent(in) :: overlapped