gaussian_step package#

Submodules#

gaussian_step.energy module#

Setup and run Gaussian

class gaussian_step.energy.Energy(flowchart=None, title='Energy', extension=None, module='gaussian_step.energy', logger=<Logger Gaussian (WARNING)>)[source]#

Bases: Substep

analyze(indent='', data={}, table=None, P=None)[source]#

Parse the output and generating the text output and store the data in variables for other stages to access

description_text(P=None, calculation='Single-point energy')[source]#

Prepare information about what this node will do

run(keywords=None, extra_lines=None)[source]#

Run a single-point Gaussian calculation.

gaussian_step.energy_parameters module#

Global control parameters for Gaussian

class gaussian_step.energy_parameters.EnergyParameters(defaults={}, data=None)[source]#

Bases: Parameters

The control parameters for the energy.

output_parameters = {'difference density': {'default': 'no', 'default_units': '', 'description': 'Plot difference density:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot the difference density.', 'kind': 'boolean'}, 'nx': {'default': 50, 'default_units': '', 'description': 'Grid:', 'enumeration': None, 'format_string': '', 'help_text': 'Number of grid points in first direction', 'kind': 'integer'}, 'ny': {'default': 50, 'default_units': '', 'description': 'x', 'enumeration': None, 'format_string': '', 'help_text': 'Number of grid points in second direction', 'kind': 'integer'}, 'nz': {'default': 50, 'default_units': '', 'description': 'x', 'enumeration': None, 'format_string': '', 'help_text': 'Number of grid points in first direction', 'kind': 'integer'}, 'orbitals': {'default': 'no', 'default_units': '', 'description': 'Plot orbitals:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot orbitals.', 'kind': 'boolean'}, 'region': {'default': 'default', 'default_units': '', 'description': 'Region:', 'enumeration': ('default', 'explicit'), 'format_string': '', 'help_text': 'The region for the plots', 'kind': 'string'}, 'selected orbitals': {'default': 'HOMO, LUMO', 'default_units': '', 'description': 'Selected orbitals:', 'enumeration': ('HOMO, LUMO', '-1, HOMO, LUMO, +1', 'all'), 'format_string': '', 'help_text': 'Which orbitals to plot.', 'kind': 'string'}, 'total density': {'default': 'no', 'default_units': '', 'description': 'Plot total density:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot the total charge density.', 'kind': 'boolean'}, 'total spin density': {'default': 'no', 'default_units': '', 'description': 'Plot total spin density:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to plot the total spin density.', 'kind': 'boolean'}}#
parameters = {'advanced_functional': {'default': 'B3LYP : hybrid functional of Becke and Lee, Yang, and Parr', 'default_units': '', 'description': 'DFT Functional:', 'enumeration': ['PBE : GGA of Perdew, Burke and Ernzerhof', 'PBE-98 : GGA of Perdew, Burke and Ernzerhof, revised', 'B3LYP : hybrid functional of Becke and Lee, Yang, and Parr', 'HSE06 : hybrid functional of Heyd, Scuseria and Ernzerhof', 'PBE0 : hybrid functional of Perdew, Burke and Ernzerhof, and Adamo'], 'format_string': 's', 'help_text': 'The exchange-correlation functional to use.', 'kind': 'enumeration'}, 'advanced_method': {'default': 'DFT: Kohn-Sham density functional theory', 'default_units': '', 'description': 'Method:', 'enumeration': ['AM1: AM1 semiempirical HF', 'PM3: PM3 semiempirical HF', 'PM3MM: PM3 semiempirical HF with MM corrections', 'PM6: PM6 semiempirical HF', 'PDDG: PDDG variant of PM6 semiempirical HF', 'PM7: modified PM7 semiempirical HF', 'PM7MOPAC: PM7 semiempirical HF as in MOPAC', 'DFT: Kohn-Sham density functional theory', 'HF: Hartree-Fock self consistent field (SCF)', 'MP2: 2nd-order Møller–Plesset perturbation theory', 'MP3: 3rd-order Møller–Plesset perturbation theory', 'MP4(SDTQ): 4th-order Møller–Plesset perturbation theory', 'MP4(SDQ): 4th-order Møller–Plesset perturbation theory', 'MP5: 5th-order Møller–Plesset perturbation theory', 'CCD: coupled cluster doubles', 'CCSD: coupled cluster singles & doubles', 'CCSD(T): coupled cluster singles & doubles plus triples', 'CBS-4M: Complete Basis Set method of Petersson, et al.', 'CBS-QB3: Complete Basis Set method of Petersson, et al.', 'CBS-APNO: Complete Basis Set method of Petersson, et al.', 'G1: Gaussian-1 composite method', 'G2: Gaussian-2 composite method', 'G2MP2: Gaussian-2 MP2 composite method', 'G3: Gaussian-3 composite method', 'G3MP2: Gaussian-3 MP2 composite method', 'G3B3: Gaussian-3 B3LYP composite method', 'G3MP2B3: Gaussian-3 MP2 B3LYP composite method', 'G4: Gaussian-4 composite method', 'G4MP2: Gaussian-4 MP2 composite method'], 'format_string': 's', 'help_text': 'The computational method to use.', 'kind': 'enumeration'}, 'apply bond orders': {'default': 'yes', 'default_units': '', 'description': 'Apply bond orders to structure:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to use the calculated bond orders to update the structure', 'kind': 'bool'}, 'basis': {'default': '6-31G**', 'default_units': '', 'description': 'Basis:', 'enumeration': ('6-31G', '6-31G*', '6-31G**', 'cc-pVDZ', 'cc-pVTZ', 'cc-pVQZ', 'Def2SV', 'Def2SVP', 'Def2SVPP', 'Def2TZP'), 'format_string': 's', 'help_text': 'The basis set to use.', 'kind': 'enumeration'}, 'bond orders': {'default': 'Wiberg', 'default_units': '', 'description': 'Calculate bond orders:', 'enumeration': ('Wiberg', 'none'), 'format_string': 's', 'help_text': 'Whether to calculate the bond orders and if so how.', 'kind': 'enumeration'}, 'calculate gradient': {'default': 'yes', 'default_units': '', 'description': 'Calculate gradient:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to calculate the gradient:', 'kind': 'boolean'}, 'convergence': {'default': 'default', 'default_units': '', 'description': 'Energy convergence criterion:', 'enumeration': ('default',), 'format_string': 's', 'help_text': 'Criterion for convergence of the RMS of the density (10^-N) and maximum change in the density matrix (10^-(N+2)).', 'kind': 'integer'}, 'create tables': {'default': 'yes', 'default_units': '', 'description': 'Create tables as needed:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to create tables as needed for results being saved into tables.', 'kind': 'boolean'}, 'dispersion': {'default': 'GD3BJ', 'default_units': '', 'description': 'Dispersion correction:', 'enumeration': ['none', 'GD3BJ', 'GD3', 'DG2'], 'format_string': 's', 'help_text': 'The dispersion correction to use.', 'kind': 'enumeration'}, 'freeze-cores': {'default': 'yes', 'default_units': '', 'description': 'Freeze core orbitals:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to freeze the core orbitals in correlated methods', 'kind': 'enumeration'}, 'functional': {'default': 'B3LYP : hybrid functional of Becke and Lee, Yang, and Parr', 'default_units': '', 'description': 'DFT Functional:', 'enumeration': ['PBE : GGA of Perdew, Burke and Ernzerhof', 'PBE-98 : GGA of Perdew, Burke and Ernzerhof, revised', 'B3LYP : hybrid functional of Becke and Lee, Yang, and Parr', 'HSE06 : hybrid functional of Heyd, Scuseria and Ernzerhof', 'PBE0 : hybrid functional of Perdew, Burke and Ernzerhof, and Adamo'], 'format_string': 's', 'help_text': 'The exchange-correlation functional to use.', 'kind': 'enumeration'}, 'ignore convergence': {'default': 'no', 'default_units': '', 'description': 'Ignore lack of convergence:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to ignore lack of convergence in the SCF. Otherwise, an error is thrown.', 'kind': 'boolean'}, 'input only': {'default': 'no', 'default_units': '', 'description': 'Write the input files and stop:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': "Don't run MOPAC. Just write the input files.", 'kind': 'boolean'}, 'level': {'default': 'recommended', 'description': 'The level of disclosure in the interface', 'enumeration': ('recommended', 'advanced'), 'format_string': 's', 'help_text': "How much detail to show in the GUI. Currently 'recommended' or 'advanced', which shows everything.", 'kind': 'string'}, 'maximum iterations': {'default': 'default', 'default_units': '', 'description': 'Maximum iterations:', 'enumeration': ('default',), 'format_string': 's', 'help_text': 'Maximum number of SCF iterations.', 'kind': 'integer'}, 'method': {'default': 'DFT: Kohn-Sham density functional theory', 'default_units': '', 'description': 'Method:', 'enumeration': ['AM1: AM1 semiempirical HF', 'PM3: PM3 semiempirical HF', 'PM3MM: PM3 semiempirical HF with MM corrections', 'PM6: PM6 semiempirical HF', 'PDDG: PDDG variant of PM6 semiempirical HF', 'PM7: modified PM7 semiempirical HF', 'PM7MOPAC: PM7 semiempirical HF as in MOPAC', 'DFT: Kohn-Sham density functional theory', 'HF: Hartree-Fock self consistent field (SCF)', 'MP2: 2nd-order Møller–Plesset perturbation theory', 'MP3: 3rd-order Møller–Plesset perturbation theory', 'MP4(SDTQ): 4th-order Møller–Plesset perturbation theory', 'MP4(SDQ): 4th-order Møller–Plesset perturbation theory', 'CCD: coupled cluster doubles', 'CCSD: coupled cluster singles & doubles', 'CCSD(T): coupled cluster singles & doubles plus triples', 'CBS-QB3: Complete Basis Set method of Petersson, et al.'], 'format_string': 's', 'help_text': 'The computational method to use.', 'kind': 'enumeration'}, 'results': {'default': {}, 'default_units': '', 'description': 'results', 'enumeration': (), 'format_string': '', 'help_text': 'The results to save to variables or in tables. ', 'kind': 'dictionary'}, 'spin-restricted': {'default': 'default', 'default_units': '', 'description': 'Spin-restricted:', 'enumeration': ('default', 'yes', 'no'), 'format_string': 's', 'help_text': 'Whether to restrict the spin (RHF, ROHF, RKS) or not (UHF, UKS). Default is restricted for singlets, unrestricted otherwise.', 'kind': 'enumeration'}, 'use symmetry': {'default': 'yes', 'default_units': '', 'description': 'Use symmetry:', 'enumeration': ('yes', 'loose', 'identify only', 'no'), 'format_string': 's', 'help_text': 'Whether to use symmetry, and if so how much.', 'kind': 'enumeration'}}#

