tblite
Light-weight tight-binding framework
Loading...
Searching...
No Matches
tblite_io_molden Module Reference

The Molden writer produces a Molden input with the following sections: More...

Functions/Subroutines

subroutine push_back (self, line)
 Add line to the buffer with automatic resizing.
 
subroutine, public load_molden (filename, mol, bas, wfn, error)
 Read Molden file and construct structure, basis, and wavefunction objects.
 
subroutine, public save_molden (filename, mol, bas, wfn, error)
 Write tblite singlepoint data to a Molden file.
 

Detailed Description

The Molden writer produces a Molden input with the following sections:

[molden format]
[title]
[cell] au non-standard extension for periodic systems
[atoms] au
[core] non-standard extension for core electron count
[pseudo] non-standard extension for valence electron count
[nval] non-standard extension for valence electron count
[gto]
[6d]/[10f]/[15g] optional explicit declaration of cartesian format
[mo]

This format extends the official Molden specification documented at

https://www.theochem.ru.nl/molden/molden_format.html

The non-standard [Cell] section (consistent with Multiwfn and CP2K) specifies periodic information lacking in the Molden Format, and contains cartesian lattice vectors assuming three-dimensional periodicity:

[cell] au
ax ay az
bx by bz
cx cy cz

The Molden writer and reader follow the official specification for the ordering of cartesian/spherical atomic orbitals in the [GTO] section:

s : s
p : px, py, pz
6d : xx, yy, zz, xy, xz, yz
5d : 0, +1, -1, +2, -2
10f : xxx, yyy, zzz, xyy, xxy, xxz, xzz, yzz, yyz, xyz
7f : 0, +1, -1, +2, -2, +3, -3
15g : xxxx, yyyy, zzzz, xxxy, xxxz, xyyy, yyyz, xzzz, yzzz,
xxyy, xxzz, yyzz, xxyz, xyyz, xyzz
9g : 0, +1, -1, +2, -2, +3, -3, +4, -4

The writer always emits Cartesian AO coefficients in [MO] and declares Cartesian higher angular momentum shells with [6D], [10F], and [15G]. The reader accepts both Cartesian and spherical Molden MO coefficient ordering.

Primitive coefficients written in the [GTO] section contain normalization of the spherical harmonic Gaussian primitives, as well as normalization of the contracted basis functions (the used expansion by Stewart of the STO-nG functions inherently contains contracted normalization). The reader assumes that the coefficients contain both primitive and contracted normalization.

The number of valence electrons and the effective atomic charge is specified via the non-standard [Core] section (consistent with Molden2AIM and PySCF), the non-standard [Pseudo] section (consistent with Molden, CP2K, and Orca), the non-standard [Nval] section (consistent with Multiwfn).

In the [MO] section, restricted closed-shell wavefunctions are written as spatial orbitals, while restricted open-shell and unrestricted wavefunctions are written as separate alpha and beta spin orbitals.

The Molden reader constructs tblite internal structure_type, basis_type, and wavefunction_type objects from the corresponding sections of the Molden file. Implementation of Molden file I/O

Function/Subroutine Documentation

◆ load_molden()

subroutine, public tblite_io_molden::load_molden ( character(len=*), intent(in) filename,
type(structure_type), intent(out) mol,
type(basis_type), intent(out) bas,
type(wavefunction_type), intent(out) wfn,
type(error_type), intent(out), allocatable error )

Read Molden file and construct structure, basis, and wavefunction objects.

Parameters
[in]filenameInput Molden file name
[out]molMolecular structure data loaded from Molden file
[out]basBasis set information loaded from Molden file
[out]wfnWavefunction data loaded from Molden file
[out]errorError handling

◆ push_back()

subroutine tblite_io_molden::push_back ( class(line_buffer_type), intent(inout) self,
character(len=*), intent(in) line )

Add line to the buffer with automatic resizing.

Parameters
[in,out]selfLine buffer instance
[in]lineLine to add to the buffer

◆ save_molden()

subroutine, public tblite_io_molden::save_molden ( character(len=*), intent(in) filename,
type(structure_type), intent(in) mol,
class(basis_type), intent(in) bas,
type(wavefunction_type), intent(in) wfn,
type(error_type), intent(out), allocatable error )

Write tblite singlepoint data to a Molden file.

Parameters
[in]filenameOutput Molden file name
[in]molMolecular structure data
[in]basBasis metadata used by the calculation
[in]wfnConverged wavefunction
[out]errorError handling