py4vasp-core 0.9.0__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 (83) hide show
  1. py4vasp_core-0.9.0/LICENSE.txt +178 -0
  2. py4vasp_core-0.9.0/PKG-INFO +109 -0
  3. py4vasp_core-0.9.0/README.md +86 -0
  4. py4vasp_core-0.9.0/pyproject.toml +45 -0
  5. py4vasp_core-0.9.0/src/py4vasp/__init__.py +10 -0
  6. py4vasp_core-0.9.0/src/py4vasp/_analysis/mlff.py +325 -0
  7. py4vasp_core-0.9.0/src/py4vasp/_calculations.py +131 -0
  8. py4vasp_core-0.9.0/src/py4vasp/_combine/base.py +99 -0
  9. py4vasp_core-0.9.0/src/py4vasp/_combine/energies.py +9 -0
  10. py4vasp_core-0.9.0/src/py4vasp/_combine/forces.py +9 -0
  11. py4vasp_core-0.9.0/src/py4vasp/_combine/stresses.py +9 -0
  12. py4vasp_core-0.9.0/src/py4vasp/_config.py +4 -0
  13. py4vasp_core-0.9.0/src/py4vasp/_control/__init__.py +0 -0
  14. py4vasp_core-0.9.0/src/py4vasp/_control/base.py +64 -0
  15. py4vasp_core-0.9.0/src/py4vasp/_control/incar.py +14 -0
  16. py4vasp_core-0.9.0/src/py4vasp/_control/kpoints.py +14 -0
  17. py4vasp_core-0.9.0/src/py4vasp/_control/poscar.py +40 -0
  18. py4vasp_core-0.9.0/src/py4vasp/_raw/access.py +140 -0
  19. py4vasp_core-0.9.0/src/py4vasp/_raw/data.py +502 -0
  20. py4vasp_core-0.9.0/src/py4vasp/_raw/data_wrapper.py +101 -0
  21. py4vasp_core-0.9.0/src/py4vasp/_raw/definition.py +512 -0
  22. py4vasp_core-0.9.0/src/py4vasp/_raw/schema.py +202 -0
  23. py4vasp_core-0.9.0/src/py4vasp/_third_party/__init__.py +0 -0
  24. py4vasp_core-0.9.0/src/py4vasp/_third_party/graph/__init__.py +18 -0
  25. py4vasp_core-0.9.0/src/py4vasp/_third_party/graph/graph.py +242 -0
  26. py4vasp_core-0.9.0/src/py4vasp/_third_party/graph/mixin.py +107 -0
  27. py4vasp_core-0.9.0/src/py4vasp/_third_party/graph/plot.py +55 -0
  28. py4vasp_core-0.9.0/src/py4vasp/_third_party/graph/series.py +127 -0
  29. py4vasp_core-0.9.0/src/py4vasp/_third_party/interactive.py +34 -0
  30. py4vasp_core-0.9.0/src/py4vasp/_third_party/view/__init__.py +4 -0
  31. py4vasp_core-0.9.0/src/py4vasp/_third_party/view/mixin.py +40 -0
  32. py4vasp_core-0.9.0/src/py4vasp/_third_party/view/view.py +223 -0
  33. py4vasp_core-0.9.0/src/py4vasp/_util/check.py +25 -0
  34. py4vasp_core-0.9.0/src/py4vasp/_util/convert.py +81 -0
  35. py4vasp_core-0.9.0/src/py4vasp/_util/documentation.py +12 -0
  36. py4vasp_core-0.9.0/src/py4vasp/_util/import_.py +27 -0
  37. py4vasp_core-0.9.0/src/py4vasp/_util/index.py +373 -0
  38. py4vasp_core-0.9.0/src/py4vasp/_util/parser.py +323 -0
  39. py4vasp_core-0.9.0/src/py4vasp/_util/reader.py +26 -0
  40. py4vasp_core-0.9.0/src/py4vasp/_util/select.py +419 -0
  41. py4vasp_core-0.9.0/src/py4vasp/calculation/_CONTCAR.py +139 -0
  42. py4vasp_core-0.9.0/src/py4vasp/calculation/_OSZICAR.py +103 -0
  43. py4vasp_core-0.9.0/src/py4vasp/calculation/__init__.py +88 -0
  44. py4vasp_core-0.9.0/src/py4vasp/calculation/_band.py +197 -0
  45. py4vasp_core-0.9.0/src/py4vasp/calculation/_bandgap.py +283 -0
  46. py4vasp_core-0.9.0/src/py4vasp/calculation/_base.py +333 -0
  47. py4vasp_core-0.9.0/src/py4vasp/calculation/_born_effective_charge.py +52 -0
  48. py4vasp_core-0.9.0/src/py4vasp/calculation/_class.py +161 -0
  49. py4vasp_core-0.9.0/src/py4vasp/calculation/_density.py +350 -0
  50. py4vasp_core-0.9.0/src/py4vasp/calculation/_dielectric_function.py +177 -0
  51. py4vasp_core-0.9.0/src/py4vasp/calculation/_dielectric_tensor.py +76 -0
  52. py4vasp_core-0.9.0/src/py4vasp/calculation/_dispersion.py +143 -0
  53. py4vasp_core-0.9.0/src/py4vasp/calculation/_dos.py +158 -0
  54. py4vasp_core-0.9.0/src/py4vasp/calculation/_elastic_modulus.py +62 -0
  55. py4vasp_core-0.9.0/src/py4vasp/calculation/_energy.py +204 -0
  56. py4vasp_core-0.9.0/src/py4vasp/calculation/_fatband.py +58 -0
  57. py4vasp_core-0.9.0/src/py4vasp/calculation/_force.py +109 -0
  58. py4vasp_core-0.9.0/src/py4vasp/calculation/_force_constant.py +54 -0
  59. py4vasp_core-0.9.0/src/py4vasp/calculation/_internal_strain.py +59 -0
  60. py4vasp_core-0.9.0/src/py4vasp/calculation/_kpoint.py +281 -0
  61. py4vasp_core-0.9.0/src/py4vasp/calculation/_magnetism.py +317 -0
  62. py4vasp_core-0.9.0/src/py4vasp/calculation/_pair_correlation.py +121 -0
  63. py4vasp_core-0.9.0/src/py4vasp/calculation/_phonon.py +57 -0
  64. py4vasp_core-0.9.0/src/py4vasp/calculation/_phonon_band.py +92 -0
  65. py4vasp_core-0.9.0/src/py4vasp/calculation/_phonon_dos.py +97 -0
  66. py4vasp_core-0.9.0/src/py4vasp/calculation/_piezoelectric_tensor.py +75 -0
  67. py4vasp_core-0.9.0/src/py4vasp/calculation/_polarization.py +43 -0
  68. py4vasp_core-0.9.0/src/py4vasp/calculation/_potential.py +167 -0
  69. py4vasp_core-0.9.0/src/py4vasp/calculation/_projector.py +433 -0
  70. py4vasp_core-0.9.0/src/py4vasp/calculation/_selection.py +14 -0
  71. py4vasp_core-0.9.0/src/py4vasp/calculation/_slice.py +73 -0
  72. py4vasp_core-0.9.0/src/py4vasp/calculation/_stress.py +85 -0
  73. py4vasp_core-0.9.0/src/py4vasp/calculation/_structure.py +420 -0
  74. py4vasp_core-0.9.0/src/py4vasp/calculation/_system.py +17 -0
  75. py4vasp_core-0.9.0/src/py4vasp/calculation/_topology.py +185 -0
  76. py4vasp_core-0.9.0/src/py4vasp/calculation/_velocity.py +107 -0
  77. py4vasp_core-0.9.0/src/py4vasp/calculation/_workfunction.py +76 -0
  78. py4vasp_core-0.9.0/src/py4vasp/combine.py +5 -0
  79. py4vasp_core-0.9.0/src/py4vasp/control.py +11 -0
  80. py4vasp_core-0.9.0/src/py4vasp/exception.py +65 -0
  81. py4vasp_core-0.9.0/src/py4vasp/raw.py +20 -0
  82. py4vasp_core-0.9.0/src/py4vasp/scripts/__init__.py +0 -0
  83. py4vasp_core-0.9.0/src/py4vasp/scripts/error_analysis.py +145 -0
