mctc_io_dotfiles Module

Readers for .CHRG and .UHF auxiliary dot-files



Interfaces

public interface read_chrg

Read molecular charge from a .CHRG file or formatted unit

  • private subroutine read_chrg_from_file(charge, file, error)

    Read molecular charge from a file

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(out) :: charge

    Molecular charge

    character(len=*), intent(in) :: file

    Path to .CHRG file

    type(error_type), intent(out), allocatable :: error

    Error handling

  • private subroutine read_chrg_from_unit(charge, unit, error)

    Read molecular charge from an open formatted unit

    Arguments

    Type IntentOptional Attributes Name
    real(kind=wp), intent(out) :: charge

    Molecular charge

    integer, intent(in) :: unit

    Formatted input unit

    type(error_type), intent(out), allocatable :: error

    Error handling

public interface read_uhf

Read number of unpaired electrons from a .UHF file or formatted unit

  • private subroutine read_uhf_from_file(uhf, file, error)

    Read number of unpaired electrons from a file

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(out) :: uhf

    Number of unpaired electrons

    character(len=*), intent(in) :: file

    Path to .UHF file

    type(error_type), intent(out), allocatable :: error

    Error handling

  • private subroutine read_uhf_from_unit(uhf, unit, error)

    Read number of unpaired electrons from an open formatted unit

    Arguments

    Type IntentOptional Attributes Name
    integer, intent(out) :: uhf

    Number of unpaired electrons

    integer, intent(in) :: unit

    Formatted input unit

    type(error_type), intent(out), allocatable :: error

    Error handling


Subroutines

public subroutine read_dotfiles(self, input, error, read_chrg, read_uhf, chrg_file, uhf_file)

Read .CHRG and .UHF dot-files from the directory of an input path if they exist on disk.

Arguments

Type IntentOptional Attributes Name
type(structure_type), intent(inout) :: self

Molecular structure data to update

character(len=*), intent(in) :: input

Input geometry file path (or “-” for current directory)

type(error_type), intent(out), allocatable :: error

Error handling

logical, intent(in), optional :: read_chrg

Whether to check and read .CHRG (default: .true.)

logical, intent(in), optional :: read_uhf

Whether to check and read .UHF (default: .true.)

character(len=:), intent(out), optional, allocatable :: chrg_file

Resolved .CHRG path if the file existed on disk

character(len=:), intent(out), optional, allocatable :: uhf_file

Resolved .UHF path if the file existed on disk