composite-step 2026.11.11__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. composite_step-2026.11.11/AUTHORS.rst +5 -0
  2. composite_step-2026.11.11/CONTRIBUTING.rst +113 -0
  3. composite_step-2026.11.11/HISTORY.rst +15 -0
  4. composite_step-2026.11.11/LICENSE +31 -0
  5. composite_step-2026.11.11/MANIFEST.in +14 -0
  6. composite_step-2026.11.11/PKG-INFO +125 -0
  7. composite_step-2026.11.11/README.rst +61 -0
  8. composite_step-2026.11.11/composite_step/__init__.py +26 -0
  9. composite_step-2026.11.11/composite_step/_version.py +21 -0
  10. composite_step-2026.11.11/composite_step/composite.py +147 -0
  11. composite_step-2026.11.11/composite_step/composite_parameters.py +101 -0
  12. composite_step-2026.11.11/composite_step/composite_step.py +198 -0
  13. composite_step-2026.11.11/composite_step/data/properties.csv +1 -0
  14. composite_step-2026.11.11/composite_step/data/recipes/r2SCAN-3c-HO.yaml +21 -0
  15. composite_step-2026.11.11/composite_step/data/recipes/revDSD-r2SCAN-3c-HO.yaml +25 -0
  16. composite_step-2026.11.11/composite_step/data/references.bib +40 -0
  17. composite_step-2026.11.11/composite_step/evaluate.py +331 -0
  18. composite_step-2026.11.11/composite_step/metadata.py +145 -0
  19. composite_step-2026.11.11/composite_step/recipes.py +752 -0
  20. composite_step-2026.11.11/composite_step/substep.py +99 -0
  21. composite_step-2026.11.11/composite_step/tk_composite.py +209 -0
  22. composite_step-2026.11.11/composite_step.egg-info/PKG-INFO +125 -0
  23. composite_step-2026.11.11/composite_step.egg-info/SOURCES.txt +59 -0
  24. composite_step-2026.11.11/composite_step.egg-info/dependency_links.txt +1 -0
  25. composite_step-2026.11.11/composite_step.egg-info/entry_points.txt +2 -0
  26. composite_step-2026.11.11/composite_step.egg-info/requires.txt +7 -0
  27. composite_step-2026.11.11/composite_step.egg-info/top_level.txt +1 -0
  28. composite_step-2026.11.11/composite_step.egg-info/zip-safe +1 -0
  29. composite_step-2026.11.11/docs/Makefile +177 -0
  30. composite_step-2026.11.11/docs/_static/SEAMM Inverted 288x181.png +0 -0
  31. composite_step-2026.11.11/docs/_static/SEAMM logo.png +0 -0
  32. composite_step-2026.11.11/docs/_static/molssi_main_logo.png +0 -0
  33. composite_step-2026.11.11/docs/_static/molssi_main_logo_inverted_white.png +0 -0
  34. composite_step-2026.11.11/docs/_static/molssi_square.png +0 -0
  35. composite_step-2026.11.11/docs/_static/nsf.png +0 -0
  36. composite_step-2026.11.11/docs/api/index.rst +17 -0
  37. composite_step-2026.11.11/docs/authors.rst +1 -0
  38. composite_step-2026.11.11/docs/conf.py +306 -0
  39. composite_step-2026.11.11/docs/developer_guide/campaigns/2026-11-11/NOTES_phase1.rst +57 -0
  40. composite_step-2026.11.11/docs/developer_guide/campaigns/2026-11-11/index.rst +20 -0
  41. composite_step-2026.11.11/docs/developer_guide/campaigns/index.rst +17 -0
  42. composite_step-2026.11.11/docs/developer_guide/contributing.rst +1 -0
  43. composite_step-2026.11.11/docs/developer_guide/index.rst +28 -0
  44. composite_step-2026.11.11/docs/developer_guide/installation.rst +54 -0
  45. composite_step-2026.11.11/docs/developer_guide/usage.rst +7 -0
  46. composite_step-2026.11.11/docs/getting_started/index.rst +39 -0
  47. composite_step-2026.11.11/docs/history.rst +1 -0
  48. composite_step-2026.11.11/docs/index.rst +72 -0
  49. composite_step-2026.11.11/docs/make.bat +242 -0
  50. composite_step-2026.11.11/docs/user_guide/index.rst +136 -0
  51. composite_step-2026.11.11/requirements.txt +7 -0
  52. composite_step-2026.11.11/requirements_dev.txt +10 -0
  53. composite_step-2026.11.11/requirements_install.txt +4 -0
  54. composite_step-2026.11.11/setup.cfg +27 -0
  55. composite_step-2026.11.11/setup.py +86 -0
  56. composite_step-2026.11.11/tests/__init__.py +3 -0
  57. composite_step-2026.11.11/tests/test_composite_step.py +13 -0
  58. composite_step-2026.11.11/tests/test_evaluate.py +254 -0
  59. composite_step-2026.11.11/tests/test_recipes.py +331 -0
  60. composite_step-2026.11.11/versioneer.py +1883 -0