gaussian_step.energy_step module#

Main module.

class gaussian_step.energy_step.EnergyStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#

Return the new node object

create_tk_node(canvas=None, **kwargs)[source]#

Return the graphical Tk node object

description()[source]#

Return a description of what this extension does

my_description = {'description': 'Energy calculation using Gaussian', 'group': 'Calculation', 'name': 'Energy'}#

gaussian_step.gaussian module#

Non-graphical part of the Gaussian step in a SEAMM flowchart

class gaussian_step.gaussian.Gaussian(flowchart=None, title='Gaussian', namespace='org.molssi.seamm.gaussian', extension=None, logger=<Logger Gaussian (WARNING)>)[source]#

Bases: Node

The non-graphical part of a Gaussian step in a flowchart.

parser#

The parser object.

Type:

configargparse.ArgParser

options#

It contains a two item tuple containing the populated namespace and the list of remaining argument strings.

Type:

tuple

subflowchart#

A SEAMM Flowchart object that represents a subflowchart, if needed.

Type:

seamm.Flowchart

parameters#

The control parameters for Gaussian.

Type:

GaussianParameters

See also

TkGaussian, Gaussian, GaussianParameters

analyze(indent='', fchk=[], output=[], configuration=None, **kwargs)[source]#

Do any analysis of the output from this step.

