geometry_analysis_step package#
Submodules#
geometry_analysis_step.find_mopac module#
geometry_analysis_step.geometry_analysis module#
Non-graphical part of the Geometry Analysis step in a SEAMM flowchart
- class geometry_analysis_step.geometry_analysis.GeometryAnalysis(flowchart=None, title='Geometry Analysis', extension=None, logger=<Logger geometry_analysis_step.geometry_analysis (WARNING)>)[source]#
Bases:
Node
The non-graphical part of a Geometry Analysis 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 Geometry Analysis.
See also
TkGeometryAnalysis
,GeometryAnalysis
,GeometryAnalysisParameters
- analyze(indent='', **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
- 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.
- run()[source]#
Run a Geometry Analysis step.
- Parameters:
None –
- Returns:
The next node object in the flowchart.
- Return type:
seamm.Node
- property version#
The semantic version of this module.
- geometry_analysis_step.geometry_analysis.angle(p1, p2, p3)[source]#
The angle in degrees given the three points.
- geometry_analysis_step.geometry_analysis.dihedral(p1, p2, p3, p4)[source]#
Praxeolitic formula 1 sqrt, 1 cross product https://stackoverflow.com/questions/20305272/dihedral-torsion-angle-from-four-points-in-cartesian-coordinates-in-python
geometry_analysis_step.geometry_analysis_parameters module#
Control parameters for the Geometry Analysis step in a SEAMM flowchart
- class geometry_analysis_step.geometry_analysis_parameters.GeometryAnalysisParameters(defaults={}, data=None)[source]#
Bases:
Parameters
The control parameters for Geometry Analysis.
You need to replace the “time” entry in dictionary below these comments with the definitions of parameters to control this step. The keys are parameters for the current plugin,the values are dictionaries as outlined below.
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.") }, }
- parameters{str: {str: str}}
A dictionary containing the parameters for the current step. Each key of the dictionary is a dictionary that contains the the following keys:
- parameters[“default”] :
The default value of the parameter, used to reset it.
- parameters[“kind”]enum()
Specifies the kind of a variable. One of “integer”, “float”, “string”, “boolean”, or “enum”
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_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”]: str
A longer string to display as help for the user.
See also
GeometryAnalysis
,TkGeometryAnalysis
,GeometryAnalysis
,GeometryAnalysisParameters
,Geometry
- parameters = {'angle table': {'default': 'angles', 'default_units': '', 'description': 'Angle table:', 'enumeration': ('angles',), 'format_string': '', 'help_text': 'The table to output angles.', 'kind': 'string'}, 'atom indices column': {'default': '', 'default_units': '', 'description': 'Term using indices', 'enumeration': ('atom indices)',), 'format_string': '', 'help_text': 'The column for the atom indices, e.g. 1-3.', 'kind': 'string'}, 'bond table': {'default': 'bonds', 'default_units': '', 'description': 'Bond table:', 'enumeration': ('bonds',), 'format_string': '', 'help_text': 'The table to output bonds.', 'kind': 'string'}, 'dihedral table': {'default': 'dihedrals', 'default_units': '', 'description': 'Dihedral table:', 'enumeration': ('dihedrals',), 'format_string': '', 'help_text': 'The table to output dihedrals.', 'kind': 'string'}, 'el1 column': {'default': '', 'default_units': '', 'description': 'Atom1 element', 'enumeration': ('El1',), 'format_string': '', 'help_text': 'The column for the first atom symbol.', 'kind': 'string'}, 'el2 column': {'default': '', 'default_units': '', 'description': 'Atom2 element', 'enumeration': ('El2',), 'format_string': '', 'help_text': 'The column for the second atom symbol.', 'kind': 'string'}, 'el3 column': {'default': '', 'default_units': '', 'description': 'Atom3 element', 'enumeration': ('El3',), 'format_string': '', 'help_text': 'The column for the third atom symbol.', 'kind': 'string'}, 'el4 column': {'default': '', 'default_units': '', 'description': '', 'enumeration': ('El4',), 'format_string': '', 'help_text': 'The column for the fourth atom symbol.', 'kind': 'string'}, 'id column': {'default': '', 'default_units': '', 'description': 'id column:', 'enumeration': ('Molecule ID',), 'format_string': '', 'help_text': 'Column to id the molecule.', 'kind': 'string'}, 'ids': {'default': '<system.name>', 'default_units': '', 'description': 'Molecule id:', 'enumeration': ('<system.name>', '<configuration.name>'), 'format_string': '', 'help_text': 'The name to use as molecule id.', 'kind': 'string'}, 'indx1 column': {'default': '', 'default_units': '', 'description': 'Atom1 index', 'enumeration': ('Indx1',), 'format_string': '', 'help_text': 'The column for the first atom index.', 'kind': 'string'}, 'indx2 column': {'default': '', 'default_units': '', 'description': 'Atom2 index', 'enumeration': ('Indx2',), 'format_string': '', 'help_text': 'The column for the second atom index.', 'kind': 'string'}, 'indx3 column': {'default': '', 'default_units': '', 'description': 'Atom3 index', 'enumeration': ('Indx3',), 'format_string': '', 'help_text': 'The column for the third atom index.', 'kind': 'string'}, 'indx4 column': {'default': '', 'default_units': '', 'description': 'Atom4 index', 'enumeration': ('Indx4',), 'format_string': '', 'help_text': 'The column for the fourth atom index.', 'kind': 'string'}, 'only first id': {'default': 'yes', 'default_units': '', 'description': 'First id, then blanks:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to put just the first id followed by empty cells.', 'kind': 'boolean'}, 'out-of-plane table': {'default': 'out-of-planes', 'default_units': '', 'description': 'Out-Of-Plane table:', 'enumeration': ('out-of-planes',), 'format_string': '', 'help_text': 'The table to output out-of-planes.', 'kind': 'string'}, 'results': {'default': {}, 'default_units': '', 'description': 'results', 'enumeration': (), 'format_string': '', 'help_text': 'The results to save to variables or in tables.', 'kind': 'dictionary'}, 'specification': {'default': '', 'default_units': '', 'description': 'Bonds, angles,...:', 'enumeration': (), 'format_string': '', 'help_text': 'A string listing of bonds, angle, torsions, and out of planes separated by commas and/or blanks. The atoms are numbered from 1.', 'kind': 'string'}, 'table': {'default': 'valence terms', 'default_units': '', 'description': 'Table:', 'enumeration': ('valence terms',), 'format_string': '', 'help_text': 'The table to output valence terms.', 'kind': 'string'}, 'table output': {'default': 'none', 'description': 'Table output:', 'enumeration': ('none', 'to a single table', 'each term to separate tables'), 'format_string': '', 'help_text': 'Whether and how to output to tables.', 'kind': 'enum'}, 'target': {'default': 'all', 'description': 'Target:', 'enumeration': ('all', 'bonds', 'angles', 'dihedrals', 'bonds and angles', 'specified terms'), 'format_string': '', 'help_text': 'What geometric parameters to calculate.', 'kind': 'enum'}, 'term column': {'default': 'Term', 'default_units': '', 'description': 'Term using elements', 'enumeration': ('Term',), 'format_string': '', 'help_text': 'The column for the term using elements, e.g. C-H.', 'kind': 'string'}, 'term type column': {'default': '', 'default_units': '', 'description': 'Type of term', 'enumeration': ('Type of term',), 'format_string': '', 'help_text': 'The type of term: bond, angle, dihedral, oop.', 'kind': 'string'}, 'value column': {'default': 'Value (Å or º)', 'default_units': '', 'description': 'Value of term', 'enumeration': ('Value (Å or º)',), 'format_string': '', 'help_text': 'The column for the value of the term.', 'kind': 'string'}}#
geometry_analysis_step.geometry_analysis_step module#
- class geometry_analysis_step.geometry_analysis_step.GeometryAnalysisStep(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.
The dictionary for the description is the class variable just below these comments. The fields are as follows:
- my_description{str, str}
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 Geometry Analysis 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”, “Control”, “Custom”, “Data”, and “Simulations”.
- 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 (keyword arguments) – Various keyword 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:
- create_tk_node(canvas=None, **kwargs)[source]#
Create and return the graphical Tk node object.
- Parameters:
canvas (tk.Canvas) – The Tk Canvas widget
**kwargs (keyword arguments) – Various keyword 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:
- description()[source]#
Return a description of what this step does.
- Returns:
description
- Return type:
dict(str, str)
- my_description = {'description': 'An interface for Geometry Analysis', 'group': 'Analysis', 'name': 'Geometry Analysis'}#
geometry_analysis_step.metadata module#
This file contains metadata describing the results from GeometryAnalysis
- geometry_analysis_step.metadata.metadata = {'results': {'total_energy': {'calculation': ['energy', 'optimization'], 'description': 'The total energy', 'dimensionality': 'scalar', 'property': 'total energy#GeometryAnalysis#{model}', 'type': 'float', 'units': 'E_h'}}}#
Properties that GeometryAnalysis 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#GeometryAnalysis#{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.
geometry_analysis_step.tk_geometry_analysis module#
The graphical part of a Geometry Analysis step
- class geometry_analysis_step.tk_geometry_analysis.TkGeometryAnalysis(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#
Bases:
TkNode
The graphical part of a Geometry Analysis 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
- namespace#
The namespace of the current step.
- Type:
str
- tk_subflowchart#
A graphical Flowchart representing a subflowchart
- Type:
TkFlowchart
- 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 Geometry Analysis_parameters.py
- Type:
dict
See also
GeometryAnalysis
,TkGeometryAnalysis
,GeometryAnalysisParameters
- create_dialog()[source]#
Create the dialog. A set of widgets will be chosen by default based on what is specified in the Geometry Analysis_parameters module.
- Parameters:
None –
- Return type:
None
See also
Module contents#
geometry_analysis_step A SEAMM plug-in for analysis of the geometry of particularly small molecules