Psi4 Project Logo

Interface to Molden, molden()

Code author: Justin M. Turney

Section author: C. David Sherrill

Psi4 contains an interface to the Molden program. Molden is a visualization program for electronic structure developed by Gijs Schaftenaar at the University of of Nijmegen, Netherlands. It is available at http://www.cmbi.ru.nl/molden/. Molden can plot atomic orbitals, densities, electrostatic potentials (ESP’s), etc. Psi4 can create a file containing atomic coordinates, basis set, and SCF orbital coefficients in the so-called Molden format. This file is written by the SCF module (see Section SCF) if the user sets the MOLDEN_WRITE keyword to true. This Molden file is also used to pass information between Psi4 and WebMO, if Psi4 computations are invoked using the WebMO GUI. The filename of the Molden file ends in ”.molden”, and the prefix is determined by WRITER_FILE_LABEL (if set), or else by the name of the output file plus the name of the current molecule.

molden(wfn, filename)[source]

Function to write wavefunction information in wfn to filename in molden format. Will write natural orbitals from density (MO basis) if supplied.

New in version 0.5: wfn parameter passed explicitly

Returns:

None

Parameters:
  • wfn (Wavefunction) – set of molecule, basis, orbitals from which to generate cube files
  • filename (string) – destination file name for MOLDEN file
  • density_a (psi4.Matrix) – density in the MO basis to build alpha NO’s from (optional)
  • density_b (psi4.Matrix) – density in the MO basis to build beta NO’s from, assumes restricted if not supplied (optional)
Examples:
>>> # [1] Molden file for DFT calculation
>>> E, wfn = energy('b3lyp', return_wfn=True)
>>> molden(wfn, 'mycalc.molden')
>>> # [2] Molden file for CI/MCSCF computation using NO roots
>>> E, wfn = energy('ci', return_wfn=True)
>>> molden(wfn, 'no_root1.molden', density_a=wfn.opdm(0, 0, "A", True))

Options

MOLDEN_WRITE

Do write a MOLDEN output file? If so, the filename will end in .molden, and the prefix is determined by WRITER_FILE_LABEL (if set), or else by the name of the output file plus the name of the current molecule.

WRITER_FILE_LABEL

Base filename for text files written by PSI, such as the MOLDEN output file, the Hessian file, the internal coordinate file, etc. Use the add_str_i function to make this string case sensitive.

  • Type: string
  • Default: No Default