rdkit_step package#
Submodules#
rdkit_step.metadata module#
This file contains metadata to help describe the featurizers.
rdkit_step.rdkit module#
Non-graphical part of the RDKit step in a SEAMM flowchart
- class rdkit_step.rdkit.Rdkit(flowchart=None, title='RDKit', extension=None, logger=<Logger rdkit_step.rdkit (WARNING)>)[source]#
Bases:
Node
The non-graphical part of a RDKit step in a flowchart.
Parmaeters#
- parserconfigargparse.ArgParser
The parser object.
- optionstuple
It contains a two item tuple containing the populated namespace and the list of remaining argument strings.
- subflowchartseamm.Flowchart
A SEAMM Flowchart object that represents a subflowchart, if needed.
- parametersRdkitParameters
The control parameters for RDKit.
See also
TkRdkit
,Rdkit
,RdkitParameters
- 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.
- property version#
The semantic version of this module.
rdkit_step.rdkit_parameters module#
Control parameters for the RDKit step in a SEAMM flowchart
- class rdkit_step.rdkit_parameters.RdkitParameters(defaults={}, data=None)[source]#
Bases:
Parameters
The control parameters for RDKit.
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 – 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.
See also
Rdkit
,TkRdkit
,Rdkit
,RdkitParameters
,RDKitStep
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 = {'features': {'default': [], 'default_units': None, 'description': 'RDKit Descriptors', 'enumeration': (), 'format_string': '', 'help_text': 'The list of RDKit descriptors', 'kind': 'list'}, 'table': {'default': 'table1', 'default_units': '', 'description': 'Table to use:', 'enumeration': None, 'format_string': '', 'help_text': 'Table to store the features', 'kind': 'string'}, 'where': {'default': 'Database', 'default_units': '', 'description': 'Where to store the features:', 'enumeration': ('Database', 'Table', 'Both'), 'format_string': '', 'help_text': 'Where to store the features', 'kind': 'string'}}#
rdkit_step.rdkit_step module#
- class rdkit_step.rdkit_step.RdkitStep(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 RDKit 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:
See also
Rdkit
- 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:
See also
TkRdkit
- my_description = {'description': 'An interface for RDKit', 'group': 'Featurizers', 'name': 'RDKit'}#
rdkit_step.tk_rdkit module#
The graphical part of a RDKit step
- class rdkit_step.tk_rdkit.TkRdkit(tk_flowchart=None, node=None, canvas=None, x=None, y=None, w=200, h=50)[source]#
Bases:
TkNode
The graphical part of a RDKit step in a flowchart.
Paramaters#
- tk_flowchartTkFlowchart = None
The flowchart that we belong to.
- nodeNode = None
The corresponding node of the non-graphical flowchart
- namespacestr
The namespace of the current step.
- tk_subflowchartTkFlowchart
A graphical Flowchart representing a subflowchart
- canvas: tkCanvas = None
The Tk Canvas to draw on
- dialogDialog
The Pmw dialog object
- xint = None
The x-coordinate of the center of the picture of the node
- yint = None
The y-coordinate of the center of the picture of the node
- wint = 200
The width in pixels of the picture of the node
- hint = 50
The height in pixels of the picture of the node
- self[widget]dict
A dictionary of tk widgets built using the information contained in RDKit_parameters.py
See also
Rdkit
,TkRdkit
,RdkitParameters
- edit()[source]#
Present a dialog for editing the RDKit input
- Parameters:
None –
- Return type:
None
See also
- 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
- load_dict(tree, parent, metadata)[source]#
Custom code to load the dictionary in the test. NB. the ‘state=False’ argument prevents insert from working out the state of the parent nodes every time an item is inserted. This is done at the end with ‘tree.state()’
Module contents#
rdkit_step A SEAMM plug-in for RDKit