pyssianutils.functions

This module provides a set of functions with general utilities. If matplotlib.pyplot is available the Plot Functions become available

General

pyssianutils.functions.write_2_file(File)[source]

Creates a wrapper for appending text to a certain File. Assumes that each call is equivalent to writing a single line.

Script

pyssianutils.functions.potential_energy(GOF, method='default')[source]

Returns the last potential energy of a GaussianOutFile of a certain method. The default is the energy of the SCF cycle ('SCF Done:')

Parameters
  • GOF (GaussianOutFile) --

  • Method (string) -- For DFT and HF the default behavior is correct. For Post-HF methods it needs to be specified. Currently: ['oniom','mp2','mp2scs','MP4','ccsdt']

Returns

Energy

Return type

float

pyssianutils.functions.thermochemistry(GOF)[source]

Returns the Zero Point Energy, Enthalpy and Free Energy from a frequency calculation.

Parameters

GOF (GaussianOutFile) --

Returns

(Z, H, G)

Return type

tuple

Console

pyssianutils.functions.print_thermo(GOF)[source]

Prints in the console the thermochemistry of a GaussianOutFile.

Parameters

GOF (GaussianOutFile) -- Gaussian File whose thermochemistry is going to be displayed.

pyssianutils.functions.print_convergence(GOF, JobId, Last=False)[source]

Displays the Convergence parameters for a certain InternalJob of a GaussianOutFile.

Parameters
  • GOF (GaussianOutFile) -- Gaussian File whose convergence parameters are going to be displayed.

  • JobId (int) -- InternalJob number in the Gaussian Output File.

  • Last (bool) -- If enabled only the last set of parameters is displayed (the default is False).

Plot

pyssianutils.functions.PlotConvergence(GOF, JobId)[source]

The plot version of print_convergence.

Parameters
  • GOF (GaussianOutFile) -- Gaussian File whose convergence parameters are going to be displayed.

  • JobId (int) -- InternalJob number in the Gaussian Output File.

Returns

matplotlib figure object with the convergence already included and a list of numbers with the thresholds of convergence for each parameter.

Return type

matplotlib.figure.Figure, list

pyssianutils.functions.PlotInternalEnergy(GOF, UnitConverter=None)[source]

Function that plots the potential energy during a Gaussian calculation.

Parameters
  • GOF (GaussianOutFile) -- Gaussian File whose potential energy is going to be displayed.

  • UnitConverter ((str,function)) -- tuple where the first value is the unit to be used and the second the function to transform the values in hartrees to the desired unit (the default is None).

Returns

matplotlib figure object with the convergence already included

Return type

matplotlib.figure.Figure

pyssianutils.functions.PlotThresholds(fig, thresholds=None)[source]

Convenience function to plot horizontal lines for the figure produced by PlotConvergence.

Parameters
  • fig (matplotlib.figure.Figure) -- Figure where the thresholds are going to be drawn

  • thresholds (list) -- List of the threshold values of len==4 (the default is [0.000450,0.0003,0.0018,0.0012]).