pyorbb 0.12.7__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 (43) hide show
  1. pyorbb-0.12.7/LICENSE +21 -0
  2. pyorbb-0.12.7/PKG-INFO +131 -0
  3. pyorbb-0.12.7/README.md +103 -0
  4. pyorbb-0.12.7/pyproject.toml +169 -0
  5. pyorbb-0.12.7/setup.cfg +4 -0
  6. pyorbb-0.12.7/src/pyorbb/__init__.py +203 -0
  7. pyorbb-0.12.7/src/pyorbb/__main__.py +28 -0
  8. pyorbb-0.12.7/src/pyorbb/analysis/__init__.py +3 -0
  9. pyorbb-0.12.7/src/pyorbb/analysis/mixing.py +886 -0
  10. pyorbb-0.12.7/src/pyorbb/analysis/movie.py +109 -0
  11. pyorbb-0.12.7/src/pyorbb/analysis/sequential.py +437 -0
  12. pyorbb-0.12.7/src/pyorbb/application/components/action_widget.py +35 -0
  13. pyorbb-0.12.7/src/pyorbb/application/components/carousel.py +308 -0
  14. pyorbb-0.12.7/src/pyorbb/application/components/column_dragger.py +122 -0
  15. pyorbb-0.12.7/src/pyorbb/application/components/editable_tabs.py +197 -0
  16. pyorbb-0.12.7/src/pyorbb/application/components/latex_renderer.py +169 -0
  17. pyorbb-0.12.7/src/pyorbb/application/components/orbital_selector.py +580 -0
  18. pyorbb-0.12.7/src/pyorbb/application/components/rich_widgets.py +375 -0
  19. pyorbb-0.12.7/src/pyorbb/application/components/settings.py +635 -0
  20. pyorbb-0.12.7/src/pyorbb/application/components/shadow.py +24 -0
  21. pyorbb-0.12.7/src/pyorbb/application/components/spoilers.py +207 -0
  22. pyorbb-0.12.7/src/pyorbb/application/components/theme_switcher.py +40 -0
  23. pyorbb-0.12.7/src/pyorbb/application/main.py +2187 -0
  24. pyorbb-0.12.7/src/pyorbb/cli_scripts/excel.py +23 -0
  25. pyorbb-0.12.7/src/pyorbb/cli_scripts/open_GUI.py +33 -0
  26. pyorbb-0.12.7/src/pyorbb/cli_scripts/pyorbbparser.py +42 -0
  27. pyorbb-0.12.7/src/pyorbb/nested_dict.py +80 -0
  28. pyorbb-0.12.7/src/pyorbb/orbitals/__init__.py +2 -0
  29. pyorbb-0.12.7/src/pyorbb/orbitals/_symmetry_free.py +32 -0
  30. pyorbb-0.12.7/src/pyorbb/orbitals/adf.py +555 -0
  31. pyorbb-0.12.7/src/pyorbb/orbitals/fragments.py +115 -0
  32. pyorbb-0.12.7/src/pyorbb/orbitals/objects.py +1546 -0
  33. pyorbb-0.12.7/src/pyorbb/plotting/__init__.py +1 -0
  34. pyorbb-0.12.7/src/pyorbb/plotting/orbital_diagram.py +340 -0
  35. pyorbb-0.12.7/src/pyorbb/plotting/simple_orbital_diagram.py +284 -0
  36. pyorbb-0.12.7/src/pyorbb/write_excel.py +729 -0
  37. pyorbb-0.12.7/src/pyorbb.egg-info/PKG-INFO +131 -0
  38. pyorbb-0.12.7/src/pyorbb.egg-info/SOURCES.txt +41 -0
  39. pyorbb-0.12.7/src/pyorbb.egg-info/dependency_links.txt +1 -0
  40. pyorbb-0.12.7/src/pyorbb.egg-info/entry_points.txt +2 -0
  41. pyorbb-0.12.7/src/pyorbb.egg-info/requires.txt +15 -0
  42. pyorbb-0.12.7/src/pyorbb.egg-info/top_level.txt +1 -0
  43. pyorbb-0.12.7/test/test_orbitals.py +155 -0
