atomistics 0.2.4__tar.gz → 0.3.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 (100) hide show
  1. atomistics-0.3.0/.gitignore +4 -0
  2. {atomistics-0.2.4/atomistics.egg-info → atomistics-0.3.0}/PKG-INFO +50 -45
  3. {atomistics-0.2.4 → atomistics-0.3.0}/README.md +14 -9
  4. atomistics-0.3.0/atomistics/__init__.py +3 -0
  5. atomistics-0.3.0/atomistics/_version.py +34 -0
  6. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/__init__.py +51 -43
  7. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/ase.py +25 -25
  8. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/__init__.py +13 -13
  9. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/libcalculator.py +159 -70
  10. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/sphinxdft.py +10 -12
  11. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/wrapper.py +1 -1
  12. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/referencedata/__init__.py +11 -9
  13. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/referencedata/wikipedia.py +5 -2
  14. atomistics-0.3.0/atomistics/shared/import_warning.py +21 -0
  15. atomistics-0.3.0/atomistics/workflows/__init__.py +79 -0
  16. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/elastic/helper.py +61 -47
  17. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/elastic/workflow.py +7 -5
  18. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/debye.py +1 -1
  19. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/helper.py +10 -7
  20. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/workflow.py +14 -16
  21. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/interface.py +3 -3
  22. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/phonons/helper.py +42 -20
  23. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/phonons/workflow.py +10 -21
  24. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/quasiharmonic.py +41 -48
  25. {atomistics-0.2.4 → atomistics-0.3.0}/pyproject.toml +50 -31
  26. atomistics-0.2.4/MANIFEST.in +0 -1
  27. atomistics-0.2.4/PKG-INFO +0 -276
  28. atomistics-0.2.4/atomistics/__init__.py +0 -3
  29. atomistics-0.2.4/atomistics/_version.py +0 -21
  30. atomistics-0.2.4/atomistics/workflows/__init__.py +0 -35
  31. atomistics-0.2.4/atomistics.egg-info/SOURCES.txt +0 -93
  32. atomistics-0.2.4/atomistics.egg-info/dependency_links.txt +0 -1
  33. atomistics-0.2.4/atomistics.egg-info/requires.txt +0 -43
  34. atomistics-0.2.4/atomistics.egg-info/top_level.txt +0 -1
  35. atomistics-0.2.4/setup.cfg +0 -4
  36. atomistics-0.2.4/setup.py +0 -8
  37. atomistics-0.2.4/tests/test_abstract_workflow_class.py +0 -23
  38. atomistics-0.2.4/tests/test_ase_md_emt.py +0 -64
  39. atomistics-0.2.4/tests/test_calc_stress_ase_emt.py +0 -35
  40. atomistics-0.2.4/tests/test_calc_stress_lammpslib.py +0 -47
  41. atomistics-0.2.4/tests/test_elastic_ase_emt.py +0 -32
  42. atomistics-0.2.4/tests/test_elastic_helper.py +0 -96
  43. atomistics-0.2.4/tests/test_elastic_lammpslib.py +0 -132
  44. atomistics-0.2.4/tests/test_elastic_lammpslib_functional.py +0 -138
  45. atomistics-0.2.4/tests/test_evcurve_ase_emt.py +0 -47
  46. atomistics-0.2.4/tests/test_evcurve_ase_lammps.py +0 -70
  47. atomistics-0.2.4/tests/test_evcurve_eos.py +0 -148
  48. atomistics-0.2.4/tests/test_evcurve_lammpsfile.py +0 -85
  49. atomistics-0.2.4/tests/test_evcurve_lammpslib.py +0 -62
  50. atomistics-0.2.4/tests/test_evcurve_lammpslib_function_parallel.py +0 -78
  51. atomistics-0.2.4/tests/test_evcurve_lammpslib_functional.py +0 -71
  52. atomistics-0.2.4/tests/test_evcurve_qe.py +0 -57
  53. atomistics-0.2.4/tests/test_evcurve_sphinxdft.py +0 -66
  54. atomistics-0.2.4/tests/test_hessian_lammpslib.py +0 -86
  55. atomistics-0.2.4/tests/test_lammps_calculator.py +0 -43
  56. atomistics-0.2.4/tests/test_lammpslib_md.py +0 -191
  57. atomistics-0.2.4/tests/test_lammpslib_md_phonons.py +0 -65
  58. atomistics-0.2.4/tests/test_langevin_lammpslib.py +0 -64
  59. atomistics-0.2.4/tests/test_molecular_dynamics_thermal_expansion_lammpslib.py +0 -100
  60. atomistics-0.2.4/tests/test_optimize_positions_ase_emt.py +0 -108
  61. atomistics-0.2.4/tests/test_optimize_positions_lammpsfile.py +0 -93
  62. atomistics-0.2.4/tests/test_optimize_positions_lammpslib.py +0 -69
  63. atomistics-0.2.4/tests/test_phonons_ase_emt.py +0 -61
  64. atomistics-0.2.4/tests/test_phonons_lammpsfile.py +0 -153
  65. atomistics-0.2.4/tests/test_phonons_lammpslib.py +0 -129
  66. atomistics-0.2.4/tests/test_phonons_lammpslib_functional.py +0 -121
  67. atomistics-0.2.4/tests/test_quasiharmonic_ase_emt.py +0 -65
  68. atomistics-0.2.4/tests/test_quasiharmonic_lammpslib.py +0 -105
  69. atomistics-0.2.4/tests/test_quasiharmonic_lammpslib_functional.py +0 -136
  70. atomistics-0.2.4/tests/test_referencedata.py +0 -54
  71. atomistics-0.2.4/tests/test_sphinx_parser.py +0 -137
  72. atomistics-0.2.4/tests/test_vasp_parser.py +0 -156
  73. {atomistics-0.2.4 → atomistics-0.3.0}/LICENSE +0 -0
  74. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/hessian.py +0 -0
  75. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/interface.py +0 -0
  76. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/commands.py +0 -0
  77. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/filecalculator.py +0 -0
  78. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/helpers.py +0 -0
  79. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/phonon.py +0 -0
  80. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/lammps/potential.py +0 -0
  81. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/qe.py +0 -0
  82. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/calculators/vasp.py +0 -0
  83. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/referencedata/mendeleev.py +0 -0
  84. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/referencedata/wolframalpha.py +0 -0
  85. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/shared/__init__.py +0 -0
  86. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/shared/output.py +0 -0
  87. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/shared/parallel.py +0 -0
  88. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/shared/thermal_expansion.py +0 -0
  89. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/shared/tqdm_iterator.py +0 -0
  90. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/elastic/__init__.py +0 -0
  91. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/elastic/elastic_moduli.py +0 -0
  92. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/elastic/symmetry.py +0 -0
  93. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/__init__.py +0 -0
  94. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/fit.py +0 -0
  95. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/evcurve/thermo.py +0 -0
  96. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/langevin.py +0 -0
  97. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/molecular_dynamics.py +0 -0
  98. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/phonons/__init__.py +0 -0
  99. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/phonons/units.py +0 -0
  100. {atomistics-0.2.4 → atomistics-0.3.0}/atomistics/workflows/structure_optimization.py +0 -0
