Gaussian basis set parser and molecular basis construction
Provides utilities for parsing Gaussian-type orbital basis sets from text files and building molecular basis sets for quantum calculations. Determine basis file line type Parse basis for single element Build complete molecular basis Convert angular momentum character to integer Convert angular momentum integer to character
| Type | Visibility | Attributes | Name | Initial | |||
|---|---|---|---|---|---|---|---|
| integer, | public, | parameter | :: | LINE_ATOM | = | 1 |
Element specification line |
| integer, | public, | parameter | :: | LINE_FUNCTION | = | 3 |
Basis function coefficient line |
| integer, | public, | parameter | :: | LINE_SHELL | = | 2 |
Shell definition line |
| integer, | public, | parameter | :: | LINE_UNKNOWN | = | 0 |
Unrecognized line type |
Convert angular momentum character to integer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=1), | intent(in) | :: | ang_mom_char |
Angular momentum symbol |
Corresponding integer value
Convert angular momentum integer to character
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| integer, | intent(in) | :: | ang_mom |
Angular momentum quantum number |
Corresponding symbol character
Classify a line from a gamess formatted basis set file
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
Check if a line is blank or a control line (starts with ‘$’)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
Check if a line is a function coefficient line (starts with a number)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
Check if a line is a shell header line (starts with S, P, D, F, G, H, I, or L)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line |
Build molecular basis from geometry and basis file Only parses unique elements, then copies basis data to atoms
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | basis_string | |||
| character(len=*), | intent(in) | :: | element_names(:) |
Element for each atom in geometry order |
||
| type(molecular_basis_type), | intent(out) | :: | mol_basis | |||
| type(error_t), | intent(out) | :: | error |
Parse basis set for a specific element from a GAMESS formatted basis string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | basis_string | |||
| character(len=*), | intent(in) | :: | element_name | |||
| type(atomic_basis_type), | intent(out) | :: | atom_basis | |||
| type(error_t), | intent(out) | :: | error |
Deep copy of atomic basis data from source to dest
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(atomic_basis_type), | intent(in) | :: | source | |||
| type(atomic_basis_type), | intent(out) | :: | dest |
Count the number of shells for a specific element in a GAMESS formatted basis string,
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | basis_string | |||
| character(len=*), | intent(in) | :: | element_name | |||
| integer, | intent(out) | :: | nshells | |||
| type(error_t), | intent(out) | :: | error |
Fill in the shell data for a specific element from a GAMESS formatted basis string
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | basis_string | |||
| character(len=*), | intent(in) | :: | element_name | |||
| type(atomic_basis_type), | intent(inout) | :: | atom_basis | |||
| type(error_t), | intent(out) | :: | error |
Find unique strings in an array Returns array of unique strings and count
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | input_array(:) | |||
| character(len=:), | intent(out), | allocatable | :: | unique_array(:) | ||
| integer, | intent(out) | :: | nunique |
Extract the next line from a string starting at line_start
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | string | |||
| integer, | intent(in) | :: | line_start | |||
| character(len=*), | intent(out) | :: | line | |||
| integer, | intent(out) | :: | line_end |
Parse function line (e.g., “1 1.0 2.0” or “1 1.0 2.0 3.0” for L shells)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line | |||
| integer, | intent(out) | :: | func_num | |||
| real(kind=dp), | intent(out) | :: | exponent | |||
| real(kind=dp), | intent(out) | :: | coeff_s | |||
| real(kind=dp), | intent(out), | optional | :: | coeff_p | ||
| logical, | intent(out) | :: | has_p | |||
| integer, | intent(out) | :: | stat |
Parse shell header line (e.g., “S 2” or “L 3”)
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| character(len=*), | intent(in) | :: | line | |||
| character(len=1), | intent(out) | :: | ang_mom | |||
| integer, | intent(out) | :: | nfunc | |||
| integer, | intent(out) | :: | stat |