Also print important results to the local step.out file using “printer”.

Parameters:

indent (str) – An extra indentation for the output

create_parser()[source]#

Setup the command-line / config file parser

description_text(P=None)[source]#

Create the text description of what this step will do. The dictionary of control values is passed in as P so that the code can test values, etc.

Parameters:

P (dict) – An optional dictionary of the current values of the control parameters.

Returns:

A description of the current step.

Return type:

str

property git_revision#

The git version of this module.

property gversion#

The Gaussian version to target.

run()[source]#

Run a Gaussian step.

Parameters:

None

Returns:

The next node object in the flowchart.

Return type:

seamm.Node

set_id(node_id)[source]#

Set the id for node to a given tuple

property version#

The semantic version of this module.

gaussian_step.gaussian.dehumanize(memory, suffix='B')[source]#

Unscale memory from its human readable form e.g:

‘1.20 MB’ => 1200000 ‘1.17 GB’ => 1170000000

gaussian_step.gaussian.humanize(memory, suffix='B', kilo=1024)[source]#

Scale memory to its proper format e.g:

1253656 => ‘1.20 MiB’ 1253656678 => ‘1.17 GiB’

gaussian_step.gaussian_parameters module#

Control parameters for the Gaussian step in a SEAMM flowchart

class gaussian_step.gaussian_parameters.GaussianParameters(defaults={}, data=None)[source]#