@@ -0,0 +1,4 @@
1
+ *.pyc
2
+ .DS_Store
3
+ .idea/
4
+ notebooks/.ipynb_checkpoints/
@@ -1,7 +1,10 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: atomistics
3
- Version: 0.2.4
3
+ Version: 0.3.0
4
4
  Summary: Interfaces for atomistic simulation codes and workflows
5
+ Project-URL: Homepage, https://github.com/pyiron/atomistics
6
+ Project-URL: Documentation, https://atomistics.readthedocs.io
7
+ Project-URL: Repository, https://github.com/pyiron/atomistics
5
8
  Author-email: Jan Janssen <janssen@mpie.de>
6
9
  License: BSD 3-Clause License
7
10
 
@@ -32,56 +35,53 @@ License: BSD 3-Clause License
32
35
  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
33
36
  OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
34
37
  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
- Project-URL: Homepage, https://github.com/pyiron/atomistics
36
- Project-URL: Documentation, https://atomistics.readthedocs.io
37
- Project-URL: Repository, https://github.com/pyiron/atomistics
38
+ License-File: LICENSE
38
39
  Keywords: pyiron
39
40
  Classifier: Development Status :: 5 - Production/Stable
40
- Classifier: Topic :: Scientific/Engineering :: Physics
41
- Classifier: License :: OSI Approved :: BSD License
42
41
  Classifier: Intended Audience :: Science/Research
42
+ Classifier: License :: OSI Approved :: BSD License
43
43
  Classifier: Operating System :: OS Independent
44
44
  Classifier: Programming Language :: Python :: 3.9
45
45
  Classifier: Programming Language :: Python :: 3.10
46
46
  Classifier: Programming Language :: Python :: 3.11
47
47
  Classifier: Programming Language :: Python :: 3.12
48
+ Classifier: Topic :: Scientific/Engineering :: Physics
48
49
  Requires-Python: <3.13,>=3.9
