thermomechanical_step package#
Submodules#
thermomechanical_step.metadata module#
This file contains metadata describing the results from Thermomechanical step
- thermomechanical_step.metadata.metadata = {'results': {'A - U0': {'description': 'Helmholtz free energy', 'dimensionality': 'nTs', 'property': 'A - U0#Thermomechanical#{model}', 'type': 'json', 'units': 'kJ/mol'}, 'Cij': {'description': 'elastic constants', 'dimensionality': '[6][6]', 'type': 'float', 'units': 'GPa'}, 'Cv': {'description': 'Constant volume heat capacity', 'dimensionality': 'nTs', 'property': 'Cv#Thermomechanical#{model}', 'type': 'json', 'units': 'J/mol/K'}, 'Eh': {'description': 'Hill Young modulus', 'dimensionality': 'scalar', 'property': 'Young modulus#Thermomechanical#{model}', 'type': 'float', 'units': 'GPa'}, 'Er': {'description': 'Reuss Young modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'Ev': {'description': 'Voigt Young modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'Gh': {'description': 'Hill shear modulus', 'dimensionality': 'scalar', 'property': 'shear modulus#Thermomechanical#{model}', 'type': 'float', 'units': 'GPa'}, 'Gr': {'description': 'Reuss shear modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'Gruneisen parameter': {'description': 'Gruneisen parameter', 'dimensionality': 'scalar', 'property': 'Gruneisen parameter#Thermomechanical#{model}', 'type': 'float', 'units': ''}, 'Gv': {'description': 'Voigt shear modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'Hv_chen': {'description': 'Vickers hardness [Chen]', 'dimensionality': 'scalar', 'property': 'Vickers hardness [Chen]#Thermomechanical#{model}', 'type': 'float', 'units': ''}, 'Hv_tian': {'description': 'Vickers hardness [Tian]', 'dimensionality': 'scalar', 'property': 'Vickers hardness [Tian]#Thermomechanical#{model}', 'type': 'float', 'units': ''}, 'Kh': {'description': 'Hill bulk modulus', 'dimensionality': 'scalar', 'property': 'bulk modulus#Thermomechanical#{model}', 'type': 'float', 'units': 'GPa'}, 'Kr': {'description': 'Reuss bulk modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'Kv': {'description': 'Voigt bulk modulus', 'dimensionality': 'scalar', 'type': 'float', 'units': 'GPa'}, 'P': {'description': 'Pressure', 'dimensionality': '[nPs]', 'format': '.2f', 'property': 'P#Thermomechanical#{model}', 'type': 'float', 'units': 'atm'}, 'Pcauchy': {'description': 'Cauchy pressure', 'dimensionality': 'scalar', 'property': 'Pcauchy#Thermomechanical#{model}', 'type': 'float', 'units': 'GPa'}, 'S': {'description': 'Entropy', 'dimensionality': 'nTs', 'property': 'S#Thermomechanical#{model}', 'type': 'json', 'units': 'J/mol/K'}, 'Sij': {'description': 'compliance matrix', 'dimensionality': '[6][6]', 'type': 'float', 'units': '1/GPa'}, 'T': {'description': 'Temperature', 'dimensionality': '[nTs]', 'format': '.2f', 'property': 'T#Thermomechanical#{model}', 'type': 'float', 'units': 'K'}, 'Td': {'description': 'Debye temperature', 'dimensionality': 'scalar', 'property': 'Debye temperature#Thermomechanical#{model}', 'type': 'float', 'units': 'K'}, 'U - U0': {'description': 'Internal energy', 'dimensionality': 'nTs', 'property': 'U - U0#Thermomechanical#{model}', 'type': 'json', 'units': 'kJ/mol'}, 'alpha': {'description': 'Linear coefficient of thermal expansion', 'dimensionality': 'nTs', 'property': 'alpha#Thermomechanical#{model}', 'type': 'json', 'units': '1/K'}, 'alpha(V)': {'description': 'volumetric coefficient of thermal expansion', 'dimensionality': 'scalar', 'format': '.2g', 'type': 'float', 'units': '1/K'}, 'alpha(a)': {'description': 'linear coefficient of thermal expansion in cell a', 'dimensionality': 'scalar', 'format': '.2g', 'type': 'float', 'units': '1/K'}, 'alpha(b)': {'description': 'linear coefficient of thermal expansion in cell b', 'dimensionality': 'scalar', 'format': '.2g', 'type': 'float', 'units': '1/K'}, 'alpha(c)': {'description': 'linear coefficient of thermal expansion in cell c', 'dimensionality': 'scalar', 'format': '.2g', 'type': 'float', 'units': '1/K'}, 'k_pugh': {'description': "Pugh's ductility criterion", 'dimensionality': 'scalar', 'property': "Pugh's ductility criterion#Thermomechanical#{model}", 'type': 'float', 'units': ''}, 'mu_h': {'description': 'Hill Poisson ratio', 'dimensionality': 'scalar', 'property': 'Poisson ratio#Thermomechanical#{model}', 'type': 'float', 'units': ''}, 'mu_r': {'description': 'Reuss Poisson ratio', 'dimensionality': 'scalar', 'type': 'float', 'units': ''}, 'mu_v': {'description': 'Voigt Poisson ratio', 'dimensionality': 'scalar', 'type': 'float', 'units': ''}, 'stress': {'description': 'stress', 'dimensionality': '[6]', 'type': 'float', 'units': 'GPa'}, 'vl': {'description': 'longitudinal sound velocity', 'dimensionality': 'scalar', 'property': 'longitudinal sound velocity#Thermomechanical#{model}', 'type': 'float', 'units': 'm/s'}, 'vm': {'description': 'mean sound velocity', 'dimensionality': 'scalar', 'property': 'mean sound velocity#Thermomechanical#{model}', 'type': 'float', 'units': 'm/s'}, 'vt': {'description': 'transverse sound velocity', 'dimensionality': 'scalar', 'property': 'transverse sound velocity#Thermomechanical#{model}', 'type': 'float', 'units': 'm/s'}}}#
Description of the computational models for Thermomechanical.
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", }, }, }, }, }, }
thermomechanical_step.thermomechanical module#
Non-graphical part of the Thermomechanical step in a SEAMM flowchart
- class thermomechanical_step.thermomechanical.Thermomechanical(flowchart=None, title='Thermomechanical', namespace='org.molssi.seamm', extension=None, logger=<Logger thermomechanical_step.thermomechanical (WARNING)>)[source]#
Bases:
NodeThe non-graphical part of a Thermomechanical 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 Thermomechanical.
See also
TkThermomechanical,Thermomechanical,ThermomechanicalParameters- 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 the Thermomechanical step.
- Parameters:
None
- Returns:
The next node object in the flowchart.
- Return type:
seamm.Node
- property version#
The semantic version of this module.
thermomechanical_step.thermomechanical_parameters module#
Control parameters for the Thermomechanical step in a SEAMM flowchart
- class thermomechanical_step.thermomechanical_parameters.ThermomechanicalParameters(defaults={}, data=None)[source]#
Bases:
ParametersThe control parameters for Thermomechanical.
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
Thermomechanical,TkThermomechanical,Thermomechanical,ThermomechanicalParameters,ThermomechanicalStep- parameters = {'P': {'default': '1.0', 'default_units': 'atm', 'description': 'Pressures:', 'enumeration': (), 'format_string': '', 'help_text': 'The pressures for the thermomechanical properties.', 'kind': 'string'}, 'T': {'default': '298.15', 'default_units': 'K', 'description': 'Temperatures:', 'enumeration': (), 'format_string': '', 'help_text': 'The temperatures for the thermomechanical properties.', 'kind': 'string'}, 'elastic constants': {'default': 'no', 'default_units': '', 'description': 'Calculate elastic constants:', 'enumeration': ('yes', 'no'), 'format_string': '', 'help_text': 'Whether to calculate the elastic constants.', 'kind': 'boolean'}, 'on error': {'default': 'keep all subdirectories', 'default_units': '', 'description': 'On error:', 'enumeration': ('keep last subdirectory', 'keep all subdirectories', 'delete all subdirectories'), 'format_string': '', 'help_text': 'Which subdirectories to keep if there is an error.', 'kind': 'enum'}, 'on success': {'default': 'keep last subdirectory', 'default_units': '', 'description': 'On success:', 'enumeration': ('keep last subdirectory', 'keep all subdirectories', 'delete all subdirectories'), 'format_string': '', 'help_text': 'Which subdirectories to keep.', 'kind': 'enum'}, 'results': {'default': {}, 'default_units': None, 'description': 'results', 'enumeration': (), 'format_string': '', 'help_text': 'The results to save to variables or in tables.', 'kind': 'dictionary'}, 'state point definition': {'default': 'as given', 'default_units': '', 'description': 'Enter state points as:', 'enumeration': ('as given', 'lists of Ps and Ts', 'list of P, T pairs'), 'format_string': '', 'help_text': 'How the state points will be defined', 'kind': 'enum'}, 'state points': {'default': '(298.15 K, 1 atm)', 'default_units': '', 'description': 'Temperatures:', 'enumeration': (), 'format_string': '', 'help_text': 'The temperatures for the thermomechanical properties.', 'kind': 'string'}, 'step size': {'default': 0.01, 'default_units': '', 'description': 'Strain step:', 'enumeration': (), 'format_string': '.2f', 'help_text': 'The size of the step in strain for elastic constants.', 'kind': 'float'}, 'thermochemistry Ts': {'default': '1:10,20:100:10,125:275:25,298.15,300:1000:50,1100:3000:100', 'default_units': '', 'description': 'Temperatures for thermochemistry (K):', 'enumeration': (), 'format_string': '', 'help_text': 'The temperatures for the thermochemistry properties.', 'kind': 'string'}}#
thermomechanical_step.thermomechanical_step module#
- class thermomechanical_step.thermomechanical_step.ThermomechanicalStep(flowchart=None, gui=None)[source]#
Bases:
objectHelper 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 Thermomechanical 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 calculating thermomechanical properties', 'group': 'Properties', 'name': 'Thermomechanical'}#
thermomechanical_step.tk_thermomechanical module#
The graphical part of a Thermomechanical step
- class thermomechanical_step.tk_thermomechanical.TkThermomechanical(tk_flowchart=None, node=None, namespace='org.molssi.seamm.tk', canvas=None, x=None, y=None, w=200, h=50)[source]#
Bases:
TkNodeThe graphical part of a Thermomechanical 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 Thermomechanical_parameters.py
- Type:
dict
See also
Thermomechanical,TkThermomechanical,ThermomechanicalParameters- create_dialog()[source]#
Create the dialog. A set of widgets will be chosen by default based on what is specified in the Thermomechanical_parameters module.
- Parameters:
None
- Return type:
None
See also
- reset_dialog(widget=None)[source]#
Layout the widgets in the dialog.
The widgets are chosen by default from the information in Thermomechanical parameters.
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
See also
Module contents#
thermomechanical_step A SEAMM plug-in for calculating thermomechanical properties