Menu

Utility scripts

Felix Plasser Sebastian Mai

A number of utility scripts are distributed together with TheoDORE. These are found in the $THEODIR/bin directory along with the main programs.

jmol_MOs.py

Prepare a script for automatized orbital rendering of Molden files in Jmol. This script is particularly useful in cases where a large number of orbital files (NOs, NTOs, or NDOs) are produced as is the case for example with libwfa or COLUMBUS. Using this script, it is possible to process the files simultaneously

Call jmol_MOs.py with the names of the Molden files as arguments:

jmol_MOs.py [<mldfile> [<mldfile2> ...]]

For example, if you want to analyze all .molden files call

jmol_MOs.py *.molden

Then choose the required options in the interactive menu.

After running the script, you can either use the fully automatic procedure and simply call

jmol -n multi.jmol_orbitals.spt
firefox multi.orbitals.html

Or use the semi-interactive version

  1. Open Jmol

  2. Run the first few lines of the script to preview the settings (simply copy them into the Jmol console)

  3. Adjust the perspective

  4. Run the remaining lines of the script (by copying into the Jmol console)

  5. Open the file oribtals.html to view the result.

jmol_vibs.py

Generate pictures of vibrations where the motions are shown as arrows. Similar to jmol_MOs.py

vmd_plots.py

Automatically plot a set of grid files (cube or plt format) with VMD. Call the script with the files to be plotted as arguments, i.e.

vmd_plots.py [<pltfile> [<pltfile2> ...]]

After calling the script, the following steps have to be performed
1. vmd coord.xyz
2. in VMD: File - Load Visualization State - load_all.vmd
3. in VMD: Adjust the perspective
4. in VMD: File - Load Visualization State - plot_all.vmd
5. bash convert.bash
6. Open in browser: vmd_plots.html

babel.py

Conversion between different types of molecular structure files, using the Open Babel package.

babel.py <intype> <infile> <outtype> <outfile>
---
babel.py tmol coord xyz coord.xyz

convert_table.py

Convert the data produced by TheoDORE into a table in LaTeX or html format

cc_check.py

Check whether a file can be parsed with cclib

cc_check.py <logfile>

cc2molden.py

Convert a log-file to Molden format with the help of cclib.

cc2molden.py <logfile>

Warning: This script only works under the assumption that the quantum chemistry code used has the same convention regarding orbital ordering as Molden format.

dgrid_prep.py

Create input for the external DGrid program to create cube files from Molden format files.

dgrid_prep.py <mo_file1> [<mo_file2> ...]

extract_molden.py

Extract the hole/particle components from a Molden file and write them into separate Molden files. This utility can be used for plotting hole and particle densities in Molden.

syntax: extract_molden.py <mo_file1> [<mo_file2> ...]
options: -ene          - interpret energies as occupations
         -thresh=0.001 - threshold for print-out

parse_libwfa.py

Directly parse libwfa output

 parse_libwfa.py <logfile> <type>
   type: qcadc, qctddft, rassi

analyze_correlations.py

Compute the hole/particle correlation matrices between all fragments from an OmFrag.txt file. Using the correlation matrices, hierarchical clustering is used to identify which fragments could be merged. This helps reducing the number of fragments while keeping all information relevant to distinguish the electronic states with the OmFrag.txt data.
The tool can optionally produce interactive plots of the hierarchical clustering (using matplotlib) and PDF diagrams of the relevant matrices, clustering dendrograms, geometry, and fragment definitions (using pdflatex).

analyze_correlations.py

Related

Wiki: Home
Wiki: News
Wiki: Orbitals and Densities

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.