physical_fragment_t Derived Type

type, public :: physical_fragment_t

Physical molecular fragment with atomic coordinates and properties

Represents a molecular fragment containing atomic positions, element types, electronic structure information, and basis set data for quantum calculations.


Inherits

type~~physical_fragment_t~~InheritsGraph type~physical_fragment_t physical_fragment_t type~molecular_basis_type molecular_basis_type type~physical_fragment_t->type~molecular_basis_type basis type~atomic_basis_type atomic_basis_type type~molecular_basis_type->type~atomic_basis_type elements type~cgto_type cgto_type type~atomic_basis_type->type~cgto_type shells

Inherited by

type~~physical_fragment_t~~InheritedByGraph type~physical_fragment_t physical_fragment_t type~displaced_geometry_t displaced_geometry_t type~displaced_geometry_t->type~physical_fragment_t geometry

Components

Type Visibility Attributes Name Initial
type(molecular_basis_type), public, allocatable :: basis

Gaussian basis functions

integer, public, allocatable :: cap_replaces_atom(:)

Original atom index that each cap replaces (size: n_caps)

integer, public :: charge = 0

Net molecular charge (electrons)

real(kind=dp), public, allocatable :: coordinates(:,:)

Cartesian coordinates (3, n_atoms) in Bohr

real(kind=dp), public :: distance = 0.0_dp

Minimal atomic distance between monomers in fragment (Angstrom, 0 for monomers)

integer, public, allocatable :: element_numbers(:)

Atomic numbers (Z values)

integer, public, allocatable :: local_to_global(:)

Map fragment atom index to system atom index (size: n_atoms - n_caps)

integer, public :: multiplicity = 1

Spin multiplicity (2S+1)

integer, public :: n_atoms

Number of atoms in this fragment

integer, public :: n_caps = 0

Number of hydrogen caps added (always at end of atom list)

integer, public :: nelec = 0

Total number of electrons


Type-Bound Procedures

procedure, public :: compute_nelec => fragment_compute_nelec

Calculate electron count

procedure, public :: destroy => fragment_destroy

Memory cleanup

  • private subroutine fragment_destroy(this)

    Clean up allocated memory in physical_fragment_t

    Arguments

    Type IntentOptional Attributes Name
    class(physical_fragment_t), intent(inout) :: this

procedure, public :: set_basis => fragment_set_basis

Assign basis set

Source Code

   type :: physical_fragment_t
      !! Physical molecular fragment with atomic coordinates and properties
      !!
      !! Represents a molecular fragment containing atomic positions, element types,
      !! electronic structure information, and basis set data for quantum calculations.
      integer :: n_atoms  !! Number of atoms in this fragment
      integer, allocatable :: element_numbers(:)     !! Atomic numbers (Z values)
      real(dp), allocatable :: coordinates(:, :)     !! Cartesian coordinates (3, n_atoms) in Bohr

      ! Electronic structure properties
      integer :: charge = 0        !! Net molecular charge (electrons)
      integer :: multiplicity = 1  !! Spin multiplicity (2S+1)
      integer :: nelec = 0         !! Total number of electrons

      ! Hydrogen capping for broken bonds
      integer :: n_caps = 0  !! Number of hydrogen caps added (always at end of atom list)
      integer, allocatable :: cap_replaces_atom(:)  !! Original atom index that each cap replaces (size: n_caps)

      ! Gradient redistribution support
      integer, allocatable :: local_to_global(:)  !! Map fragment atom index to system atom index (size: n_atoms - n_caps)

      ! Fragment distance (for screening)
      real(dp) :: distance = 0.0_dp  !! Minimal atomic distance between monomers in fragment (Angstrom, 0 for monomers)

      ! Quantum chemistry basis set
      type(molecular_basis_type), allocatable :: basis  !! Gaussian basis functions
   contains
      procedure :: destroy => fragment_destroy          !! Memory cleanup
      procedure :: compute_nelec => fragment_compute_nelec  !! Calculate electron count
      procedure :: set_basis => fragment_set_basis      !! Assign basis set
   end type physical_fragment_t