@@ -0,0 +1,178 @@
1
+
2
+ Apache License
3
+ Version 2.0, January 2004
4
+ http://www.apache.org/licenses/
5
+
6
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
7
+
8
+ 1. Definitions.
9
+
10
+ "License" shall mean the terms and conditions for use, reproduction,
11
+ and distribution as defined by Sections 1 through 9 of this document.
12
+
13
+ "Licensor" shall mean the copyright owner or entity authorized by
14
+ the copyright owner that is granting the License.
15
+
16
+ "Legal Entity" shall mean the union of the acting entity and all
17
+ other entities that control, are controlled by, or are under common
18
+ control with that entity. For the purposes of this definition,
19
+ "control" means (i) the power, direct or indirect, to cause the
20
+ direction or management of such entity, whether by contract or
21
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
22
+ outstanding shares, or (iii) beneficial ownership of such entity.
23
+
24
+ "You" (or "Your") shall mean an individual or Legal Entity
25
+ exercising permissions granted by this License.
26
+
27
+ "Source" form shall mean the preferred form for making modifications,
28
+ including but not limited to software source code, documentation
29
+ source, and configuration files.
30
+
31
+ "Object" form shall mean any form resulting from mechanical
32
+ transformation or translation of a Source form, including but
33
+ not limited to compiled object code, generated documentation,
34
+ and conversions to other media types.
35
+
36
+ "Work" shall mean the work of authorship, whether in Source or
37
+ Object form, made available under the License, as indicated by a
38
+ copyright notice that is included in or attached to the work
39
+ (an example is provided in the Appendix below).
40
+
41
+ "Derivative Works" shall mean any work, whether in Source or Object
42
+ form, that is based on (or derived from) the Work and for which the
43
+ editorial revisions, annotations, elaborations, or other modifications
44
+ represent, as a whole, an original work of authorship. For the purposes
45
+ of this License, Derivative Works shall not include works that remain
46
+ separable from, or merely link (or bind by name) to the interfaces of,
47
+ the Work and Derivative Works thereof.
48
+
49
+ "Contribution" shall mean any work of authorship, including
50
+ the original version of the Work and any modifications or additions
51
+ to that Work or Derivative Works thereof, that is intentionally
52
+ submitted to Licensor for inclusion in the Work by the copyright owner
53
+ or by an individual or Legal Entity authorized to submit on behalf of
54
+ the copyright owner. For the purposes of this definition, "submitted"
55
+ means any form of electronic, verbal, or written communication sent
56
+ to the Licensor or its representatives, including but not limited to
57
+ communication on electronic mailing lists, source code control systems,
58
+ and issue tracking systems that are managed by, or on behalf of, the
59
+ Licensor for the purpose of discussing and improving the Work, but
60
+ excluding communication that is conspicuously marked or otherwise
61
+ designated in writing by the copyright owner as "Not a Contribution."
62
+
63
+ "Contributor" shall mean Licensor and any individual or Legal Entity
64
+ on behalf of whom a Contribution has been received by Licensor and
65
+ subsequently incorporated within the Work.
66
+
67
+ 2. Grant of Copyright License. Subject to the terms and conditions of
68
+ this License, each Contributor hereby grants to You a perpetual,
69
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
70
+ copyright license to reproduce, prepare Derivative Works of,
71
+ publicly display, publicly perform, sublicense, and distribute the
72
+ Work and such Derivative Works in Source or Object form.
73
+
74
+ 3. Grant of Patent License. Subject to the terms and conditions of
75
+ this License, each Contributor hereby grants to You a perpetual,
76
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
77
+ (except as stated in this section) patent license to make, have made,
78
+ use, offer to sell, sell, import, and otherwise transfer the Work,
79
+ where such license applies only to those patent claims licensable
80
+ by such Contributor that are necessarily infringed by their
81
+ Contribution(s) alone or by combination of their Contribution(s)
82
+ with the Work to which such Contribution(s) was submitted. If You
83
+ institute patent litigation against any entity (including a
84
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
85
+ or a Contribution incorporated within the Work constitutes direct
86
+ or contributory patent infringement, then any patent licenses
87
+ granted to You under this License for that Work shall terminate
88
+ as of the date such litigation is filed.
89
+
90
+ 4. Redistribution. You may reproduce and distribute copies of the
91
+ Work or Derivative Works thereof in any medium, with or without
92
+ modifications, and in Source or Object form, provided that You
93
+ meet the following conditions:
94
+
95
+ (a) You must give any other recipients of the Work or
96
+ Derivative Works a copy of this License; and
97
+
98
+ (b) You must cause any modified files to carry prominent notices
99
+ stating that You changed the files; and
100
+
101
+ (c) You must retain, in the Source form of any Derivative Works
102
+ that You distribute, all copyright, patent, trademark, and
103
+ attribution notices from the Source form of the Work,
104
+ excluding those notices that do not pertain to any part of
105
+ the Derivative Works; and
106
+
107
+ (d) If the Work includes a "NOTICE" text file as part of its
108
+ distribution, then any Derivative Works that You distribute must
109
+ include a readable copy of the attribution notices contained
110
+ within such NOTICE file, excluding those notices that do not
111
+ pertain to any part of the Derivative Works, in at least one
112
+ of the following places: within a NOTICE text file distributed
113
+ as part of the Derivative Works; within the Source form or
114
+ documentation, if provided along with the Derivative Works; or,
115
+ within a display generated by the Derivative Works, if and
116
+ wherever such third-party notices normally appear. The contents
117
+ of the NOTICE file are for informational purposes only and
118
+ do not modify the License. You may add Your own attribution
119
+ notices within Derivative Works that You distribute, alongside
120
+ or as an addendum to the NOTICE text from the Work, provided
121
+ that such additional attribution notices cannot be construed
122
+ as modifying the License.
123
+
124
+ You may add Your own copyright statement to Your modifications and
125
+ may provide additional or different license terms and conditions
126
+ for use, reproduction, or distribution of Your modifications, or
127
+ for any such Derivative Works as a whole, provided Your use,
128
+ reproduction, and distribution of the Work otherwise complies with
129
+ the conditions stated in this License.
130
+
131
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
132
+ any Contribution intentionally submitted for inclusion in the Work
133
+ by You to the Licensor shall be under the terms and conditions of
134
+ this License, without any additional terms or conditions.
135
+ Notwithstanding the above, nothing herein shall supersede or modify
136
+ the terms of any separate license agreement you may have executed
137
+ with Licensor regarding such Contributions.
138
+
139
+ 6. Trademarks. This License does not grant permission to use the trade
140
+ names, trademarks, service marks, or product names of the Licensor,
141
+ except as required for reasonable and customary use in describing the
142
+ origin of the Work and reproducing the content of the NOTICE file.
143
+
144
+ 7. Disclaimer of Warranty. Unless required by applicable law or
145
+ agreed to in writing, Licensor provides the Work (and each
146
+ Contributor provides its Contributions) on an "AS IS" BASIS,
147
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
148
+ implied, including, without limitation, any warranties or conditions
149
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
150
+ PARTICULAR PURPOSE. You are solely responsible for determining the
151
+ appropriateness of using or redistributing the Work and assume any
152
+ risks associated with Your exercise of permissions under this License.
153
+
154
+ 8. Limitation of Liability. In no event and under no legal theory,
155
+ whether in tort (including negligence), contract, or otherwise,
156
+ unless required by applicable law (such as deliberate and grossly
157
+ negligent acts) or agreed to in writing, shall any Contributor be
158
+ liable to You for damages, including any direct, indirect, special,
159
+ incidental, or consequential damages of any character arising as a
160
+ result of this License or out of the use or inability to use the
161
+ Work (including but not limited to damages for loss of goodwill,
162
+ work stoppage, computer failure or malfunction, or any and all
163
+ other commercial damages or losses), even if such Contributor
164
+ has been advised of the possibility of such damages.
165
+
166
+ 9. Accepting Warranty or Additional Liability. While redistributing
167
+ the Work or Derivative Works thereof, You may choose to offer,
168
+ and charge a fee for, acceptance of support, warranty, indemnity,
169
+ or other liability obligations and/or rights consistent with this
170
+ License. However, in accepting such obligations, You may act only
171
+ on Your own behalf and on Your sole responsibility, not on behalf
172
+ of any other Contributor, and only if You agree to indemnify,
173
+ defend, and hold each Contributor harmless for any liability
174
+ incurred by, or claims asserted against, such Contributor by reason
175
+ of your accepting any such warranty or additional liability.
176
+
177
+ END OF TERMS AND CONDITIONS
178
+
@@ -0,0 +1,109 @@
1
+ Metadata-Version: 2.1
2
+ Name: py4vasp-core
3
+ Version: 0.9.0
4
+ Summary: Tool for assisting with the analysis and setup of VASP calculations.
5
+ Home-page: https://vasp.at/py4vasp/latest
6
+ License: Apache-2.0
7
+ Author: VASP Software GmbH
8
+ Author-email: py4vasp@vasp.at
9
+ Requires-Python: >=3.8
10
+ Classifier: License :: OSI Approved :: Apache Software License
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.8
13
+ Classifier: Programming Language :: Python :: 3.9
14
+ Classifier: Programming Language :: Python :: 3.10
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Requires-Dist: h5py (>=3.7.0)
18
+ Requires-Dist: numpy (>=1.23)
19
+ Project-URL: Repository, https://github.com/vasp-dev/py4vasp
20
+ Project-URL: Support Forum, https://vasp.at/forum/
21
+ Description-Content-Type: text/markdown
22
+
23
+ # py4vasp
24
+
25
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
26
+ [![test-full](https://github.com/vasp-dev/py4vasp/actions/workflows/test_full.yml/badge.svg)](https://github.com/vasp-dev/py4vasp/actions/workflows/test_full.yml)
27
+ [![test-core](https://github.com/vasp-dev/py4vasp/actions/workflows/test_core.yml/badge.svg)](https://github.com/vasp-dev/py4vasp/actions/workflows/test_core.yml)
28
+
29
+ > Please note that this document is intended mostly for developers that want to use
30
+ > the version of py4vasp provided on Github. If you just want to install py4vasp to
31
+ > use it, please follow the [official documentation](https://vasp.at/py4vasp/latest).
32
+
33
+ ## Installation
34
+
35
+ We use the [poetry dependency manager](https://python-poetry.org/) which takes care of
36
+ all dependencies and maintains a virtual environment to check the code. If you want to
37
+ test something in the virtual environment, just use e.g. `poetry run jupyter-notebook`.
38
+
39
+ We recommend installing py4vasp in a conda environment to resolve issues related to
40
+ installing `mdtraj` with pip. To do this please use the following steps. The last step
41
+ will test whether everything worked
42
+ ~~~shell
43
+ conda create --name py4vasp-env python=3.8
44
+ git clone git@github.com:vasp-dev/py4vasp.git
45
+ pip install poetry
46
+ poetry install
47
+ conda install -c conda-forge mdtraj
48
+ poetry run pytest
49
+ ~~~
50
+ Note that this will install py4vasp into the conda environment. This isolates the code
51
+ from all packages you have installed in other conda environments. Using poetry makes
52
+ sure that when you modify the code all the relevant dependencies are tracked.
53
+
54
+ ## py4vasp core
55
+
56
+ If you want to use py4vasp to develop your own scripts, you may want to limit the amount
57
+ of external dependencies. To this end, we provide alternative configuration files that
58
+ only install numpy, h5py, and the development dependencies. To install this core package
59
+ replace the configurations files in the root folder with the ones in the `core` folder
60
+ ~~~shell
61
+ cp core/* .
62
+ ~~~
63
+ Then you can install py4vasp with the same steps as above. Alternatively, since
64
+ py4vasp-core does not use mdtraj, you can also install everything in a virtual environment
65
+ mangaged by poetry
66
+ ~~~shell
67
+ pip install poetry
68
+ poetry install
69
+ poetry run pytest
70
+ ~~~
71
+ Note that some tests will be skipped because they require the external packages to run.
72
+ If you want to exclude even the development dependencies, you can run
73
+ ~~~shell
74
+ poetry install --without dev
75
+ ~~~
76
+ for the minimal installation.
77
+
78
+ ## Code style
79
+
80
+ Code style is enforced, but is not something the developer should spend time on, so we
81
+ decided on using black and isort. Please run
82
+ ~~~shell
83
+ black src tests
84
+ isort src tests
85
+ ~~~
86
+ before committing the code. This will autoformat your code and sort the import
87
+ statements in a consistent order. If you would like this code formatting to be done
88
+ along with each commit, you can run
89
+ ~~~shell
90
+ pre-commit install
91
+ ~~~
92
+
93
+ ## Contributing to py4vasp
94
+
95
+ We welcome contributions to py4vasp. To improve the code please follow this workflow
96
+
97
+ * Create an issue for the bugfix or feature you plan to work on, this gives the option
98
+ to provide some input before work is invested.
99
+ * Implement your work in a fork of the repository and create a pull request for it.
100
+ Please make sure to test your code thoroughly and commit the tests in the pull
101
+ request in the tests directory.
102
+ * In the message to your merge request mention the issue the code attempts to solve.
103
+ * We will try to include your merge request rapidly when all the tests pass and your
104
+ code is covered by tests.
105
+
106
+ Please limit the size of a pull request to approximately 200 lines of code
107
+ otherwise reviewing the changes gets unwieldy. Prefer splitting the work into
108
+ multiple smaller chunks if necessary.
109
+
@@ -0,0 +1,86 @@
1
+ # py4vasp
2
+
3
+ [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
4
+ [![test-full](https://github.com/vasp-dev/py4vasp/actions/workflows/test_full.yml/badge.svg)](https://github.com/vasp-dev/py4vasp/actions/workflows/test_full.yml)
5
+ [![test-core](https://github.com/vasp-dev/py4vasp/actions/workflows/test_core.yml/badge.svg)](https://github.com/vasp-dev/py4vasp/actions/workflows/test_core.yml)
6
+
7
+ > Please note that this document is intended mostly for developers that want to use
8
+ > the version of py4vasp provided on Github. If you just want to install py4vasp to
9
+ > use it, please follow the [official documentation](https://vasp.at/py4vasp/latest).
10
+
11
+ ## Installation
12
+
13
+ We use the [poetry dependency manager](https://python-poetry.org/) which takes care of
14
+ all dependencies and maintains a virtual environment to check the code. If you want to
15
+ test something in the virtual environment, just use e.g. `poetry run jupyter-notebook`.
16
+
17
+ We recommend installing py4vasp in a conda environment to resolve issues related to
18
+ installing `mdtraj` with pip. To do this please use the following steps. The last step
19
+ will test whether everything worked
20
+ ~~~shell
21
+ conda create --name py4vasp-env python=3.8
22
+ git clone git@github.com:vasp-dev/py4vasp.git
23
+ pip install poetry
24
+ poetry install
25
+ conda install -c conda-forge mdtraj
26
+ poetry run pytest
27
+ ~~~
28
+ Note that this will install py4vasp into the conda environment. This isolates the code
29
+ from all packages you have installed in other conda environments. Using poetry makes
30
+ sure that when you modify the code all the relevant dependencies are tracked.
31
+
32
+ ## py4vasp core
33
+
34
+ If you want to use py4vasp to develop your own scripts, you may want to limit the amount
35
+ of external dependencies. To this end, we provide alternative configuration files that
36
+ only install numpy, h5py, and the development dependencies. To install this core package
37
+ replace the configurations files in the root folder with the ones in the `core` folder
38
+ ~~~shell
39
+ cp core/* .
40
+ ~~~
41
+ Then you can install py4vasp with the same steps as above. Alternatively, since
42
+ py4vasp-core does not use mdtraj, you can also install everything in a virtual environment
43
+ mangaged by poetry
44
+ ~~~shell
45
+ pip install poetry
46
+ poetry install
47
+ poetry run pytest
48
+ ~~~
49
+ Note that some tests will be skipped because they require the external packages to run.
50
+ If you want to exclude even the development dependencies, you can run
51
+ ~~~shell
52
+ poetry install --without dev
53
+ ~~~
54
+ for the minimal installation.
55
+
56
+ ## Code style
57
+
58
+ Code style is enforced, but is not something the developer should spend time on, so we
59
+ decided on using black and isort. Please run
60
+ ~~~shell
61
+ black src tests
62
+ isort src tests
63
+ ~~~
64
+ before committing the code. This will autoformat your code and sort the import
65
+ statements in a consistent order. If you would like this code formatting to be done
66
+ along with each commit, you can run
67
+ ~~~shell
68
+ pre-commit install
69
+ ~~~
70
+
71
+ ## Contributing to py4vasp
72
+
73
+ We welcome contributions to py4vasp. To improve the code please follow this workflow
74
+
75
+ * Create an issue for the bugfix or feature you plan to work on, this gives the option
76
+ to provide some input before work is invested.
77
+ * Implement your work in a fork of the repository and create a pull request for it.
78
+ Please make sure to test your code thoroughly and commit the tests in the pull
79
+ request in the tests directory.
80
+ * In the message to your merge request mention the issue the code attempts to solve.
81
+ * We will try to include your merge request rapidly when all the tests pass and your
82
+ code is covered by tests.
83
+
84
+ Please limit the size of a pull request to approximately 200 lines of code
85
+ otherwise reviewing the changes gets unwieldy. Prefer splitting the work into
86
+ multiple smaller chunks if necessary.
@@ -0,0 +1,45 @@
1
+ [tool.poetry]
2
+ name = "py4vasp-core"
3
+ version = "0.9.0"
4
+ description = "Tool for assisting with the analysis and setup of VASP calculations."
5
+ authors = [
6
+ "VASP Software GmbH <py4vasp@vasp.at>",
7
+ "Martin Schlipf <martin.schlipf@gmail.com>",
8
+ "Henrique Miranda <miranda.henrique@gmail.com>",
9
+ "Orest Dubay <orest-d@users.noreply.github.com>",
10
+ "Jonathan Lahnsteiner <jonathan.lahnsteiner@gmx.at>",
11
+ "Eisuke Kawashima <e-kwsm@users.noreply.github.com>"
12
+ ]
13
+ license = "Apache-2.0"
14
+ readme = "README.md"
15
+ packages = [{include = "py4vasp", from = "src"}]
16
+ homepage = "https://vasp.at/py4vasp/latest"
17
+ repository = "https://github.com/vasp-dev/py4vasp"
18
+
19
+ [tool.poetry.urls]
20
+ "Support Forum" = "https://vasp.at/forum/"
21
+
22
+
23
+ [tool.poetry.dependencies]
24
+ python = ">=3.8"
25
+ numpy = ">=1.23"
26
+ h5py = ">=3.7.0"
27
+
28
+ [tool.poetry.group.dev.dependencies]
29
+ pytest = ">=7.1.2"
30
+ pytest-cov = ">=3.0.0"
31
+ pylint = ">=2.15"
32
+ hypothesis = ">=6.48.1"
33
+ black = ">=22.6.0"
34
+ isort = ">=5.10.1"
35
+
36
+ [tool.poetry.scripts]
37
+ error-analysis = "py4vasp.scripts.error_analysis:main"
38
+
39
+ [tool.isort]
40
+ profile = "black"
41
+
42
+
43
+ [build-system]
44
+ requires = ["poetry-core"]
45
+ build-backend = "poetry.core.masonry.api"
@@ -0,0 +1,10 @@
1
+ # Copyright © VASP Software GmbH,
2
+ # Licensed under the Apache License 2.0 (http://www.apache.org/licenses/LICENSE-2.0)
3
+ from py4vasp._analysis.mlff import MLFFErrorAnalysis
4
+ from py4vasp._calculations import Calculations
5
+ from py4vasp._third_party.graph import plot
6
+ from py4vasp._third_party.interactive import set_error_handling
7
+ from py4vasp.calculation._class import Calculation
8
+
9
+ __version__ = "0.9.0"
10
+ set_error_handling("Minimal")