pyorbb-0.12.7/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2023 TheoCheM group
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
pyorbb-0.12.7/PKG-INFO ADDED
@@ -0,0 +1,131 @@
1
+ Metadata-Version: 2.4
2
+ Name: pyorbb
3
+ Version: 0.12.7
4
+ Summary: PyOrbb is an automated orbital analysis tool used in the TheoCheM group at VU Amsterdam
5
+ Author: Xiaobo Sun, Laurens Groot, Jordi Poater
6
+ Author-email: Yuman Hordijk <y.hordijk@vu.nl>, "Steven E. Beutick" <s.e.beutick@vu.nl>, Tori Gijzen <t.gijzen@vu.nl>, "Trevor A. Hamlin" <t.a.hamlin@vu.nl>, "F. Matthias Bickelhaupt" <f.m.bickelhaupt@vu.nl>, Célia Fonseca Guerra <c.fonsecaguerra@vu.nl>
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: License :: OSI Approved :: MIT License
9
+ Classifier: Operating System :: OS Independent
10
+ Description-Content-Type: text/markdown
11
+ License-File: LICENSE
12
+ Requires-Dist: pyside6-essentials==6.7.3
13
+ Requires-Dist: tcviewer==0.2
14
+ Requires-Dist: tcmu==0.17.2
15
+ Requires-Dist: numpy
16
+ Requires-Dist: matplotlib>=3.5.3
17
+ Requires-Dist: networkx>=2.6.3
18
+ Requires-Dist: numpy>=1.21.6
19
+ Requires-Dist: plams>=2024.106
20
+ Requires-Dist: xlsxwriter>=3.2.2
21
+ Requires-Dist: tcintegral>=1.0.3
22
+ Requires-Dist: pyperclip
23
+ Requires-Dist: platformdirs
24
+ Requires-Dist: beautifulsoup4
25
+ Requires-Dist: pyyaml
26
+ Requires-Dist: ruff==0.0.177
27
+ Dynamic: license-file
28
+
29
+ [![Documentation](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/build_docs.yml/badge.svg)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/build_docs.yml)
30
+ [![Testing](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/testing.yml/badge.svg)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/testing.yml)
31
+ [![Publishing to PyPI](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/pypi_publish.yml/badge.svg?branch=main)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/pypi_publish.yml)
32
+
33
+ # PyOrbb
34
+ Our group aims to empower chemists with state-of-the-art quantum-chemical analysis tools. The latest project is PyOrbb, used for the automated analysis of complex molecular orbital interactions. PyOrbb makes expert orbital analysis available to all chemists, regardless of their theoretical background, ensuring that knowledge knows no bounds!
35
+
36
+ ## Welcome
37
+ Welcome to the PyOrbb project repository. This project is currently led by members of the TheoCheM group at the Vrije Universiteit Amsterdam (Tori Gijzen, Yuman Hordijk, and Trevor Hamlin). We aim to empower computational and non-computational chemists to perform advanced orbital analyses. By presentation of computational data in
38
+
39
+ This README file serves as a central hub providing project-related information. Feel free to navigate directly to specific sections below or simply scroll down to learn more.
40
+
41
+ - [Motivation](#motivation)
42
+ - [Installation](#installation)
43
+ - [Workflow](#workflow)
44
+ - [Usage](#usage)
45
+ - [Examples](#examples)
46
+ - [Get involved](#involved)
47
+ - [Who are we?](#members)
48
+ - [Contact us](#contact)
49
+ - [Find out more](#more_info)
50
+
51
+ We are striving to optimise our application to facilitate anyone’s journey into the realm of advanced orbital analysis. So if you see any points where we can improve, don’t hesitate to contact us or open an issue in this repository!
52
+
53
+ ## Motivation <a name=motivation></a>
54
+ The PyOrbb project aims to assist in advanced orbital analysis for computational chemistry calculations. PyOrbb will generate important orbital interaction schemes and related orbital figures automatically, as well as summarise important information such as SFO coefficients, populations, orbital levels and more. These properties are commonly used in computational chemical research analyses.
55
+
56
+ People often run into the following challenges:
57
+ - Hard to get a clear overview of relevant data.
58
+ - Data acquisition is often done manually, which can be a chaotic and laborious task.
59
+ - The information overload in the output of quantum chemical programs can be intimidating.
60
+
61
+ The aim of the PyOrbb project is:
62
+ - Enhance access to advanced orbital analyses
63
+ - To provide an efficient way to isolate all the relevant data
64
+ - Create a clear graphical representation of the relevant data that is relevant
65
+
66
+ Previously, our group has published the [PyFrag 2019](https://onlinelibrary.wiley.com/doi/10.1002/jcc.25871) program for the automation of fragment approaches and their quantitative analyses along a reaction coordinate. This allowed users to perform the Activation Strain Model (AMS) and the canonical energy decomposition analysis (EDA) for a whole reaction profile with one single input.
67
+
68
+ ## Installation <a name=installation></a>
69
+ *Currently, the installation can be done by cloning this repository and having all necessary dependencies.*
70
+ *Your Python version should be >=Python3.8 and <=Python3.10*
71
+
72
+ The following is for people who would like to install the repository themselves. For example, to edit and/or contribute code to the project.
73
+
74
+ Then, clone this repository:
75
+ ```
76
+ git clone git@github.com:TheoChem-VU/PyOrbb.git
77
+ ```
78
+
79
+ Then move into the new directory and install the package:
80
+
81
+ ```
82
+ cd PyOrbb
83
+ python -m pip install --upgrade build pip
84
+ python -m build
85
+ python -m pip install -e .
86
+ ```
87
+
88
+ To get new updates, simply run:
89
+ ```
90
+ git pull
91
+ ```
92
+
93
+ ## Usage <a name=usage></a>
94
+ PyOrbb is a Python API for reading and working with orbital data from ADF calculations.
95
+ The main output at the moment is an Excel document with useful data relating to the orbitals and interactions between orbitals.
96
+ To create this Excel document use the `pyorbb excel` command. Please see `pyorbb excel -h` for more information.
97
+
98
+ ## Workflow <a name=workflow></a>
99
+ [AMS rkf file]
100
+ [should be included once this is known]
101
+ [Figure horizontal si better than vertical]
102
+
103
+ ## Examples <a name=examples></a>
104
+ [insert example outputs]
105
+
106
+ ## Get involved <a name=involved></a>
107
+ At the moment, contribution to this project is limited to our research group. In the foreseeable future, we want to open up to a greater community. This group will include users who a not necessarily familiar with computational analysis of molecular systems or fragment approaches. At the point of the first public rollout, we want to have such groups involved in the process of enhancing this repository.
108
+
109
+ ## Who are we? <a name=members></a>
110
+ A preliminary version of PyOrbb was rolled out by Xiaobo Sun assisted by Laurens Groot, who was a PostDoc in the TheoCheM group at the Vrije Universiteit Amsterdam.
111
+
112
+ Currently, the project has been adopted by a team of active TheoCheM group members consisting of Yuman Hordijk ([@YumanHordijk](https://twitter.com/YumanHordijk)), Tori Gijzen ([@ToriGijzen](https://twitter.com/ToriGijzen)), and dr. Trevor A. Hamlin ([@TrevorAHamlin](https://twitter.com/TrevorAHamlin)).
113
+
114
+ Additionally, we are being consulted by Nadine Spychala ([@NadineSpychala](https://twitter.com/NadineSpychala)) from the University of Sussex as a part of cohort 8 in the Open Life Sciences Scheme (<https://openlifesci.org/openseeds/ols-8/projects-participants.html>, [@openlifesci](https://twitter.com/openlifesci)).
115
+
116
+ ## Contact us <a name=contact></a>
117
+ If you want to report a problem or suggest an enhancement we'd encourage for you to open an issue in the GitHub repository. Otherwise you can reach us by email (<https://www.theochem.nl/contact>) or Twitter ([@VU_TheoCheM](https://twitter.com/VU_TheoCheM))
118
+
119
+
120
+ ## Find out more <a name=more_info></a>
121
+ You Might be interested in"
122
+ - The [TheoCheM group](https://www.theochem.nl/)
123
+ - The [Vrije Universiteit Amsterdam](https://vu.nl/en)
124
+ - The [PyFrag 2019](https://github.com/TheoChem-VU/PyFrag) program
125
+ - Our Python library [TC-utility](https://github.com/TheoChem-VU/TCutility)
126
+ - For a thorough overview of the theoretical background we recommend the following articles:
127
+ - P. Vermeeren, S.C.C. van der Lubbe, C. Fonseca Guerra, F.M. Bickelhaupt, T.A.
128
+ Hamlin, _Nature Protoc._ **2020**, _15_, 649-667. (<https://doi.org/10.1038/s41596-019-0265-0>)
129
+ - T. A. Hamlin, P. Vermeeren, C. Fonseca Guerra, F. M. Bickelhaupt.
130
+ In: _Complementary Bonding Analyses_; S. Grabowski, Ed.; De Gruyter: Berlin,
131
+ 2021, pp 199-212. (<https://doi.org/10.1515/9783110660074-008>)
@@ -0,0 +1,103 @@
1
+ [![Documentation](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/build_docs.yml/badge.svg)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/build_docs.yml)
2
+ [![Testing](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/testing.yml/badge.svg)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/testing.yml)
3
+ [![Publishing to PyPI](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/pypi_publish.yml/badge.svg?branch=main)](https://github.com/TheoChem-VU/PyOrbb/actions/workflows/pypi_publish.yml)
4
+
5
+ # PyOrbb
6
+ Our group aims to empower chemists with state-of-the-art quantum-chemical analysis tools. The latest project is PyOrbb, used for the automated analysis of complex molecular orbital interactions. PyOrbb makes expert orbital analysis available to all chemists, regardless of their theoretical background, ensuring that knowledge knows no bounds!
7
+
8
+ ## Welcome
9
+ Welcome to the PyOrbb project repository. This project is currently led by members of the TheoCheM group at the Vrije Universiteit Amsterdam (Tori Gijzen, Yuman Hordijk, and Trevor Hamlin). We aim to empower computational and non-computational chemists to perform advanced orbital analyses. By presentation of computational data in
10
+
11
+ This README file serves as a central hub providing project-related information. Feel free to navigate directly to specific sections below or simply scroll down to learn more.
12
+
13
+ - [Motivation](#motivation)
14
+ - [Installation](#installation)
15
+ - [Workflow](#workflow)
16
+ - [Usage](#usage)
17
+ - [Examples](#examples)
18
+ - [Get involved](#involved)
19
+ - [Who are we?](#members)
20
+ - [Contact us](#contact)
21
+ - [Find out more](#more_info)
22
+
23
+ We are striving to optimise our application to facilitate anyone’s journey into the realm of advanced orbital analysis. So if you see any points where we can improve, don’t hesitate to contact us or open an issue in this repository!
24
+
25
+ ## Motivation <a name=motivation></a>
26
+ The PyOrbb project aims to assist in advanced orbital analysis for computational chemistry calculations. PyOrbb will generate important orbital interaction schemes and related orbital figures automatically, as well as summarise important information such as SFO coefficients, populations, orbital levels and more. These properties are commonly used in computational chemical research analyses.
27
+
28
+ People often run into the following challenges:
29
+ - Hard to get a clear overview of relevant data.
30
+ - Data acquisition is often done manually, which can be a chaotic and laborious task.
31
+ - The information overload in the output of quantum chemical programs can be intimidating.
32
+
33
+ The aim of the PyOrbb project is:
34
+ - Enhance access to advanced orbital analyses
35
+ - To provide an efficient way to isolate all the relevant data
36
+ - Create a clear graphical representation of the relevant data that is relevant
37
+
38
+ Previously, our group has published the [PyFrag 2019](https://onlinelibrary.wiley.com/doi/10.1002/jcc.25871) program for the automation of fragment approaches and their quantitative analyses along a reaction coordinate. This allowed users to perform the Activation Strain Model (AMS) and the canonical energy decomposition analysis (EDA) for a whole reaction profile with one single input.
39
+
40
+ ## Installation <a name=installation></a>
41
+ *Currently, the installation can be done by cloning this repository and having all necessary dependencies.*
42
+ *Your Python version should be >=Python3.8 and <=Python3.10*
43
+
44
+ The following is for people who would like to install the repository themselves. For example, to edit and/or contribute code to the project.
45
+
46
+ Then, clone this repository:
47
+ ```
48
+ git clone git@github.com:TheoChem-VU/PyOrbb.git
49
+ ```
50
+
51
+ Then move into the new directory and install the package:
52
+
53
+ ```
54
+ cd PyOrbb
55
+ python -m pip install --upgrade build pip
56
+ python -m build
57
+ python -m pip install -e .
58
+ ```
59
+
60
+ To get new updates, simply run:
61
+ ```
62
+ git pull
63
+ ```
64
+
65
+ ## Usage <a name=usage></a>
66
+ PyOrbb is a Python API for reading and working with orbital data from ADF calculations.
67
+ The main output at the moment is an Excel document with useful data relating to the orbitals and interactions between orbitals.
68
+ To create this Excel document use the `pyorbb excel` command. Please see `pyorbb excel -h` for more information.
69
+
70
+ ## Workflow <a name=workflow></a>
71
+ [AMS rkf file]
72
+ [should be included once this is known]
73
+ [Figure horizontal si better than vertical]
74
+
75
+ ## Examples <a name=examples></a>
76
+ [insert example outputs]
77
+
78
+ ## Get involved <a name=involved></a>
79
+ At the moment, contribution to this project is limited to our research group. In the foreseeable future, we want to open up to a greater community. This group will include users who a not necessarily familiar with computational analysis of molecular systems or fragment approaches. At the point of the first public rollout, we want to have such groups involved in the process of enhancing this repository.
80
+
81
+ ## Who are we? <a name=members></a>
82
+ A preliminary version of PyOrbb was rolled out by Xiaobo Sun assisted by Laurens Groot, who was a PostDoc in the TheoCheM group at the Vrije Universiteit Amsterdam.
83
+
84
+ Currently, the project has been adopted by a team of active TheoCheM group members consisting of Yuman Hordijk ([@YumanHordijk](https://twitter.com/YumanHordijk)), Tori Gijzen ([@ToriGijzen](https://twitter.com/ToriGijzen)), and dr. Trevor A. Hamlin ([@TrevorAHamlin](https://twitter.com/TrevorAHamlin)).
85
+
86
+ Additionally, we are being consulted by Nadine Spychala ([@NadineSpychala](https://twitter.com/NadineSpychala)) from the University of Sussex as a part of cohort 8 in the Open Life Sciences Scheme (<https://openlifesci.org/openseeds/ols-8/projects-participants.html>, [@openlifesci](https://twitter.com/openlifesci)).
87
+
88
+ ## Contact us <a name=contact></a>
89
+ If you want to report a problem or suggest an enhancement we'd encourage for you to open an issue in the GitHub repository. Otherwise you can reach us by email (<https://www.theochem.nl/contact>) or Twitter ([@VU_TheoCheM](https://twitter.com/VU_TheoCheM))
90
+
91
+
92
+ ## Find out more <a name=more_info></a>
93
+ You Might be interested in"
94
+ - The [TheoCheM group](https://www.theochem.nl/)
95
+ - The [Vrije Universiteit Amsterdam](https://vu.nl/en)
96
+ - The [PyFrag 2019](https://github.com/TheoChem-VU/PyFrag) program
97
+ - Our Python library [TC-utility](https://github.com/TheoChem-VU/TCutility)
98
+ - For a thorough overview of the theoretical background we recommend the following articles:
99
+ - P. Vermeeren, S.C.C. van der Lubbe, C. Fonseca Guerra, F.M. Bickelhaupt, T.A.
100
+ Hamlin, _Nature Protoc._ **2020**, _15_, 649-667. (<https://doi.org/10.1038/s41596-019-0265-0>)
101
+ - T. A. Hamlin, P. Vermeeren, C. Fonseca Guerra, F. M. Bickelhaupt.
102
+ In: _Complementary Bonding Analyses_; S. Grabowski, Ed.; De Gruyter: Berlin,
103
+ 2021, pp 199-212. (<https://doi.org/10.1515/9783110660074-008>)
@@ -0,0 +1,169 @@
1
+ [build-system]
2
+ requires = ["setuptools", "wheel", "setuptools-git-versioning<2"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [tool.setuptools-git-versioning]
6
+ enabled = true
7
+ template = "{tag}"
8
+ dev_template = "{tag}"
9
+ dirty_template = "{tag}"
10
+
11
+ [project]
12
+ name = "pyorbb"
13
+ # version = "%REPLACE_VERSION"
14
+ authors = [
15
+ { name="Yuman Hordijk", email="y.hordijk@vu.nl"},
16
+ { name="Steven E. Beutick", email="s.e.beutick@vu.nl"},
17
+ { name="Xiaobo Sun"},
18
+ { name="Laurens Groot"},
19
+ { name="Tori Gijzen", email="t.gijzen@vu.nl"},
20
+ { name="Jordi Poater"},
21
+ { name="Trevor A. Hamlin", email="t.a.hamlin@vu.nl"},
22
+ { name="F. Matthias Bickelhaupt", email="f.m.bickelhaupt@vu.nl"},
23
+ { name="Célia Fonseca Guerra", email="c.fonsecaguerra@vu.nl"}]
24
+
25
+ description = "PyOrbb is an automated orbital analysis tool used in the TheoCheM group at VU Amsterdam"
26
+ readme = "README.md"
27
+ classifiers = [
28
+ "Programming Language :: Python :: 3",
29
+ "License :: OSI Approved :: MIT License",
30
+ "Operating System :: OS Independent"]
31
+
32
+ dynamic = ["version"]
33
+ dependencies = [
34
+ "pyside6-essentials==6.7.3",
35
+ "tcviewer==0.2",
36
+ "tcmu==0.17.2",
37
+ "numpy",
38
+ "matplotlib>=3.5.3",
39
+ "networkx>=2.6.3",
40
+ "numpy>=1.21.6",
41
+ "plams>=2024.106",
42
+ "xlsxwriter>=3.2.2",
43
+ "tcintegral>=1.0.3",
44
+ "pyperclip",
45
+ "platformdirs",
46
+ "beautifulsoup4",
47
+ "pyyaml",
48
+ "ruff==0.0.177",
49
+ ]
50
+
51
+ [dependency-groups]
52
+ docs = [
53
+ "gitpython>=3.1.45",
54
+ "pydata-sphinx-theme>=0.13.3",
55
+ "sphinx-argparse>=0.4.0",
56
+ "sphinx-autodoc-typehints>=1.23.0",
57
+ "sphinx-design>=0.4.1",
58
+ "sphinx-tabs>=3.4.7",
59
+ "sphinxcontrib-video>=0.4.1",
60
+ # "sphinx_new_tab_link==0.8.1",
61
+ ]
62
+
63
+ [project.scripts]
64
+ pyorbb = "pyorbb.cli_scripts.pyorbbparser:main"
65
+
66
+ # content below this line added by briefcase convert
67
+ # This project was generated with 0.3.25 using template: https://github.com/beeware/briefcase-template @ v0.3.25
68
+ [tool.briefcase]
69
+ project_name = "PyOrbb"
70
+ version= "%REPLACE_VERSION"
71
+ bundle = "nl.theochem"
72
+ url = "https://theochem.nl/pyorbb"
73
+ license.file = "LICENSE"
74
+ # author = "Yuman Hordijk, Xiaobo Sun, Steven E. Beutick, Laurens Groot, Tori Gijzen, Jordi Poater, Trevor A. Hamlin, Matthias Bickelhaupt, Célia Fonseca Guerra"
75
+ author = "TheoCheMVU"
76
+ author_email = "yumanhordijk@gmail.com"
77
+
78
+ [tool.briefcase.app.pyorbb]
79
+ formal_name = "PyOrbb"
80
+ description = "PyOrbb is an automated orbital analysis tool used in the TheoCheM group at VU Amsterdam"
81
+ long_description = """More details about the app should go here.
82
+ """
83
+ icon = "icon_12"
84
+ sources = [
85
+ "src/pyorbb",
86
+ ]
87
+ requires = [
88
+ ]
89
+ test_sources = [
90
+ "test",
91
+ ]
92
+
93
+ test_requires = [
94
+ # Add your cross-platform test requirements here
95
+ ]
96
+
97
+ [tool.briefcase.app.pyorbb.macOS]
98
+ universal_build = false
99
+ requires = [
100
+ ]
101
+
102
+ [tool.briefcase.app.pyorbb.linux]
103
+ requires = [
104
+ # Add your Linux-specific app requirements here
105
+ ]
106
+
107
+ [tool.briefcase.app.pyorbb.linux.system.debian]
108
+ system_requires = [
109
+ # Add any system packages needed at build the app here
110
+ ]
111
+
112
+ system_runtime_requires = [
113
+ # Add any system packages needed at runtime here
114
+ ]
115
+
116
+ [tool.briefcase.app.pyorbb.linux.system.rhel]
117
+ system_requires = [
118
+ # Add any system packages needed at build the app here
119
+ ]
120
+
121
+ system_runtime_requires = [
122
+ # Add any system packages needed at runtime here
123
+ ]
124
+
125
+ [tool.briefcase.app.pyorbb.linux.system.suse]
126
+ system_requires = [
127
+ # Add any system packages needed at build the app here
128
+ ]
129
+
130
+ system_runtime_requires = [
131
+ # Add any system packages needed at runtime here
132
+ ]
133
+
134
+ [tool.briefcase.app.pyorbb.linux.system.arch]
135
+ system_requires = [
136
+ # Add any system packages needed at build the app here
137
+ ]
138
+
139
+ system_runtime_requires = [
140
+ # Add any system packages needed at runtime here
141
+ ]
142
+
143
+ [tool.briefcase.app.pyorbb.linux.flatpak]
144
+ flatpak_runtime = "org.freedesktop.Platform"
145
+ flatpak_runtime_version = "24.08"
146
+ flatpak_sdk = "org.freedesktop.Sdk"
147
+
148
+ [tool.briefcase.app.pyorbb.windows]
149
+ requires = [
150
+ # Add your Windows-specific app requirements here
151
+ ]
152
+
153
+ # Mobile deployments
154
+ [tool.briefcase.app.pyorbb.iOS]
155
+ requires = [
156
+ # Add your iOS-specific app requirements here
157
+ ]
158
+
159
+ [tool.briefcase.app.pyorbb.android]
160
+ requires = [
161
+ # Add your Android-specific app requirements here
162
+ ]
163
+
164
+ # Web deployments
165
+ [tool.briefcase.app.pyorbb.web]
166
+ requires = [
167
+ # Add your web-specific app requirements here
168
+ ]
169
+
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,203 @@
1
+ import os
2
+ import re
3
+ import yaml
4
+
5
+ from . import orbitals # noqa
6
+ from .orbitals import Orbitals, MO, FMO # noqa
7
+ from . import plotting # noqa
8
+ from . import analysis # noqa
9
+ from .analysis import Mixer # noqa
10
+ from . import application # noqa
11
+
12
+ if os.path.exists(os.path.join(os.path.split(__file__)[0], 'VERSION')):
13
+ with open(os.path.join(os.path.split(__file__)[0], 'VERSION')) as version:
14
+ __version__ = version.read().strip()
15
+ else:
16
+ __version__ = '0.0.0'
17
+
18
+
19
+
20
+ IRREP_TRANSLATION_LATEX = {
21
+ "E1:1": r"E$_\mathrm{1}^\mathrm{1}$",
22
+ "E1:2": r"E$_\mathrm{1}^\mathrm{2}$",
23
+ "EE1:1": r"E$^{\mathrm{1}\prime}_\mathrm{1}$",
24
+ "EE1:2": r"E$^{\mathrm{2}\prime}_\mathrm{1}$",
25
+ "EEE1:1": r"E$^{\mathrm{1}\prime\prime}_\mathrm{1}$",
26
+ "EEE1:2": r"E$^{\mathrm{2}\prime\prime}_\mathrm{1}$",
27
+ "AA": r"A$^{\prime}$",
28
+ "AAA": r"A$^{\prime\prime}$",
29
+ "AA1": r"A$^{\prime}_\mathrm{1}$",
30
+ "AA2": r"A$^{\prime}_\mathrm{2}$",
31
+ "AAA1": r"A$^{\prime\prime}_\mathrm{1}$",
32
+ "AAA2": r"A$^{\prime\prime}_\mathrm{2}$",
33
+ "A": r"A",
34
+ "A1": r"A$_\mathrm{1}$",
35
+ "A2": r"A$_\mathrm{2}$",
36
+ "B1": r"B$_\mathrm{1}$",
37
+ "B2": r"B$_\mathrm{2}$",
38
+ "T1": r"T$_\mathrm{1}$",
39
+ "T2": r"T$_\mathrm{2}$",
40
+ "E": r"E",
41
+
42
+ "SIGMA": r"$\Sigma$",
43
+ "PI": r"$\Pi$",
44
+ "DELTA": r"$\Delta$",
45
+ "PHI": r"$\Phi$",
46
+
47
+ "S": r"$s$",
48
+ "P": r"$p$",
49
+ "D": r"$d$",
50
+ "F": r"$f$",
51
+ }
52
+
53
+
54
+ IRREP_TRANSLATION_HTML = {
55
+ "E1": "E<sub>1</sub>",
56
+ "E1:1": "E<sub>1</sub><sup>1</sup>",
57
+ "E1:2": "E<sub>1</sub><sup>2</sup>",
58
+ "EE1": "E<sup>1</sup>′",
59
+ "EE1:1": "E<sup>1</sup>′<sub>1</sub>",
60
+ "EE1:2": "E<sup>2</sup>′<sub>1</sub>",
61
+ "EEE1": "E<sup>1</sup>′′",
62
+ "EEE1:1": "E<sup>1</sup>′′<sub>1</sub>",
63
+ "EEE1:2": "E<sup>2</sup>′′<sub>1</sub>",
64
+ "AA": "A′",
65
+ "AAA": "A″",
66
+ "AA1": "A′<sub>1</sub>",
67
+ "AA2": "A′<sub>2</sub>",
68
+ "AAA1": "A′′<sub>1</sub>",
69
+ "AAA2": "A′′<sub>2</sub>",
70
+ "A": "A",
71
+ "A1": "A<sub>1</sub>",
72
+ "A2": "A<sub>2</sub>",
73
+ "B1": "B<sub>1</sub>",
74
+ "B2": "B<sub>2</sub>",
75
+ "T1": "T<sub>1</sub>",
76
+ "T2": "T<sub>2</sub>",
77
+ "E": "E",
78
+
79
+ "SIGMA": "<i>σ</i>",
80
+ "PI": "<i>π</i>",
81
+ "DELTA": "<i>δ</i>",
82
+ "PHI": "<i>φ</i>",
83
+
84
+ "S": "<i>s</i>",
85
+ "P": "<i>p</i>",
86
+ "D": "<i>d</i>",
87
+ "F": "<i>f</i>",
88
+ }
89
+
90
+ rcParams_dir = os.path.join(os.path.split(__file__)[0], 'rcParams')
91
+ if os.path.exists(os.path.join(rcParams_dir, 'user.yaml')):
92
+ rcParams_path = os.path.join(rcParams_dir, 'user.yaml')
93
+ else:
94
+ rcParams_path = os.path.join(rcParams_dir, 'default.yaml')
95
+
96
+ with open(rcParams_path) as config:
97
+ rcParams = yaml.safe_load(config)
98
+
99
+
100
+ def save_rcParams():
101
+ with open(os.path.join(rcParams_dir, 'user.yaml'), 'w+') as user_config:
102
+ yaml.dump(rcParams, user_config)
103
+
104
+
105
+ def reset_rcParams():
106
+ global rcParams
107
+
108
+ with open(os.path.join(rcParams_dir, 'default.yaml')) as config:
109
+ rcParams = yaml.safe_load(config)
110
+
111
+
112
+ def translate_irrep_label(symm_label: str, mode='latex', use_formatting=True) -> str:
113
+ if mode == 'latex':
114
+ if symm_label in IRREP_TRANSLATION_LATEX:
115
+ return IRREP_TRANSLATION_LATEX[symm_label]
116
+
117
+ if ':' in symm_label:
118
+ subspecies, dimension = symm_label.split(':')
119
+ else:
120
+ subspecies = symm_label
121
+ dimension = None
122
+
123
+ if '.' in subspecies:
124
+ subspecies, parity = subspecies.split('.')
125
+ else:
126
+ parity = None
127
+
128
+ s = IRREP_TRANSLATION_LATEX.get(subspecies, subspecies)
129
+ if parity is not None:
130
+ s += rf'$_\mathrm{{{parity}}}$'
131
+
132
+ if dimension is not None:
133
+
134
+ if re.search(r"\d+", dimension):
135
+ dimension = re.sub(r"([xyz])(\d+)", r"\1^{\2}", dimension)
136
+ s += rf'$_{{{dimension}}}$'
137
+
138
+ return s
139
+
140
+ if mode == 'html':
141
+ if symm_label in IRREP_TRANSLATION_HTML:
142
+ s = IRREP_TRANSLATION_HTML[symm_label]
143
+ else:
144
+ if ':' in symm_label:
145
+ subspecies, dimension = symm_label.split(':')
146
+ else:
147
+ subspecies = symm_label
148
+ dimension = None
149
+
150
+ if '.' in subspecies:
151
+ subspecies, parity = subspecies.split('.')
152
+ else:
153
+ parity = None
154
+
155
+ s = IRREP_TRANSLATION_HTML.get(subspecies, subspecies)
156
+ if parity is not None:
157
+ s += f'<sub>{parity}</sub>'
158
+ if dimension is not None:
159
+
160
+ if re.search(r"\d+", dimension):
161
+ dimension = re.sub(r"([xyz])(\d+)", r"\1<sup>\2</sup>", dimension)
162
+ s += f'<sub><i>{dimension}</i></sub>'
163
+
164
+ if not use_formatting:
165
+ for format_tag in ['<i>', '</i>', '<sub>', '</sub>', '<sup>', '</sup>']:
166
+ s = s.replace(format_tag, '')
167
+
168
+ return s
169
+
170
+ return symm_label
171
+
172
+
173
+ def generate_label(orb, mode='latex', include_fragment=False, use_formatting=True):
174
+ if mode == 'latex':
175
+ spin_part = {
176
+ 'A': r'$\alpha$',
177
+ 'B': r'$\beta$'
178
+ }.get(orb.spin, '')
179
+ elif mode == 'html':
180
+ spin_part = {
181
+ 'A': '<i>α</i>',
182
+ 'B': '<i>β</i>'
183
+ }.get(orb.spin, '')
184
+
185
+ if isinstance(orb, orbitals.objects.MO):
186
+ orb_name = f'{orb.name}{spin_part}'
187
+ orb_name = orb_name.replace(orb.symmetry, translate_irrep_label(orb.symmetry, mode=mode))
188
+ else:
189
+ orb_name = orb.name
190
+ if include_fragment:
191
+ fragname = orb.fragment
192
+ orb_name = f'{fragname}({orb_name})'
193
+ if orb.spin != 'AB':
194
+ orb_name += spin_part
195
+
196
+ orb_name = orb_name.replace(orb.subspecies, translate_irrep_label(orb.subspecies, mode=mode))
197
+
198
+ if not use_formatting:
199
+ for format_tag in ['<i>', '</i>', '<sub>', '</sub>', '<sup>', '</sup>']:
200
+ orb_name = orb_name.replace(format_tag, '')
201
+
202
+ return orb_name
203
+
@@ -0,0 +1,28 @@
1
+ def main():
2
+ import platformdirs
3
+ import os
4
+ # import contextlib
5
+ from datetime import datetime
6
+ import traceback
7
+ # import faulthandler
8
+
9
+ # faulthandler.enable()
10
+
11
+ log_dir = platformdirs.user_log_dir(appname="PyOrbb", appauthor="TheoCheMVU", ensure_exists=True)
12
+ now = str(datetime.now()).replace(" ", "_").replace(":", "-").split(".")[0]
13
+ log_file = os.path.join(log_dir, now + ".txt")
14
+ print("WRITING STDOUT/STDERR TO", log_file)
15
+ # with open(log_file, "w+") as outp:
16
+ # with contextlib.redirect_stdout(outp), contextlib.redirect_stderr(outp):
17
+ try:
18
+ from pyorbb.application import main
19
+
20
+ with main.PyOrbbApp():
21
+ ...
22
+
23
+ except Exception as e:
24
+ print("".join(traceback.format_exception(type(e), e, e.__traceback__)))
25
+
26
+
27
+ if __name__ == '__main__':
28
+ main()
@@ -0,0 +1,3 @@
1
+ from . import mixing, movie # noqa
2
+ from .mixing import Mixer # noqa
3
+ from .sequential import MOTracker # noqa