Bases: Parameters

The control parameters for Gaussian.

The developer will add a dictionary of Parameters to this class. The keys are parameters for the current plugin, which themselves might be dictionaries.

You need to replace the “time” example below with one or more definitions of the control parameters for your plugin and application.

Parameters:
  • parameters ({"kind", "default", "default_units", "enumeration",)

  • "format_string" – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.

  • description" – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.

  • help_text"} – A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys: kind, default, default_units, enumeration, format_string, description and help text.

  • parameters["kind"] (custom) – Specifies the kind of a variable. While the “kind” of a variable might be a numeric value, it may still have enumerated custom values meaningful to the user. For instance, if the parameter is a convergence criterion for an optimizer, custom values like “normal”, “precise”, etc, might be adequate. In addition, any parameter can be set to a variable of expression, indicated by having “$” as the first character in the field. For example, $OPTIMIZER_CONV.

  • parameters["default"] ("integer" or "float" or "string" or "boolean" or) – “enum” The default value of the parameter, used to reset it.

  • parameters["default_units"] (str) – The default units, used for resetting the value.

  • parameters["enumeration"] (tuple) – A tuple of enumerated values.

  • parameters["format_string"] (str) – A format string for “pretty” output.

  • parameters["description"] (str) – A short string used as a prompt in the GUI.

  • parameters["help_text"] (tuple) – A longer string to display as help for the user.

Examples

parameters = {
    "time": {
        "default": 100.0,
        "kind": "float",
        "default_units": "ps",
        "enumeration": tuple(),
        "format_string": ".1f",
        "description": "Simulation time:",
        "help_text": ("The time to simulate in the dynamics run.")
    },
}

See also

Gaussian, TkGaussian, Gaussian, GaussianParameters, GaussianStep

parameters = {'time': {'default': 100.0, 'default_units': 'ps', 'description': 'Simulation time:', 'enumeration': (), 'format_string': '.1f', 'help_text': 'The time to simulate in the dynamics run.', 'kind': 'float'}}#

gaussian_step.gaussian_step module#

class gaussian_step.gaussian_step.GaussianStep(flowchart=None, gui=None)[source]#

Bases: object

Helper class needed for the stevedore integration.

This must provide a description() method that returns a dict containing a description of this node, and create_node() and create_tk_node() methods for creating the graphical and non-graphical nodes.

Parameters:
  • my_description ({description, group, name}) – A human-readable description of this step. It can be several lines long, and needs to be clear to non-expert users. It contains the following keys: description, group, name.

  • my_description["description"] (tuple) – A description of the Gaussian step. It must be clear to non-experts.

  • my_description["group"] (str) – Which group in the menus to put this step. If the group does not exist it will be created. Common groups are “Building”, “Calculations”, “Control” and “Data”.

  • my_description["name"] (str) – The name of this step, to be displayed in the menus.

create_node(flowchart=None, **kwargs)[source]#

Create and return the new node object.

Parameters:
  • flowchart (seamm.Node) – A non-graphical SEAMM node

  • **kwargs (keyworded arguments) – Various keyworded arguments such as title, namespace or extension representing the title displayed in the flowchart, the namespace for the plugins of a subflowchart and the extension, respectively.

Return type:

Gaussian

See also

Gaussian

create_tk_node(canvas=None, **kwargs)[source]#

Create and return the graphical Tk node object.

Parameters:
  • canvas (tk.Canvas) – The Tk Canvas widget

  • **kwargs (keyworded arguments) – Various keyworded arguments such as tk_flowchart, node, x, y, w, h representing a graphical flowchart object, a non-graphical node for a step, and dimensions of the graphical node.

Return type:

TkGaussian

See also

TkGaussian

description()[source]#

Return a description of what this extension does.

my_description = {'description': 'An interface for Gaussian', 'group': 'Simulations', 'name': 'Gaussian'}#

gaussian_step.metadata module#

This file contains metadata describing the results from Gaussian

gaussian_step.metadata.optimization_convergence = {'default': '', 'loose': 'Loose', 'tight': 'Tight', 'very tight': 'VeryTight'}#

Properties that Gaussian produces. metadata[“results”] describes the results that this step can produce. It is a dictionary where the keys are the internal names of the results within this step, and the values are a dictionary describing the result. For example:

metadata["results"] = {
    "total_energy": {
        "calculation": [
            "energy",
            "optimization",
        ],
        "description": "The total energy",
        "dimensionality": "scalar",
        "methods": [
            "ccsd",
            "ccsd(t)",
            "dft",
            "hf",
        ],
        "property": "total energy#QuickMin#{model}",
        "type": "float",
        "units": "E_h",
    },
}

Fields#

calculation[str]

Optional metadata describing what subtype of the step produces this result. The subtypes are completely arbitrary, but often they are types of calculations which is why this is name calculation. To use this, the step or a substep define self._calculation as a value. That value is used to select only the results with that value in this field.

descriptionstr

A human-readable description of the result.

dimensionalitystr

The dimensions of the data. The value can be “scalar” or an array definition of the form “[dim1, dim2,…]”. Symmetric tringular matrices are denoted “triangular[n,n]”. The dimensions can be integers, other scalar results, or standard parameters such as n_atoms. For example, ‘[3]’, [3, n_atoms], or “triangular[n_aos, n_aos]”.

methodsstr

Optional metadata like the calculation data. methods provides a second level of filtering, often used for the Hamiltionian for ab initio calculations where some properties may or may not be calculated depending on the type of theory.

propertystr

An optional definition of the property for storing this result. Must be one of the standard properties defined either in SEAMM or in this steps property metadata in data/properties.csv.

typestr

The type of the data: string, integer, or float.

unitsstr

Optional units for the result. If present, the value should be in these units.

gaussian_step.optimization module#

Setup and run Gaussian

class gaussian_step.optimization.Optimization(flowchart=None, title='Optimization', extension=None, module='gaussian_step.optimization', logger=<Logger Gaussian (WARNING)>)[source]#

Bases: Energy

analyze(indent='', data={}, out=[], table=None, P=None)[source]#

Parse the output and generating the text output and store the data in variables for other stages to access

description_text(P=None, calculation='Geometry optimization')[source]#

Prepare information about what this node will do

run(keywords=None)[source]#

Run an optimization calculation with Gaussian

gaussian_step.optimization_parameters module#

Global control parameters for Gaussian

class gaussian_step.optimization_parameters.OptimizationParameters(defaults={}, data=None)[source]#

Bases: EnergyParameters

The control parameters for the energy.

parameters = {'coordinates': {'default': 'redundant', 'default_units': '', 'description': 'Type of coordinates:', 'enumeration': ('redundant', 'cartesian', 'generalized internal (GIC)'), 'format_string': 's', 'help_text': 'The typ of coordinates to use in the minimization.', 'kind': 'enumeration'}, 'geometry convergence': {'default': 'default', 'default_units': '', 'description': 'Convergence criteria:', 'enumeration': ['default', 'tight', 'very tight', 'loose'], 'format_string': '', 'help_text': 'The criteria to use for convergence.', 'kind': 'string'}, 'ignore curvature error': {'default': 'no', 'default_units': '', 'description': 'Ignore incorrect curvature for TS:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to ignore incorrect curvvatures during TS optimizations', 'kind': 'boolean'}, 'ignore unconverged optimization': {'default': 'no', 'default_units': '', 'description': 'Ignore lack of convergence:', 'enumeration': ('yes', 'no'), 'format_string': 's', 'help_text': 'Whether to ignore lack of convergence in the optimization. Otherwise, an error is thrown.', 'kind': 'boolean'}, 'max geometry steps': {'default': 'default', 'default_units': '', 'description': 'Maximum steps:', 'enumeration': ('default', '6*nAtoms', '9*nAtoms'), 'format_string': '', 'help_text': "The maximum number of steps to take in the optimization. 'default' is based on the system size, giving a reasonable limit in most cases.", 'kind': 'string'}, 'recalc hessian': {'default': 'never', 'default_units': '', 'description': 'Recalculate Hessian:', 'enumeration': ('every step', 'at beginning', 'HF at begining', 'never'), 'format_string': '', 'help_text': 'How often to recalculate the Hessian (in steps). Smaller values help convergence but are expensive.', 'kind': 'integer'}, 'saddle order': {'default': 2, 'default_units': '', 'description': 'Order of saddle point:', 'enumeration': (), 'format_string': '', 'help_text': 'Number of directions down from the saddle point.', 'kind': 'integer'}, 'target': {'default': 'minimum', 'default_units': '', 'description': 'Optimization target:', 'enumeration': ('minimum', 'transition state', 'saddle point'), 'format_string': '', 'help_text': 'The type of structure that is the target for the optimization.', 'kind': 'string'}}#

gaussian_step.optimization_step module#

Main module.

class gaussian_step.optimization_step.OptimizationStep(flowchart=None, gui=None)[source]#

Bases: object

create_node(flowchart=None, **kwargs)[source]#

Return the new node object

create_tk_node(canvas=None, **kwargs)[source]#

Return the graphical Tk node object

description()[source]#

Return a description of what this extension does

my_description = {'description': 'Optimization of the structure using Gaussian', 'group': 'Calculation', 'name': 'Optimization'}#

gaussian_step.substep module#

Setup and run Gaussian

class gaussian_step.substep.Substep(flowchart=None, title='no title', extension=None, logger=<Logger Gaussian (WARNING)>, module='gaussian_step.substep')[source]#

Bases: Node

property git_revision#

The git version of this module.

property global_options#

Dictionary of global options

property gversion#
property input_only#

Whether to write the input only, not run MOPAC.

property is_runable#

Indicate whether this not runs or just adds input.

make_plots(data)[source]#

Create the density and orbital plots if requested.

Parameters:

data (dict()) – Dictionary of results from the calculation (results.tag file)

property method#

The method … HF, DFT, … used.

property options#

Dictionary of options for this step

parse_fchk(path, data={})[source]#

Process the data of a formatted Chk file given as lines of data.

Parameters:

path (pathlib.Path) – The path to the checkpoint file

parse_output(path, data={})[source]#

Process the output.

Parameters:

path (pathlib.Path) – The Gaussian log file.

process_data(data)[source]#

Massage the cclib data to a more easily used form.

run_gaussian(keywords, extra_lines=None)[source]#

Run Gaussian.

Parameters:

None

Returns:

The next node object in the flowchart.

Return type:

seamm.Node

property version#

The semantic version of this module.

gaussian_step.substep.dehumanize(memory, suffix='B')[source]#

Unscale memory from its human readable form e.g:

‘1.20 MB’ => 1200000 ‘1.17 GB’ => 1170000000

gaussian_step.substep.humanize(memory, suffix='B', kilo=1024)[source]#

Scale memory to its proper format e.g:

1253656 => ‘1.20 MiB’ 1253656678 => ‘1.17 GiB’

gaussian_step.tk_energy module#

The graphical part of a Gaussian Energy node

class gaussian_step.tk_energy.TkEnergy(tk_flowchart=None, node=None, canvas=None, x=120, y=20, w=200, h=50, my_logger=<Logger Gaussian (WARNING)>)[source]#

Bases: TkNode

create_dialog(title='Edit Gaussian Energy Step')[source]#

Create the dialog!

reset_calculation(widget=None)[source]#
reset_convergence(widget=None)[source]#

Layout the convergence widgets as needed for the current state

reset_dialog(widget=None)[source]#

Layout the widgets as needed for the current state

reset_plotting(widget=None)[source]#
right_click(event)[source]#

Probably need to add our dialog…

gaussian_step.tk_gaussian module#

The graphical part of a Gaussian step

class gaussian_step.tk_gaussian.TkGaussian(tk_flowchart=None, node=None, namespace='org.molssi.seamm.gaussian.tk', canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkNode

The graphical part of a Gaussian step in a flowchart.

tk_flowchart#

The flowchart that we belong to.

Type:

TkFlowchart = None

node#

The corresponding node of the non-graphical flowchart

Type:

Node = None

canvas#

The Tk Canvas to draw on

Type:

tkCanvas = None

dialog#

The Pmw dialog object

Type:

Dialog

x#

The x-coordinate of the center of the picture of the node

Type:

int = None

y#

The y-coordinate of the center of the picture of the node

Type:

int = None

w#

The width in pixels of the picture of the node

Type:

int = 200

h#

The height in pixels of the picture of the node

Type:

int = 50

self[widget]#

A dictionary of tk widgets built using the information contained in Gaussian_parameters.py

Type:

dict

See also

Gaussian, TkGaussian, GaussianParameters

create_dialog()[source]#

Create the dialog. A set of widgets will be chosen by default based on what is specified in the Gaussian_parameters module.

Parameters:

None

Return type:

None

See also

TkGaussian.reset_dialog

edit()[source]#

Present a dialog for editing the Gaussian input

Parameters:

None

Return type:

None

from_flowchart(tk_flowchart=None, flowchart=None)[source]#

Recreate the graphics from the non-graphical flowchart.

This is only used in nodes that contain sub-flowcharts.

Parameters:
  • tk_flowchart (seamm.tk_Flowchart) – A graphical representation of the SEAMM Flowchart

  • flowchart (seamm.Flowchart) – A non-graphical representation of the SEAMM Flowchart

Return type:

None

handle_dialog(result)[source]#

Handle the closing of the edit dialog

What to do depends on the button used to close the dialog. If the user closes it by clicking the “x” of the dialog window, None is returned, which we take as equivalent to cancel.

Parameters:

result (None or str) – The value of this variable depends on what the button the user clicked.

Return type:

None

handle_help()[source]#

Shows the help to the user when click on help button.

Parameters:

None

Return type:

None

right_click(event)[source]#

Handles the right click event on the node.

Parameters:

event (Tk Event)

Return type:

None

See also

TkGaussian.edit

update_flowchart(tk_flowchart=None, flowchart=None)[source]#

Update the nongraphical flowchart.

This is only used in nodes that contain sub-flowcharts What to do depends on the button used to close the dialog. If the user closes it by clicking the “x” of the dialog window, None is returned, which we take as equivalent to cancel.

Parameters:
  • tk_flowchart (seamm.tk_Flowchart) – A graphical representation of the SEAMM Flowchart

  • flowchart (seamm.Flowchart) – A non-graphical representation of the SEAMM Flowchart

Return type:

None

gaussian_step.tk_optimization module#

The graphical part of a Gaussian Optimization node

class gaussian_step.tk_optimization.TkOptimization(tk_flowchart=None, node=None, canvas=None, x=120, y=20, w=200, h=50, my_logger=<Logger Gaussian (WARNING)>)[source]#

Bases: TkEnergy

create_dialog(title='Edit Gaussian Optimization Step')[source]#

Create the edit dialog!

This is reasonably complicated, so a bit of description is in order. The superclass Energy creates the dialog along with the calculation parameters in a ‘calculation’ frame..

This method adds a second frame for controlling the optimizer.

The layout is handled in part by the Energy superclass, which handles the calculation frame. Our part is handled by two methods:

  • reset_dialog does the general layout of the main frames.

  • reset_optimization handles the layout of the optimization section.

reset_dialog(widget=None)[source]#

Layout the widgets, letting our parents go first.

reset_optimization(widget=None)[source]#
right_click(event)[source]#

Probably need to add our dialog…

Module contents#

gaussian_step A SEAMM plug-in for Gaussian