49
- Description-Content-Type: text/markdown
50
- License-File: LICENSE
51
- Requires-Dist: ase<=3.24.0,>=3.23.0
52
- Requires-Dist: numpy==1.26.4
53
- Requires-Dist: scipy<=1.15.2,>=1.11.1
50
+ Requires-Dist: ase<=3.26.0,>=3.23.0
51
+ Requires-Dist: numpy<=2.3.3,>=1.26.4
52
+ Requires-Dist: scipy<=1.15.2,>=1.11.2
54
53
  Requires-Dist: spglib<=2.6.0,>=2.0.2
55
- Provides-Extra: phonopy
56
- Requires-Dist: phonopy<=2.38.0,>=2.20.0; extra == "phonopy"
57
- Requires-Dist: seekpath<=2.1.0,>=1.9.0; extra == "phonopy"
58
- Requires-Dist: structuretoolkit<=0.0.31,>=0.0.10; extra == "phonopy"
54
+ Provides-Extra: experimental
55
+ Requires-Dist: lxml<=6.0.2,>=4.9.1; extra == 'experimental'
56
+ Requires-Dist: mendeleev<=1.1.0,>=0.12.0; extra == 'experimental'
57
+ Requires-Dist: pandas<=2.3.2,>=2.0.3; extra == 'experimental'
58
+ Requires-Dist: requests<=2.32.5,>=2.24.0; extra == 'experimental'
59
59
  Provides-Extra: gpaw
60
- Requires-Dist: gpaw<=24.6.0,>=20.1.0; extra == "gpaw"
60
+ Requires-Dist: gpaw<=25.7.0,>=21.6.0; extra == 'gpaw'
61
61
  Provides-Extra: lammps
62
- Requires-Dist: pylammpsmpi<=0.2.31,>=0.2.1; extra == "lammps"
63
- Requires-Dist: jinja2<=3.1.6,>=2.11.3; extra == "lammps"
64
- Requires-Dist: pandas<=2.2.3,>=2.0.3; extra == "lammps"
65
- Requires-Dist: pyiron_lammps<=0.4.0,>=0.3.2; extra == "lammps"
62
+ Requires-Dist: jinja2<=3.1.6,>=2.11.3; extra == 'lammps'
63
+ Requires-Dist: pandas<=2.3.2,>=2.0.3; extra == 'lammps'
64
+ Requires-Dist: pyiron-lammps<=0.4.7,>=0.3.2; extra == 'lammps'
65
+ Requires-Dist: pylammpsmpi<=0.3.3,>=0.2.1; extra == 'lammps'
66
66
  Provides-Extra: lammps-phonons
67
- Requires-Dist: pylammpsmpi<=0.2.31,>=0.2.1; extra == "lammps-phonons"
68
- Requires-Dist: jinja2<=3.1.6,>=2.11.3; extra == "lammps-phonons"
69
- Requires-Dist: pandas<=2.2.3,>=2.0.3; extra == "lammps-phonons"
70
- Requires-Dist: dynaphopy<=1.17.16,>=1.17.5; extra == "lammps-phonons"
71
- Requires-Dist: pyiron_lammps<=0.4.0,>=0.3.2; extra == "lammps-phonons"
72
- Provides-Extra: experimental
73
- Requires-Dist: lxml<=5.3.1,>=4.9.1; extra == "experimental"
74
- Requires-Dist: mendeleev<=0.19.0,>=0.12.0; extra == "experimental"
75
- Requires-Dist: pandas<=2.2.3,>=2.0.3; extra == "experimental"
76
- Requires-Dist: requests<=2.32.3,>=2.24.0; extra == "experimental"
77
- Provides-Extra: sphinxdft
78
- Requires-Dist: sphinx-parser==0.0.1; extra == "sphinxdft"
67
+ Requires-Dist: dynaphopy<=1.17.16,>=1.17.11; extra == 'lammps-phonons'
68
+ Requires-Dist: jinja2<=3.1.6,>=2.11.3; extra == 'lammps-phonons'
69
+ Requires-Dist: pandas<=2.3.2,>=2.0.3; extra == 'lammps-phonons'
70
+ Requires-Dist: pyiron-lammps<=0.4.7,>=0.3.2; extra == 'lammps-phonons'
71
+ Requires-Dist: pylammpsmpi<=0.3.3,>=0.2.1; extra == 'lammps-phonons'
72
+ Provides-Extra: phonopy
73
+ Requires-Dist: phonopy<=2.43.2,>=2.20.0; extra == 'phonopy'
74
+ Requires-Dist: seekpath<=2.1.0,>=1.9.0; extra == 'phonopy'
75
+ Requires-Dist: structuretoolkit<=0.0.35,>=0.0.10; extra == 'phonopy'
79
76
  Provides-Extra: qe
80
- Requires-Dist: pwtools==1.3.0; extra == "qe"
77
+ Requires-Dist: pwtools==1.3.0; extra == 'qe'
78
+ Provides-Extra: sphinxdft
79
+ Requires-Dist: sphinx-parser==0.1.0; extra == 'sphinxdft'
81
80
  Provides-Extra: tqdm
