properties_step package#

Submodules#

properties_step.metadata module#

This file contains metadata describing the results from Properties

properties_step.metadata.metadata = {}#

Description of the computational models for Properties.

Hamiltonians, approximations, and basis set or parameterizations, only if appropriate for this code. For example:

metadata["computational models"] = {
    "Hartree-Fock": {
        "models": {
            "PM7": {
                "parameterizations": {
                    "PM7": {
                        "elements": "1-60,62-83",
                        "periodic": True,
                        "reactions": True,
                        "optimization": True,
                        "code": "mopac",
                    },
                    "PM7-TS": {
                        "elements": "1-60,62-83",
                        "periodic": True,
                        "reactions": True,
                        "optimization": False,
                        "code": "mopac",
                    },
                },
            },
        },
    },
}

properties_step.properties module#

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

class properties_step.properties.Properties(flowchart=None, title='Properties', extension=None, logger=<Logger properties_step.properties (WARNING)>)[source]#

Bases: Node

The non-graphical part of a Properties 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 Properties.

Type:

PropertiesParameters

See also

TkProperties, Properties, PropertiesParameters

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

export_to_table(P)[source]#

Export the selected properties to the table given.

Parameters:

P (dict) – The control parameters

property git_revision#

The git version of this module.

run()[source]#

Run a Properties step.

Parameters:

None

Returns:

The next node object in the flowchart.

Return type:

seamm.Node

property version#

The semantic version of this module.

properties_step.properties_parameters module#

Control parameters for the Properties step in a SEAMM flowchart

class properties_step.properties_parameters.PropertiesParameters(defaults={}, data=None)[source]#

Bases: Parameters

The control parameters for Properties.

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

Properties, TkProperties, Properties, PropertiesStep

parameters = {'method': {'default': 'export to table', 'default_units': '', 'description': 'What to do:', 'enumeration': ('export to table', 'append row to table', 'add to current row of table'), 'format_string': 's', 'help_text': 'What to do with the properties', 'kind': 'enumeration'}, 'pattern': {'default': '[*]', 'default_units': '', 'description': 'With name matching (list):', 'enumeration': '[*]', 'format_string': '', 'help_text': 'A list of glob-style patterns for selecting systems or configurations.', 'kind': 'list'}, 'properties': {'default': '[*]', 'default_units': '', 'description': 'Properties matching (list):', 'enumeration': ('[*]',), 'format_string': '', 'help_text': 'A list of glob-style patterns for matching the properties.', 'kind': 'list'}, 'table': {'default': 'properties', 'default_units': '', 'description': 'Table:', 'enumeration': (), 'format_string': '', 'help_text': 'The name of the table.', 'kind': 'string'}, 'target': {'default': 'configurations', 'default_units': '', 'description': 'Properties of:', 'enumeration': ('configurations', 'systems'), 'format_string': 's', 'help_text': 'What to do with the properties', 'kind': 'enumeration'}}#

properties_step.properties_step module#

class properties_step.properties_step.PropertiesStep(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 felds 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 Properties 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:

Properties

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:

TkProperties

description()[source]#

Return a description of what this step does.

Returns:

description

Return type:

dict(str, str)

my_description = {'description': 'An interface for properties in the database', 'group': 'Data', 'name': 'Properties'}#

properties_step.tk_properties module#

The graphical part of a Properties step

class properties_step.tk_properties.TkProperties(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#

Bases: TkNode

The graphical part of a Properties 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 Properties_parameters.py

Type:

dict

See also

Properties, TkProperties, PropertiesParameters

create_dialog()[source]#

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

Parameters:

None

Return type:

None

reset_dialog(widget=None)[source]#

Layout the widgets in the dialog.

The widgets are chosen by default from the information in Properties_parameter.

This function simply lays them out row by row with aligned labels. You may wish a more complicated layout that is controlled by values of some of the control parameters. If so, edit or override this method

Parameters:

widget (Tk Widget = 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

TkProperties.edit

Module contents#

properties_step A SEAMM plug-in for Properties