@@ -0,0 +1,5 @@
1
+ Development Team
2
+ ----------------
3
+
4
+ * Paul Saxe <psaxe@molssi.org> (Lead)
5
+ * Why don't you join the team? Become a contributor!
@@ -0,0 +1,113 @@
1
+ .. highlight:: shell
2
+
3
+ ============
4
+ Contributing
5
+ ============
6
+
7
+ Contributions are welcome, and they are greatly appreciated! Every
8
+ little bit helps, and credit will always be given.
9
+
10
+ You can contribute in many ways:
11
+
12
+ Types of Contributions
13
+ ----------------------
14
+
15
+ Report Bugs
16
+ ~~~~~~~~~~~
17
+
18
+ Report bugs at https://github.com/molssi-seamm/composite_step/issues.
19
+
20
+ If you are reporting a bug, please include:
21
+
22
+ * Your operating system name and version.
23
+ * Any details about your local setup that might be helpful in troubleshooting.
24
+ * Detailed steps to reproduce the bug.
25
+
26
+ Fix Bugs
27
+ ~~~~~~~~
28
+
29
+ Look through the GitHub issues for bugs. Anything tagged with "bug"
30
+ and "help wanted" is open to whoever wants to implement it.
31
+
32
+ Implement Features
33
+ ~~~~~~~~~~~~~~~~~~
34
+
35
+ Look through the GitHub issues for features. Anything tagged with "enhancement"
36
+ and "help wanted" is open to whoever wants to implement it.
37
+
38
+ Write Documentation
39
+ ~~~~~~~~~~~~~~~~~~~
40
+
41
+ Composite Step could always use more documentation, whether as part of the
42
+ official Composite Step docs, in docstrings, or even on the web in blog posts,
43
+ articles, and such.
44
+
45
+ Submit Feedback
46
+ ~~~~~~~~~~~~~~~
47
+
48
+ The best way to send feedback is to file an issue at https://github.com/molssi-seamm/composite_step/issues.
49
+
50
+ If you are proposing a feature:
51
+
52
+ * Explain in detail how it would work.
53
+ * Keep the scope as narrow as possible, to make it easier to implement.
54
+ * Remember that this is a volunteer-driven project, and that contributions
55
+ are welcome :)
56
+
57
+ Get Started!
58
+ ------------
59
+
60
+ Ready to contribute? Here's how to set up `composite_step` for local development.
61
+
62
+ 1. Fork the `composite_step` repo on GitHub.
63
+ 2. Clone your fork locally::
64
+
65
+ $ git clone git@github.com:your_name_here/composite_step.git
66
+
67
+ 3. Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development::
68
+
69
+ $ mkvirtualenv composite_step
70
+ $ cd composite_step/
71
+ $ python setup.py develop
72
+
73
+ 4. Create a branch for local development::
74
+
75
+ $ git checkout -b name-of-your-bugfix-or-feature
76
+
77
+ Now you can make your changes locally.
78
+
79
+ 5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
80
+
81
+ $ flake8 composite_step tests
82
+ $ python setup.py test or py.test
83
+ $ tox
84
+
85
+ To get flake8 and tox, just pip install them into your virtualenv.
86
+
87
+ 6. Commit your changes and push your branch to GitHub::
88
+
89
+ $ git add .
90
+ $ git commit -m "Your detailed description of your changes."
91
+ $ git push origin name-of-your-bugfix-or-feature
92
+
93
+ 7. Submit a pull request through the GitHub website.
94
+
95
+ Pull Request Guidelines
96
+ -----------------------
97
+
98
+ Before you submit a pull request, check that it meets these guidelines:
99
+
100
+ 1. The pull request should include tests.
101
+ 2. If the pull request adds functionality, the docs should be updated. Put
102
+ your new functionality into a function with a docstring, and add the
103
+ feature to the list in README.rst.
104
+ 3. The pull request should work for Python 2.6, 2.7, 3.3, 3.4 and 3.5, and for PyPy. Check
105
+ https://travis-ci.org/molssi-seamm/composite_step/pull_requests
106
+ and make sure that the tests pass for all supported Python versions.
107
+
108
+ Tips
109
+ ----
110
+
111
+ To run a subset of tests::
112
+
113
+ $ py.test tests.test_composite_step
@@ -0,0 +1,15 @@
1
+ =======
2
+ History
3
+ =======
4
+
5
+ 2026.11.11 -- First release: composite methods as model chemistries
6
+ * Composite methods are described by recipes, short YAML files that say how the
7
+ energy is made from ordinary calculations: the geometry and frequency level,
8
+ single points at that geometry, and a formula that combines them, with
9
+ basis-set extrapolations, scaling and empirical terms.
10
+ * Every recipe is a model chemistry, ``SEAMM:CMP@<recipe>``, for the steps that
11
+ take one. Its components are ordinary calculations with their own settings
12
+ fingerprints, so the fragment store reuses them.
13
+ * The recipes ``r2SCAN-3c-HO`` and ``revDSD-r2SCAN-3c-HO`` are shipped; they are
14
+ the Thermochemistry step's ``quick`` and ``default`` presets.
15
+ * The Composite step itself does nothing yet and is not offered in the editor.
@@ -0,0 +1,31 @@
1
+
2
+ BSD 3-Clause License
3
+
4
+ Copyright (c) 2026, Paul Saxe
5
+ All rights reserved.
6
+
7
+ Redistribution and use in source and binary forms, with or without
8
+ modification, are permitted provided that the following conditions are met:
9
+
10
+ 1. Redistributions of source code must retain the above copyright notice, this
11
+ list of conditions and the following disclaimer.
12
+
13
+ 2. Redistributions in binary form must reproduce the above copyright notice,
14
+ this list of conditions and the following disclaimer in the documentation
15
+ and/or other materials provided with the distribution.
16
+
17
+ 3. Neither the name of the copyright holder nor the names of its
18
+ contributors may be used to endorse or promote products derived from
19
+ this software without specific prior written permission.
20
+
21
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
22
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
24
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
25
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
27
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
28
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
29
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31
+
@@ -0,0 +1,14 @@
1
+ include AUTHORS.rst
2
+ include CONTRIBUTING.rst
3
+ include HISTORY.rst
4
+ include LICENSE
5
+ include README.rst
6
+ include requirements*
7
+ include versioneer.py
8
+
9
+ recursive-include composite_step/data *
10
+ recursive-include tests *
11
+ recursive-include docs *.rst conf.py Makefile make.bat *.jpg *.png *.gif
12
+
13
+ recursive-exclude * __pycache__
14
+ recursive-exclude * *.py[co]
@@ -0,0 +1,125 @@
1
+ Metadata-Version: 2.4
2
+ Name: composite_step
3
+ Version: 2026.11.11
4
+ Summary: A SEAMM plug-in for composite methods: energies from recipes of ordinary calculations
5
+ Home-page: https://github.com/molssi-seamm/composite_step
6
+ Author: Paul Saxe
7
+ Author-email: psaxe@molssi.org
8
+ License: BSD-3-Clause
9
+ Keywords: SEAMM,SEAMMplugin,flowchart
10
+ Platform: Linux
11
+ Platform: Mac OS-X
12
+ Platform: Unix
13
+ Platform: Windows
14
+ Classifier: Environment :: Plugins
15
+ Classifier: Development Status :: 2 - Pre-Alpha
16
+ Classifier: Intended Audience :: Science/Research
17
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
18
+ Classifier: Topic :: Scientific/Engineering :: Physics
19
+ Classifier: License :: OSI Approved :: BSD License
20
+ Classifier: Natural Language :: English
21
+ Classifier: Programming Language :: Python :: 3 :: Only
22
+ Classifier: Programming Language :: Python :: 3.12
23
+ Requires-Python: >=3.12
24
+ Description-Content-Type: text/x-rst
25
+ License-File: LICENSE
26
+ License-File: AUTHORS.rst
27
+ Requires-Dist: seamm
28
+ Requires-Dist: seamm-util
29
+ Requires-Dist: seamm-widgets
30
+ Requires-Dist: pyyaml
31
+ Requires-Dist: seamm-exec
32
+ Requires-Dist: model-chemistry-step
33
+ Requires-Dist: stevedore
34
+ Dynamic: author
35
+ Dynamic: author-email
36
+ Dynamic: classifier
37
+ Dynamic: description
38
+ Dynamic: description-content-type
39
+ Dynamic: home-page
40
+ Dynamic: keywords
41
+ Dynamic: license
42
+ Dynamic: license-file
43
+ Dynamic: platform
44
+ Dynamic: requires-dist
45
+ Dynamic: requires-python
46
+ Dynamic: summary
47
+
48
+ =======================
49
+ SEAMM Composite Plug-in
50
+ =======================
51
+
52
+ .. image:: https://img.shields.io/github/issues-pr-raw/molssi-seamm/composite_step
53
+ :target: https://github.com/molssi-seamm/composite_step/pulls
54
+ :alt: GitHub pull requests
55
+
56
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/CI/badge.svg
57
+ :target: https://github.com/molssi-seamm/composite_step/actions
58
+ :alt: Build Status
59
+
60
+ .. image:: https://codecov.io/gh/molssi-seamm/composite_step/branch/master/graph/badge.svg
61
+ :target: https://codecov.io/gh/molssi-seamm/composite_step
62
+ :alt: Code Coverage
63
+
64
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/CodeQL/badge.svg
65
+ :target: https://github.com/molssi-seamm/composite_step/security/code-scanning
66
+ :alt: Code Quality
67
+
68
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/Release/badge.svg
69
+ :target: https://molssi-seamm.github.io/composite_step/index.html
70
+ :alt: Documentation Status
71
+
72
+ .. image:: https://img.shields.io/pypi/v/composite_step.svg
73
+ :target: https://pypi.python.org/pypi/composite_step
74
+ :alt: PyPi VERSION
75
+
76
+ A SEAMM plug-in for composite methods: energies from recipes of ordinary calculations
77
+
78
+ * Free software: BSD-3-Clause
79
+ * Documentation: https://molssi-seamm.github.io/composite_step/index.html
80
+ * Code: https://github.com/molssi-seamm/composite_step
81
+
82
+ Features
83
+ --------
84
+
85
+ * Composite methods as model chemistries, ``SEAMM:CMP@<recipe>``, from recipes:
86
+ short YAML files that say how the energy is made from ordinary calculations.
87
+ * A small, checked language for combining the energies: basis-set extrapolations
88
+ (inverse power, exponential HF, Schwenke), scaling and empirical terms.
89
+ * Components are ordinary calculations with their own settings fingerprints, so
90
+ the fragment store reuses them.
91
+ * The shipped recipes ``r2SCAN-3c-HO`` and ``revDSD-r2SCAN-3c-HO``, the
92
+ Thermochemistry step's ``quick`` and ``default`` presets.
93
+
94
+ Acknowledgements
95
+ ----------------
96
+
97
+ This package was created with the `molssi-seamm/cookiecutter-seamm-plugin`_ tool, which
98
+ is based on the excellent Cookiecutter_.
99
+
100
+ .. _Cookiecutter: https://github.com/audreyr/cookiecutter
101
+ .. _`molssi-seamm/cookiecutter-seamm-plugin`: https://github.com/molssi-seamm/cookiecutter-seamm-plugin
102
+
103
+ Developed by the Molecular Sciences Software Institute (MolSSI_),
104
+ which receives funding from the `National Science Foundation`_ under
105
+ award CHE-2136142.
106
+
107
+ .. _MolSSI: https://molssi.org
108
+ .. _`National Science Foundation`: https://www.nsf.gov
109
+
110
+
111
+ =======
112
+ History
113
+ =======
114
+
115
+ 2026.11.11 -- First release: composite methods as model chemistries
116
+ * Composite methods are described by recipes, short YAML files that say how the
117
+ energy is made from ordinary calculations: the geometry and frequency level,
118
+ single points at that geometry, and a formula that combines them, with
119
+ basis-set extrapolations, scaling and empirical terms.
120
+ * Every recipe is a model chemistry, ``SEAMM:CMP@<recipe>``, for the steps that
121
+ take one. Its components are ordinary calculations with their own settings
122
+ fingerprints, so the fragment store reuses them.
123
+ * The recipes ``r2SCAN-3c-HO`` and ``revDSD-r2SCAN-3c-HO`` are shipped; they are
124
+ the Thermochemistry step's ``quick`` and ``default`` presets.
125
+ * The Composite step itself does nothing yet and is not offered in the editor.
@@ -0,0 +1,61 @@
1
+ =======================
2
+ SEAMM Composite Plug-in
3
+ =======================
4
+
5
+ .. image:: https://img.shields.io/github/issues-pr-raw/molssi-seamm/composite_step
6
+ :target: https://github.com/molssi-seamm/composite_step/pulls
7
+ :alt: GitHub pull requests
8
+
9
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/CI/badge.svg
10
+ :target: https://github.com/molssi-seamm/composite_step/actions
11
+ :alt: Build Status
12
+
13
+ .. image:: https://codecov.io/gh/molssi-seamm/composite_step/branch/master/graph/badge.svg
14
+ :target: https://codecov.io/gh/molssi-seamm/composite_step
15
+ :alt: Code Coverage
16
+
17
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/CodeQL/badge.svg
18
+ :target: https://github.com/molssi-seamm/composite_step/security/code-scanning
19
+ :alt: Code Quality
20
+
21
+ .. image:: https://github.com/molssi-seamm/composite_step/workflows/Release/badge.svg
22
+ :target: https://molssi-seamm.github.io/composite_step/index.html
23
+ :alt: Documentation Status
24
+
25
+ .. image:: https://img.shields.io/pypi/v/composite_step.svg
26
+ :target: https://pypi.python.org/pypi/composite_step
27
+ :alt: PyPi VERSION
28
+
29
+ A SEAMM plug-in for composite methods: energies from recipes of ordinary calculations
30
+
31
+ * Free software: BSD-3-Clause
32
+ * Documentation: https://molssi-seamm.github.io/composite_step/index.html
33
+ * Code: https://github.com/molssi-seamm/composite_step
34
+
35
+ Features
36
+ --------
37
+
38
+ * Composite methods as model chemistries, ``SEAMM:CMP@<recipe>``, from recipes:
39
+ short YAML files that say how the energy is made from ordinary calculations.
40
+ * A small, checked language for combining the energies: basis-set extrapolations
41
+ (inverse power, exponential HF, Schwenke), scaling and empirical terms.
42
+ * Components are ordinary calculations with their own settings fingerprints, so
43
+ the fragment store reuses them.
44
+ * The shipped recipes ``r2SCAN-3c-HO`` and ``revDSD-r2SCAN-3c-HO``, the
45
+ Thermochemistry step's ``quick`` and ``default`` presets.
46
+
47
+ Acknowledgements
48
+ ----------------
49
+
50
+ This package was created with the `molssi-seamm/cookiecutter-seamm-plugin`_ tool, which
51
+ is based on the excellent Cookiecutter_.
52
+
53
+ .. _Cookiecutter: https://github.com/audreyr/cookiecutter
54
+ .. _`molssi-seamm/cookiecutter-seamm-plugin`: https://github.com/molssi-seamm/cookiecutter-seamm-plugin
55
+
56
+ Developed by the Molecular Sciences Software Institute (MolSSI_),
57
+ which receives funding from the `National Science Foundation`_ under
58
+ award CHE-2136142.
59
+
60
+ .. _MolSSI: https://molssi.org
61
+ .. _`National Science Foundation`: https://www.nsf.gov
@@ -0,0 +1,26 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """
4
+ composite_step
5
+ A SEAMM plug-in for composite methods: energies from recipes of ordinary calculations
6
+ """
7
+
8
+ # Bring up the classes so that they appear to be directly in
9
+ # the composite_step package.
10
+
11
+ from .composite import Composite # noqa: F401, E501
12
+ from .composite_parameters import CompositeParameters # noqa: F401, E501
13
+ from .composite_step import CompositeStep # noqa: F401, E501
14
+ from .tk_composite import TkComposite # noqa: F401, E501
15
+
16
+ from .metadata import metadata # noqa: F401
17
+
18
+ # Handle versioneer
19
+ from ._version import get_versions
20
+
21
+ __author__ = "Paul Saxe"
22
+ __email__ = "psaxe@molssi.org"
23
+ versions = get_versions()
24
+ __version__ = versions["version"]
25
+ __git_revision__ = versions["full-revisionid"]
26
+ del get_versions, versions
@@ -0,0 +1,21 @@
1
+
2
+ # This file was generated by 'versioneer.py' (0.18) from
3
+ # revision-control system data, or from the parent directory name of an
4
+ # unpacked source archive. Distribution tarballs contain a pre-generated copy
5
+ # of this file.
6
+
7
+ import json
8
+
9
+ version_json = '''
10
+ {
11
+ "date": "2026-11-11T20:16:54-0500",
12
+ "dirty": false,
13
+ "error": null,
14
+ "full-revisionid": "bd87d3e0e8117b78603103c0d6b0de26ee0c75e7",
15
+ "version": "2026.11.11"
16
+ }
17
+ ''' # END VERSION_JSON
18
+
19
+
20
+ def get_versions():
21
+ return json.loads(version_json)
@@ -0,0 +1,147 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """Non-graphical part of the Composite step in a SEAMM flowchart"""
4
+
5
+ import logging
6
+ import importlib.resources
7
+ import pprint # noqa: F401
8
+
9
+ import composite_step
10
+ import molsystem
11
+ import seamm
12
+ from seamm_util import ureg, Q_ # noqa: F401
13
+ import seamm_util.printing as printing
14
+ from seamm_util.printing import FormattedText as __
15
+
16
+ # In addition to the normal logger, two logger-like printing facilities are
17
+ # defined: "job" and "printer". "job" send output to the main job.out file for
18
+ # the job, and should be used very sparingly, typically to echo what this step
19
+ # will do in the initial summary of the job.
20
+ #
21
+ # "printer" sends output to the file "step.out" in this steps working
22
+ # directory, and is used for all normal output from this step.
23
+
24
+ logger = logging.getLogger(__name__)
25
+ job = printing.getPrinter()
26
+ printer = printing.getPrinter("Composite")
27
+
28
+ # Add this module's properties to the standard properties
29
+ path = importlib.resources.files("composite_step") / "data"
30
+ csv_file = path / "properties.csv"
31
+ if path.exists():
32
+ molsystem.add_properties_from_file(csv_file)
33
+
34
+
35
+ class Composite(seamm.Node):
36
+ """
37
+ The non-graphical part of a Composite step in a flowchart.
38
+
39
+ Attributes
40
+ ----------
41
+ parser : configargparse.ArgParser
42
+ The parser object.
43
+
44
+ options : tuple
45
+ It contains a two item tuple containing the populated namespace and the
46
+ list of remaining argument strings.
47
+
48
+ subflowchart : seamm.Flowchart
49
+ A SEAMM Flowchart object that represents a subflowchart, if needed.
50
+
51
+ parameters : CompositeParameters
52
+ The control parameters for Composite.
53
+
54
+ See Also
55
+ --------
56
+ TkComposite,
57
+ Composite, CompositeParameters
58
+ """
59
+
60
+ def __init__(
61
+ self, flowchart=None, title="Composite", extension=None, logger=logger
62
+ ):
63
+ """A step for Composite in a SEAMM flowchart.
64
+
65
+ You may wish to change the title above, which is the string displayed
66
+ in the box representing the step in the flowchart.
67
+
68
+ Parameters
69
+ ----------
70
+ flowchart: seamm.Flowchart
71
+ The non-graphical flowchart that contains this step.
72
+
73
+ title: str
74
+ The name displayed in the flowchart.
75
+ extension: None
76
+ Not yet implemented
77
+ logger : Logger = logger
78
+ The logger to use and pass to parent classes
79
+
80
+ Returns
81
+ -------
82
+ None
83
+ """
84
+ logger.debug(f"Creating Composite {self}")
85
+
86
+ super().__init__(
87
+ flowchart=flowchart,
88
+ title="Composite",
89
+ extension=extension,
90
+ module=__name__,
91
+ logger=logger,
92
+ ) # yapf: disable
93
+
94
+ self._metadata = composite_step.metadata
95
+ self.parameters = composite_step.CompositeParameters()
96
+
97
+ @property
98
+ def version(self):
99
+ """The semantic version of this module."""
100
+ return composite_step.__version__
101
+
102
+ @property
103
+ def git_revision(self):
104
+ """The git version of this module."""
105
+ return composite_step.__git_revision__
106
+
107
+ def description_text(self, P=None):
108
+ """Create the text description of what this step will do.
109
+ The dictionary of control values is passed in as P so that
110
+ the code can test values, etc.
111
+
112
+ Parameters
113
+ ----------
114
+ P: dict
115
+ An optional dictionary of the current values of the control
116
+ parameters.
117
+ Returns
118
+ -------
119
+ str
120
+ A description of the current step.
121
+ """
122
+ if not P:
123
+ P = self.parameters.values_to_dict()
124
+
125
+ text = (
126
+ "Composite methods are used through a Model Chemistry step, as "
127
+ "SEAMM:CMP@<recipe> (e.g. SEAMM:CMP@revDSD-r2SCAN-3c-HO), by the steps "
128
+ "that take a model chemistry, such as Thermochemistry. This step "
129
+ "itself does nothing yet."
130
+ )
131
+
132
+ return self.header + "\n" + __(text, **P, indent=4 * " ").__str__()
133
+
134
+ def run(self):
135
+ """Run a Composite step: print what it does, which is nothing yet.
136
+
137
+ Returns
138
+ -------
139
+ seamm.Node
140
+ The next node object in the flowchart.
141
+ """
142
+ next_node = super().run(printer)
143
+ printer.important(__(self.description_text({}), indent=self.indent))
144
+ return next_node
145
+
146
+ def analyze(self, indent="", **kwargs):
147
+ """Nothing to analyze yet."""
@@ -0,0 +1,101 @@
1
+ # -*- coding: utf-8 -*-
2
+ """
3
+ Control parameters for the Composite step in a SEAMM flowchart
4
+ """
5
+
6
+ import logging
7
+ import seamm
8
+ import pprint # noqa: F401
9
+
10
+ logger = logging.getLogger(__name__)
11
+
12
+
13
+ class CompositeParameters(seamm.Parameters):
14
+ """
15
+ The control parameters for Composite.
16
+
17
+ You need to replace the "time" entry in dictionary below these comments with the
18
+ definitions of parameters to control this step. The keys are parameters for the
19
+ current plugin,the values are dictionaries as outlined below.
20
+
21
+ Examples
22
+ --------
23
+ ::
24
+
25
+ parameters = {
26
+ "time": {
27
+ "default": 100.0,
28
+ "kind": "float",
29
+ "default_units": "ps",
30
+ "enumeration": tuple(),
31
+ "format_string": ".1f",
32
+ "description": "Simulation time:",
33
+ "help_text": ("The time to simulate in the dynamics run.")
34
+ },
35
+ }
36
+
37
+ parameters : {str: {str: str}}
38
+ A dictionary containing the parameters for the current step.
39
+ Each key of the dictionary is a dictionary that contains the
40
+ the following keys:
41
+
42
+ parameters["default"] :
43
+ The default value of the parameter, used to reset it.
44
+
45
+ parameters["kind"] : enum()
46
+ Specifies the kind of a variable. One of "integer", "float", "string",
47
+ "boolean", or "enum"
48
+
49
+ While the "kind" of a variable might be a numeric value, it may still have
50
+ enumerated custom values meaningful to the user. For instance, if the parameter
51
+ is a convergence criterion for an optimizer, custom values like "normal",
52
+ "precise", etc, might be adequate. In addition, any parameter can be set to a
53
+ variable of expression, indicated by having "$" as the first character in the
54
+ field. For example, $OPTIMIZER_CONV.
55
+
56
+ parameters["default_units"] : str
57
+ The default units, used for resetting the value.
58
+
59
+ parameters["enumeration"] : tuple
60
+ A tuple of enumerated values.
61
+
62
+ parameters["format_string"] : str
63
+ A format string for "pretty" output.
64
+
65
+ parameters["description"] : str
66
+ A short string used as a prompt in the GUI.
67
+
68
+ parameters["help_text"] : str
69
+ A longer string to display as help for the user.
70
+
71
+ See Also
72
+ --------
73
+ Composite, TkComposite, Composite CompositeParameters, CompositeStep
74
+ """
75
+
76
+ #: No parameters yet: composites are used through a Model Chemistry step.
77
+ parameters = {}
78
+
79
+ def __init__(self, defaults={}, data=None):
80
+ """
81
+ Initialize the parameters, by default with the parameters defined above
82
+
83
+ Parameters
84
+ ----------
85
+ defaults: dict
86
+ A dictionary of parameters to initialize. The parameters
87
+ above are used first and any given will override/add to them.
88
+ data: dict
89
+ A dictionary of keys and a subdictionary with value and units
90
+ for updating the current, default values.
91
+
92
+ Returns
93
+ -------
94
+ None
95
+ """
96
+
97
+ logger.debug("CompositeParameters.__init__")
98
+
99
+ super().__init__(
100
+ defaults={**CompositeParameters.parameters, **defaults}, data=data
101
+ )