82
- Requires-Dist: tqdm==4.67.1; extra == "tqdm"
81
+ Requires-Dist: tqdm==4.67.1; extra == 'tqdm'
83
82
  Provides-Extra: vasp
84
- Requires-Dist: pyiron_vasp==0.2.4; extra == "vasp"
83
+ Requires-Dist: pyiron-vasp==0.2.13; extra == 'vasp'
84
+ Description-Content-Type: text/markdown
85
85
 
86
86
  # atomistics
87
87
  [![Pipeline](https://github.com/pyiron/atomistics/actions/workflows/pipeline.yml/badge.svg)](https://github.com/pyiron/atomistics/actions/workflows/pipeline.yml)
@@ -97,6 +97,7 @@ simulation codes - named `calculators`. The supported simulation codes in alphab
97
97
  * [LAMMPS](https://www.lammps.org) - Molecular Dynamics
98
98
  * [Quantum Espresso](https://www.quantum-espresso.org) - Integrated suite of Open-Source computer codes for electronic-structure calculations
99
99
  * [Siesta](https://siesta-project.org) - Electronic structure calculations and ab initio molecular dynamics
100
+ * [SPHInX](https://sxrepo.mpie.de) - Plane wave DFT with interactive tools, charged defect correction and spin constraints
100
101
 
101
102
  For majority of these simulation codes the `atomistics` package use the [Atomic Simulation Environment](https://wiki.fysik.dtu.dk/ase/)
102
103
  to interface the underlying C/ C++ and Fortran Codes with the Python programming language. Still this approach limits
@@ -125,20 +126,14 @@ equilibrium bulk modulus and its derivative using the [GPAW](https://wiki.fysik.
125
126
 
126
127
  ```python
127
128
  from ase.build import bulk
128
- from atomistics.calculators import evaluate_with_ase
129
- from atomistics.workflows import EnergyVolumeCurveWorkflow
130
- from gpaw import GPAW, PW
129
+ from atomistics.workflows import get_tasks_for_energy_volume_curve
131
130
 
132
- workflow = EnergyVolumeCurveWorkflow(
131
+ task_dict = get_tasks_for_energy_volume_curve(
133
132
  structure=bulk("Al", a=4.05, cubic=True),
134
133
  num_points=11,
135
- fit_type='polynomial',
136
- fit_order=3,
137
134
  vol_range=0.05,
138
135
  axes=['x', 'y', 'z'],
139
- strains=None,
140
136
  )
141
- task_dict = workflow.generate_structures()
142
137
  print(task_dict)
143
138
  ```
144
139
  ```
@@ -166,6 +161,9 @@ generated structures. Each structure is labeled by the ratio of compression or e
166
161
  `task_dict` is evaluate with the [GPAW](https://wiki.fysik.dtu.dk/gpaw/) simulation code using the
167
162
  `evaluate_with_ase()` function:
168
163
  ```python
164
+ from atomistics.calculators import evaluate_with_ase
165
+ from gpaw import GPAW, PW
166
+
169
167
  result_dict = evaluate_with_ase(
170
168
  task_dict=task_dict,
171
169
  ase_calculator=GPAW(
@@ -198,7 +196,14 @@ is able to match the calculation results to the corresponding structure. Finally
198
196
  function takes the `result_dict` as an input and fits the Equation of State with the fitting parameters defined in
199
197
  the first step:
200
198
  ```python
201
- fit_dict = workflow.analyse_structures(output_dict=result_dict)
199
+ from atomistics.workflows import analyse_results_for_energy_volume_curve
200
+
201
+ fit_dict = analyse_results_for_energy_volume_curve(
202
+ output_dict=result_dict,
203
+ task_dict=task_dict,
204
+ fit_type='polynomial',
205
+ fit_order=3,
206
+ )
202
207
  print(fit_dict)
203
208
  ```
204
209
  ```
@@ -12,6 +12,7 @@ simulation codes - named `calculators`. The supported simulation codes in alphab
12
12
  * [LAMMPS](https://www.lammps.org) - Molecular Dynamics
13
13
  * [Quantum Espresso](https://www.quantum-espresso.org) - Integrated suite of Open-Source computer codes for electronic-structure calculations
14
14
  * [Siesta](https://siesta-project.org) - Electronic structure calculations and ab initio molecular dynamics
15
+ * [SPHInX](https://sxrepo.mpie.de) - Plane wave DFT with interactive tools, charged defect correction and spin constraints
15
16
 
16
17
  For majority of these simulation codes the `atomistics` package use the [Atomic Simulation Environment](https://wiki.fysik.dtu.dk/ase/)
17
18
  to interface the underlying C/ C++ and Fortran Codes with the Python programming language. Still this approach limits
@@ -40,20 +41,14 @@ equilibrium bulk modulus and its derivative using the [GPAW](https://wiki.fysik.
40
41
 
41
42
  ```python
42
43
  from ase.build import bulk
43
- from atomistics.calculators import evaluate_with_ase
44
- from atomistics.workflows import EnergyVolumeCurveWorkflow
45
- from gpaw import GPAW, PW
44
+ from atomistics.workflows import get_tasks_for_energy_volume_curve
46
45
 
47
- workflow = EnergyVolumeCurveWorkflow(
46
+ task_dict = get_tasks_for_energy_volume_curve(
48
47
  structure=bulk("Al", a=4.05, cubic=True),
49
48
  num_points=11,
50
- fit_type='polynomial',
51
- fit_order=3,
52
49
  vol_range=0.05,
53
50
  axes=['x', 'y', 'z'],
54
- strains=None,
55
51
  )
56
- task_dict = workflow.generate_structures()
57
52
  print(task_dict)
58
53
  ```
59
54
  ```
@@ -81,6 +76,9 @@ generated structures. Each structure is labeled by the ratio of compression or e
81
76
  `task_dict` is evaluate with the [GPAW](https://wiki.fysik.dtu.dk/gpaw/) simulation code using the
82
77
  `evaluate_with_ase()` function:
83
78
  ```python
79
+ from atomistics.calculators import evaluate_with_ase
80
+ from gpaw import GPAW, PW
81
+
84
82
  result_dict = evaluate_with_ase(
85
83
  task_dict=task_dict,
86
84
  ase_calculator=GPAW(
@@ -113,7 +111,14 @@ is able to match the calculation results to the corresponding structure. Finally
113
111
  function takes the `result_dict` as an input and fits the Equation of State with the fitting parameters defined in
114
112
  the first step:
115
113
  ```python
116
- fit_dict = workflow.analyse_structures(output_dict=result_dict)
114
+ from atomistics.workflows import analyse_results_for_energy_volume_curve
115
+
116
+ fit_dict = analyse_results_for_energy_volume_curve(
117
+ output_dict=result_dict,
118
+ task_dict=task_dict,
119
+ fit_type='polynomial',
120
+ fit_order=3,
121
+ )
117
122
  print(fit_dict)
118
123
  ```
119
124
  ```
@@ -0,0 +1,3 @@
1
+ import atomistics._version
2
+
3
+ __version__ = atomistics._version.__version__
@@ -0,0 +1,34 @@
1
+ # file generated by setuptools-scm
2
+ # don't change, don't track in version control
3
+
4
+ __all__ = [
5
+ "__version__",
6
+ "__version_tuple__",
7
+ "version",
8
+ "version_tuple",
9
+ "__commit_id__",
10
+ "commit_id",
11
+ ]
12
+
13
+ TYPE_CHECKING = False
14
+ if TYPE_CHECKING:
15
+ from typing import Tuple
16
+ from typing import Union
17
+
18
+ VERSION_TUPLE = Tuple[Union[int, str], ...]
19
+ COMMIT_ID = Union[str, None]
20
+ else:
21
+ VERSION_TUPLE = object
22
+ COMMIT_ID = object
23
+
24
+ version: str
25
+ __version__: str
26
+ __version_tuple__: VERSION_TUPLE
27
+ version_tuple: VERSION_TUPLE
28
+ commit_id: COMMIT_ID
29
+ __commit_id__: COMMIT_ID
30
+
31
+ __version__ = version = '0.3.0'
32
+ __version_tuple__ = version_tuple = (0, 3, 0)
33
+
34
+ __commit_id__ = commit_id = None
@@ -9,8 +9,9 @@ from atomistics.calculators.ase import (
9
9
  optimize_volume_with_ase,
10
10
  )
11
11
  from atomistics.calculators.hessian import evaluate_with_hessian
12
+ from atomistics.shared.import_warning import raise_warning
12
13
 
13
- __all__ = [
14
+ __all__: list[str] = [
14
15
  "calc_molecular_dynamics_langevin_with_ase",
15
16
  "calc_molecular_dynamics_npt_with_ase",
16
17
  "calc_molecular_dynamics_thermal_expansion_with_ase",
@@ -21,6 +22,35 @@ __all__ = [
21
22
  "optimize_volume_with_ase",
22
23
  "evaluate_with_hessian",
23
24
  ]
25
+ lammps_functions: list[str] = [
26
+ "calc_molecular_dynamics_thermal_expansion_with_lammpslib",
27
+ "calc_molecular_dynamics_nph_with_lammpslib",
28
+ "calc_molecular_dynamics_npt_with_lammpslib",
29
+ "calc_molecular_dynamics_nvt_with_lammpslib",
30
+ "calc_molecular_dynamics_langevin_with_lammpslib",
31
+ "calc_static_with_lammpslib",
32
+ "evaluate_with_lammpslib",
33
+ "evaluate_with_lammpslib_library_interface",
34
+ "get_potential_dataframe",
35
+ "get_potential_by_name",
36
+ "optimize_positions_and_volume_with_lammpslib",
37
+ "optimize_positions_with_lammpslib",
38
+ ]
39
+ lammps_phonon_functions: list[str] = ["calc_molecular_dynamics_phonons_with_lammpslib"]
40
+ quantum_espresso_function: list[str] = [
41
+ "calc_static_with_qe",
42
+ "evaluate_with_qe",
43
+ "optimize_positions_and_volume_with_qe",
44
+ ]
45
+ sphinx_functions: list[str] = ["evaluate_with_sphinx"]
46
+ vasp_functions: list[str] = [
47
+ "evaluate_with_vasp",
48
+ "calc_static_with_vasp",
49
+ "optimize_positions_and_volume_with_vasp",
50
+ "optimize_positions_with_vasp",
51
+ "optimize_cell_with_vasp",
52
+ "optimize_volume_with_vasp",
53
+ ]
24
54
 
25
55
 
26
56
  try:
@@ -29,14 +59,11 @@ try:
29
59
  evaluate_with_qe,
30
60
  optimize_positions_and_volume_with_qe,
31
61
  )
62
+ except ImportError as e:
63
+ raise_warning(module_list=quantum_espresso_function, import_error=e)
64
+ else:
65
+ __all__ += quantum_espresso_function
32
66
 
33
- __all__ += [
34
- "calc_static_with_qe",
35
- "evaluate_with_qe",
36
- "optimize_positions_and_volume_with_qe",
37
- ]
38
- except ImportError:
39
- pass
40
67
 
41
68
  try:
42
69
  from atomistics.calculators.lammps import (
@@ -53,43 +80,31 @@ try:
53
80
  optimize_positions_and_volume_with_lammpslib,
54
81
  optimize_positions_with_lammpslib,
55
82
  )
83
+ except ImportError as e:
84
+ raise_warning(module_list=lammps_functions, import_error=e)
85
+ else:
86
+ __all__ += lammps_functions
56
87
 
57
- __all__ += [
58
- "calc_molecular_dynamics_thermal_expansion_with_lammpslib",
59
- "calc_molecular_dynamics_nph_with_lammpslib",
60
- "calc_molecular_dynamics_npt_with_lammpslib",
61
- "calc_molecular_dynamics_nvt_with_lammpslib",
62
- "calc_molecular_dynamics_langevin_with_lammpslib",
63
- "calc_static_with_lammpslib",
64
- "evaluate_with_lammpslib",
65
- "evaluate_with_lammpslib_library_interface",
66
- "get_potential_dataframe",
67
- "get_potential_by_name",
68
- "optimize_positions_and_volume_with_lammpslib",
69
- "optimize_positions_with_lammpslib",
70
- ]
71
- except ImportError:
72
- pass
73
88
 
74
89
  try:
75
90
  from atomistics.calculators.lammps.phonon import (
76
91
  calc_molecular_dynamics_phonons_with_lammpslib,
77
92
  )
93
+ except ImportError as e:
94
+ raise_warning(module_list=lammps_phonon_functions, import_error=e)
95
+ else:
96
+ __all__ += lammps_phonon_functions
78
97
 
79
- __all__ += ["calc_molecular_dynamics_phonons_with_lammpslib"]
80
- except ImportError:
81
- pass
82
98
 
83
99
  try:
84
100
  from atomistics.calculators.sphinxdft import (
85
101
  evaluate_with_sphinx,
86
102
  )
103
+ except ImportError as e:
104
+ raise_warning(module_list=sphinx_functions, import_error=e)
105
+ else:
106
+ __all__ += sphinx_functions
87
107
 
88
- __all__ += [
89
- "evaluate_with_sphinx",
90
- ]
91
- except ImportError:
92
- pass
93
108
 
94
109
  try:
95
110
  from atomistics.calculators.vasp import (
@@ -100,14 +115,7 @@ try:
100
115
  optimize_positions_with_vasp,
101
116
  optimize_volume_with_vasp,
102
117
  )
103
-
104
- __all__ += [
105
- "evaluate_with_vasp",
106
- "calc_static_with_vasp",
107
- "optimize_positions_and_volume_with_vasp",
108
- "optimize_positions_with_vasp",
109
- "optimize_cell_with_vasp",
110
- "optimize_volume_with_vasp",
111
- ]
112
- except ImportError:
113
- pass
118
+ except ImportError as e:
119
+ raise_warning(module_list=vasp_functions, import_error=e)
120
+ else:
121
+ __all__ += vasp_functions
@@ -146,22 +146,22 @@ class ASEExecutor:
146
146
  @as_task_dict_evaluator
147
147
  def evaluate_with_ase(
148
148
  structure: Atoms,
149
- tasks: list[str],
149
+ tasks: list,
150
150
  ase_calculator: ASECalculator,
151
- ase_optimizer: Optimizer = None,
151
+ ase_optimizer: type[Optimizer] = None,
152
152
  ase_optimizer_kwargs: dict = None,
153
- filter_class: Filter = UnitCellFilter,
153
+ filter_class: type[Filter] = UnitCellFilter,
154
154
  ) -> dict:
155
155
  """
156
156
  Evaluate tasks using ASE calculator.
157
157
 
158
158
  Args:
159
159
  structure (Atoms): The ASE structure object.
160
- tasks (list[TaskName]): List of tasks to evaluate.
160
+ tasks (list): List of tasks to evaluate.
161
161
  ase_calculator (ASECalculator): The ASE calculator object.
162
- ase_optimizer (Optimizer, optional): The ASE optimizer object. Defaults to None.
162
+ ase_optimizer (Type[Optimizer], optional): The ASE optimizer object. Defaults to None.
163
163
  ase_optimizer_kwargs (dict, optional): Keyword arguments for the ASE optimizer. Defaults to {}.
164
- filter_class (Filter): The ASE filter class to use for filtering during structure optimization.
164
+ filter_class (Type[Filter]): The ASE filter class to use for filtering during structure optimization.
165
165
 
166
166
  Returns:
167
167
  dict: Dictionary containing the results of the evaluated tasks.
@@ -240,18 +240,18 @@ def calc_molecular_dynamics_langevin_with_ase(
240
240
  """
241
241
  Perform molecular dynamics simulation using the Langevin algorithm with ASE.
242
242
 
243
- Parameters:
244
- - structure (Atoms): The atomic structure to simulate.
245
- - ase_calculator (Calculator): The ASE calculator to use for energy and force calculations.
246
- - run (int): The number of MD steps to perform.
247
- - thermo (int): The interval at which to print thermodynamic properties.
248
- - timestep (float): The time step size in fs.
249
- - temperature (float): The desired temperature in Kelvin.
250
- - friction (float): The friction coefficient for the Langevin thermostat.
251
- - output_keys (List[str]): The keys of the properties to include in the output dictionary.
243
+ Args:
244
+ structure (Atoms): The atomic structure to simulate.
245
+ ase_calculator (ASECalculator): The ASE calculator to use for energy and force calculations.
246
+ run (int): The number of MD steps to perform.
247
+ thermo (int): The interval at which to print thermodynamic properties.
248
+ timestep (float): The time step size in fs.
249
+ temperature (float): The desired temperature in Kelvin.
250
+ friction (float): The friction coefficient for the Langevin thermostat.
251
+ output_keys (list[str]): The keys of the properties to include in the output dictionary.
252
252
 
253
253
  Returns:
254
- - dict: A dictionary containing the calculated properties at each MD step.
254
+ dict: A dictionary containing the calculated properties at each MD step.
255
255
  """
256
256
  return _calc_molecular_dynamics_with_ase(
257
257
  dyn=Langevin(
@@ -272,7 +272,7 @@ def calc_molecular_dynamics_langevin_with_ase(
272
272
  def optimize_positions_with_ase(
273
273
  structure: Atoms,
274
274
  ase_calculator: ASECalculator,
275
- ase_optimizer: Optimizer,
275
+ ase_optimizer: type[Optimizer],
276
276
  ase_optimizer_kwargs: dict,
277
277
  ) -> Atoms:
278
278
  """
@@ -297,9 +297,9 @@ def optimize_positions_with_ase(
297
297
  def optimize_positions_and_volume_with_ase(
298
298
  structure: Atoms,
299
299
  ase_calculator: ASECalculator,
300
- ase_optimizer: Optimizer,
300
+ ase_optimizer: type[Optimizer],
301
301
  ase_optimizer_kwargs: dict,
302
- filter_class: Filter = UnitCellFilter,
302
+ filter_class: type[Filter] = UnitCellFilter,
303
303
  ) -> Atoms:
304
304
  """
305
305
  Optimize the atomic positions and cell volume of the structure using ASE optimizer.
@@ -324,9 +324,9 @@ def optimize_positions_and_volume_with_ase(
324
324
  def optimize_volume_with_ase(
325
325
  structure: Atoms,
326
326
  ase_calculator: ASECalculator,
327
- ase_optimizer: Optimizer,
327
+ ase_optimizer: type[Optimizer],
328
328
  ase_optimizer_kwargs: dict,
329
- filter_class: Filter = UnitCellFilter,
329
+ filter_class: type[Filter] = UnitCellFilter,
330
330
  hydrostatic_strain: bool = True,
331
331
  ) -> Atoms:
332
332
  """
@@ -387,7 +387,7 @@ def calc_molecular_dynamics_thermal_expansion_with_ase(
387
387
  ttime (float, optional): The total time for the simulation in fs. Defaults to 100 * units.fs.
388
388
  pfactor (float, optional): The pressure factor in GPa * fs^2. Defaults to 2e6 * units.GPa * (units.fs**2).
389
389
  externalstress (np.ndarray, optional): The external stress tensor in bar. Defaults to np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) * units.bar.
390
- output_keys (List[str], optional): The keys of the properties to include in the output dictionary. Defaults to OutputThermalExpansion.keys().
390
+ output_keys (list[str], optional): The keys of the properties to include in the output dictionary. Defaults to OutputThermalExpansion.keys().
391
391
 
392
392
  Returns:
393
393
  dict: A dictionary containing the calculated thermal expansion properties.
@@ -444,7 +444,7 @@ def calc_molecular_dynamics_npt_with_ase(
444
444
  pfactor (float, optional): The pressure factor in GPa * fs^2. Defaults to 2e6 * units.GPa * (units.fs**2).
445
445
  temperature (float, optional): The desired temperature in Kelvin. Defaults to 300.0.
446
446
  externalstress (np.ndarray, optional): The external stress tensor in bar. Defaults to np.array([0.0, 0.0, 0.0, 0.0, 0.0, 0.0]) * units.bar.
447
- output_keys (List[str], optional): The keys of the properties to include in the output dictionary. Defaults to OutputMolecularDynamics.keys().
447
+ output_keys (list[str], optional): The keys of the properties to include in the output dictionary. Defaults to OutputMolecularDynamics.keys().
448
448
 
449
449
  Returns:
450
450
  dict: A dictionary containing the calculated properties at each MD step.
@@ -486,13 +486,13 @@ def _calc_molecular_dynamics_with_ase(
486
486
  Perform molecular dynamics simulation using ASE.
487
487
 
488
488
  Args:
489
- dyn: The ASE dynamics object.
489
+ dyn (ase.md.MDLogger): The ASE dynamics object.
490
490
  structure (Atoms): The atomic structure to simulate.
491
491
  ase_calculator (ASECalculator): The ASE calculator to use for energy and force calculations.
492
492
  temperature (float): The desired temperature in Kelvin.
493
493
  run (int): The number of MD steps to perform.
494
494
  thermo (int): The interval at which to print thermodynamic properties.
495
- output_keys (List[str]): The keys of the properties to include in the output dictionary.
495
+ output_keys (list[str]): The keys of the properties to include in the output dictionary.
496
496
 
497
497
  Returns:
498
498
  dict: A dictionary containing the calculated properties at each MD step.
@@ -14,20 +14,9 @@ from atomistics.calculators.lammps.potential import (
14
14
  get_potential_by_name,
15
15
  get_potential_dataframe,
16
16
  )
17
+ from atomistics.shared.import_warning import raise_warning
17
18
 
18
- try:
19
- from atomistics.calculators.lammps.phonon import (
20
- calc_molecular_dynamics_phonons_with_lammpslib,
21
- )
22
-
23
- __all__ = [
24
- "calc_molecular_dynamics_phonons_with_lammpslib",
25
- ]
26
- except ImportError:
27
- __all__ = []
28
-
29
-
30
- __all__ += [
19
+ __all__: list[str] = [
31
20
  "calc_molecular_dynamics_thermal_expansion_with_lammpslib",
32
21
  "calc_molecular_dynamics_nph_with_lammpslib",
33
22
  "calc_molecular_dynamics_npt_with_lammpslib",
@@ -41,3 +30,14 @@ __all__ += [
41
30
  "get_potential_dataframe",
42
31
  "get_potential_by_name",
43
32
  ]
33
+ lammps_phonon_functions: list[str] = ["calc_molecular_dynamics_phonons_with_lammpslib"]
34
+
35
+
36
+ try:
37
+ from atomistics.calculators.lammps.phonon import (
38
+ calc_molecular_dynamics_phonons_with_lammpslib,
39
+ )
40
+ except ImportError as e:
41
+ raise_warning(module_list=lammps_phonon_functions, import_error=e)
42
+ else:
43
+ __all__ += lammps_phonon_functions