qupled 1.0.2__tar.gz → 1.0.3__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 (147) hide show
  1. {qupled-1.0.2 → qupled-1.0.3}/PKG-INFO +1 -1
  2. {qupled-1.0.2 → qupled-1.0.3}/docs/examples.rst +25 -28
  3. {qupled-1.0.2 → qupled-1.0.3}/docs/qupled.rst +1 -1
  4. qupled-1.0.2/examples/docs/fixedAdrQstls.py → qupled-1.0.3/examples/docs/fixed_adr_qstls.py +2 -2
  5. qupled-1.0.2/examples/docs/fixedAdrQstlsIet.py → qupled-1.0.3/examples/docs/fixed_adr_qstls_iet.py +4 -4
  6. qupled-1.0.2/examples/docs/fixedAdrQVSStls.py → qupled-1.0.3/examples/docs/fixed_adr_qvsstls.py +2 -2
  7. qupled-1.0.2/examples/docs/initialGuessQstls.py → qupled-1.0.3/examples/docs/initial_guess_qstls.py +1 -1
  8. qupled-1.0.2/examples/docs/initialGuessQstlsIet.py → qupled-1.0.3/examples/docs/initial_guess_qstls_iet.py +2 -2
  9. qupled-1.0.2/examples/docs/initialGuessStls.py → qupled-1.0.3/examples/docs/initial_guess_stls.py +1 -1
  10. qupled-1.0.2/examples/docs/solveQuantumSchemes.py → qupled-1.0.3/examples/docs/solve_quantum_schemes.py +1 -1
  11. qupled-1.0.2/examples/docs/solveQVSStls.py → qupled-1.0.3/examples/docs/solve_qvsstls.py +3 -3
  12. qupled-1.0.2/examples/docs/solveRpaAndESA.py → qupled-1.0.3/examples/docs/solve_rpa_and_esa.py +6 -6
  13. qupled-1.0.2/examples/docs/solveStls.py → qupled-1.0.3/examples/docs/solve_stls.py +3 -3
  14. qupled-1.0.3/examples/docs/solve_vsstls.py +29 -0
  15. {qupled-1.0.2 → qupled-1.0.3}/examples/readme/create_cover.py +2 -2
  16. qupled-1.0.3/examples/tests/test_examples.py +87 -0
  17. {qupled-1.0.2 → qupled-1.0.3}/pyproject.toml +1 -1
  18. qupled-1.0.3/src/qupled/base.py +268 -0
  19. qupled-1.0.3/src/qupled/classic.py +7 -0
  20. qupled-1.0.3/src/qupled/esa.py +41 -0
  21. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/python_modules.cpp +30 -28
  22. qupled-1.0.3/src/qupled/qstls.py +51 -0
  23. qupled-1.0.3/src/qupled/qstlsiet.py +107 -0
  24. qupled-1.0.3/src/qupled/quantum.py +5 -0
  25. qupled-1.0.3/src/qupled/qvsstls.py +109 -0
  26. qupled-1.0.3/src/qupled/rpa.py +72 -0
  27. qupled-1.0.3/src/qupled/stls.py +58 -0
  28. qupled-1.0.3/src/qupled/stlsiet.py +73 -0
  29. qupled-1.0.3/src/qupled/util.py +434 -0
  30. qupled-1.0.3/src/qupled/vsstls.py +103 -0
  31. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/PKG-INFO +1 -1
  32. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/SOURCES.txt +22 -13
  33. qupled-1.0.3/tests/test_esa.py +29 -0
  34. {qupled-1.0.2 → qupled-1.0.3}/tests/test_esa_native.py +10 -11
  35. qupled-1.0.3/tests/test_hdf.py +235 -0
  36. qupled-1.0.3/tests/test_plot.py +26 -0
  37. qupled-1.0.3/tests/test_qstls.py +83 -0
  38. qupled-1.0.3/tests/test_qstls_iet.py +142 -0
  39. {qupled-1.0.2 → qupled-1.0.3}/tests/test_qstls_input.py +31 -32
  40. {qupled-1.0.2 → qupled-1.0.3}/tests/test_qstls_native.py +25 -26
  41. qupled-1.0.3/tests/test_qvs.py +161 -0
  42. {qupled-1.0.2 → qupled-1.0.3}/tests/test_qvs_input.py +66 -67
  43. qupled-1.0.3/tests/test_qvs_native.py +62 -0
  44. qupled-1.0.3/tests/test_rpa.py +110 -0
  45. {qupled-1.0.2 → qupled-1.0.3}/tests/test_rpa_input.py +44 -45
  46. {qupled-1.0.2 → qupled-1.0.3}/tests/test_rpa_native.py +9 -10
  47. qupled-1.0.3/tests/test_stls.py +77 -0
  48. qupled-1.0.3/tests/test_stls_iet.py +65 -0
  49. {qupled-1.0.2 → qupled-1.0.3}/tests/test_stls_input.py +40 -41
  50. {qupled-1.0.2 → qupled-1.0.3}/tests/test_stls_native.py +21 -21
  51. qupled-1.0.3/tests/test_vsstls.py +86 -0
  52. {qupled-1.0.2 → qupled-1.0.3}/tests/test_vsstls_input.py +66 -67
  53. {qupled-1.0.2 → qupled-1.0.3}/tests/test_vsstls_native.py +18 -19
  54. {qupled-1.0.2 → qupled-1.0.3}/tox.ini +3 -0
  55. qupled-1.0.2/examples/docs/solveVSStls.py +0 -30
  56. qupled-1.0.2/examples/docs/tests/test_examples.py +0 -85
  57. qupled-1.0.2/src/qupled/classic.py +0 -494
  58. qupled-1.0.2/src/qupled/quantum.py +0 -301
  59. qupled-1.0.2/src/qupled/util.py +0 -330
  60. qupled-1.0.2/tests/test_esa.py +0 -31
  61. qupled-1.0.2/tests/test_hdf.py +0 -175
  62. qupled-1.0.2/tests/test_plot.py +0 -32
  63. qupled-1.0.2/tests/test_qstls.py +0 -79
  64. qupled-1.0.2/tests/test_qstls_iet.py +0 -125
  65. qupled-1.0.2/tests/test_qvs.py +0 -140
  66. qupled-1.0.2/tests/test_qvs_native.py +0 -63
  67. qupled-1.0.2/tests/test_rpa.py +0 -108
  68. qupled-1.0.2/tests/test_stls.py +0 -75
  69. qupled-1.0.2/tests/test_stls_iet.py +0 -67
  70. qupled-1.0.2/tests/test_vsstls.py +0 -81
  71. {qupled-1.0.2 → qupled-1.0.3}/.clang-format +0 -0
  72. {qupled-1.0.2 → qupled-1.0.3}/.github/workflows/build-and-test-base.yml +0 -0
  73. {qupled-1.0.2 → qupled-1.0.3}/.github/workflows/build-and-test.yml +0 -0
  74. {qupled-1.0.2 → qupled-1.0.3}/.github/workflows/formatting.yml +0 -0
  75. {qupled-1.0.2 → qupled-1.0.3}/.github/workflows/release.yml +0 -0
  76. {qupled-1.0.2 → qupled-1.0.3}/.gitignore +0 -0
  77. {qupled-1.0.2 → qupled-1.0.3}/.readthedocs.yaml +0 -0
  78. {qupled-1.0.2 → qupled-1.0.3}/LICENSE +0 -0
  79. {qupled-1.0.2 → qupled-1.0.3}/MANIFEST.in +0 -0
  80. {qupled-1.0.2 → qupled-1.0.3}/README.md +0 -0
  81. {qupled-1.0.2 → qupled-1.0.3}/dev/devtool.py +0 -0
  82. {qupled-1.0.2 → qupled-1.0.3}/dev/requirements.txt +0 -0
  83. {qupled-1.0.2 → qupled-1.0.3}/devtool +0 -0
  84. {qupled-1.0.2 → qupled-1.0.3}/docs/_static/css/rdt_theme_python_properties.css +0 -0
  85. {qupled-1.0.2 → qupled-1.0.3}/docs/conf.py +0 -0
  86. {qupled-1.0.2 → qupled-1.0.3}/docs/contribute.rst +0 -0
  87. {qupled-1.0.2 → qupled-1.0.3}/docs/index.rst +0 -0
  88. {qupled-1.0.2 → qupled-1.0.3}/docs/introduction.rst +0 -0
  89. {qupled-1.0.2 → qupled-1.0.3}/docs/make.bat +0 -0
  90. {qupled-1.0.2 → qupled-1.0.3}/docs/requirements.txt +0 -0
  91. /qupled-1.0.2/examples/docs/solveStlsIet.py → /qupled-1.0.3/examples/docs/solve_stls_iet.py +0 -0
  92. {qupled-1.0.2 → qupled-1.0.3}/examples/readme/qupled_animation_dark.svg +0 -0
  93. {qupled-1.0.2 → qupled-1.0.3}/examples/readme/qupled_animation_light.svg +0 -0
  94. {qupled-1.0.2 → qupled-1.0.3}/setup.cfg +0 -0
  95. {qupled-1.0.2 → qupled-1.0.3}/setup.py +0 -0
  96. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/__init__.py +0 -0
  97. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/bin_util.hpp +0 -0
  98. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/chemical_potential.hpp +0 -0
  99. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/dual.hpp +0 -0
  100. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/esa.hpp +0 -0
  101. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/free_energy.hpp +0 -0
  102. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/input.hpp +0 -0
  103. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/internal_energy.hpp +0 -0
  104. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/logger.hpp +0 -0
  105. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/mpi_util.hpp +0 -0
  106. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/num_util.hpp +0 -0
  107. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/numerics.hpp +0 -0
  108. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/python_util.hpp +0 -0
  109. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/python_wrappers.hpp +0 -0
  110. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/qstls.hpp +0 -0
  111. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/qvs.hpp +0 -0
  112. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/rdf.hpp +0 -0
  113. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/rpa.hpp +0 -0
  114. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/stls.hpp +0 -0
  115. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/thermo_util.hpp +0 -0
  116. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/vector2D.hpp +0 -0
  117. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/vector3D.hpp +0 -0
  118. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/vector_util.hpp +0 -0
  119. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/vsbase.hpp +0 -0
  120. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/include/vsstls.hpp +0 -0
  121. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/CMakeLists.txt +0 -0
  122. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/chemical_potential.cpp +0 -0
  123. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/esa.cpp +0 -0
  124. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/free_energy.cpp +0 -0
  125. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/input.cpp +0 -0
  126. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/internal_energy.cpp +0 -0
  127. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/logger.cpp +0 -0
  128. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/mpi_util.cpp +0 -0
  129. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/num_util.cpp +0 -0
  130. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/numerics.cpp +0 -0
  131. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/python_util.cpp +0 -0
  132. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/python_wrappers.cpp +0 -0
  133. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/qstls.cpp +0 -0
  134. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/qvs.cpp +0 -0
  135. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/rdf.cpp +0 -0
  136. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/rpa.cpp +0 -0
  137. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/stls.cpp +0 -0
  138. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/thermo_util.cpp +0 -0
  139. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/vector2D.cpp +0 -0
  140. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/vector3D.cpp +0 -0
  141. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/vector_util.cpp +0 -0
  142. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/vsbase.cpp +0 -0
  143. {qupled-1.0.2 → qupled-1.0.3}/src/qupled/native/src/vsstls.cpp +0 -0
  144. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/dependency_links.txt +0 -0
  145. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/not-zip-safe +0 -0
  146. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/requires.txt +0 -0
  147. {qupled-1.0.2 → qupled-1.0.3}/src/qupled.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: qupled
3
- Version: 1.0.2
3
+ Version: 1.0.3
4
4
  Summary: qupled: a package to investigate quantum plasmas via the dielectric formalism
5
5
  Author-email: Federico Lucco Castello <federico.luccocastello@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3.10
@@ -10,7 +10,7 @@ This example sets up all the necessary objects to solve the RPA and ESA schemes
10
10
  shows how to access the information stored in the output files produced at the
11
11
  end of the calculations
12
12
 
13
- .. literalinclude:: ../examples/docs/solveRpaAndESA.py
13
+ .. literalinclude:: ../examples/docs/solve_rpa_and_esa.py
14
14
  :language: python
15
15
 
16
16
  A simple STLS solution
@@ -23,17 +23,17 @@ or from the output file created at the end of the run. The example illustrates h
23
23
  the static structure factor can be accessed with both these methods. Other quantities
24
24
  can be accessed in the same way.
25
25
 
26
- .. literalinclude:: ../examples/docs/solveStls.py
26
+ .. literalinclude:: ../examples/docs/solve_stls.py
27
27
  :language: python
28
28
 
29
- Solving the classical IET schemes
29
+ Solving the classical IET schemes
30
30
  ----------------------------------
31
31
 
32
32
  This example shows how to solve two classical STLS-IET schemes: the STLS-HNC and
33
33
  the STLS-LCT schemes. The schemes are solved one after the other by simply
34
34
  updating the properties of the solution object.
35
35
 
36
- .. literalinclude:: ../examples/docs/solveStlsIet.py
36
+ .. literalinclude:: ../examples/docs/solve_stls_iet.py
37
37
  :language: python
38
38
 
39
39
  .. _solvingQuantumSchemes:
@@ -47,20 +47,20 @@ we limit the number of matsubara frequencies to 16, we use 16 OMP threads to
47
47
  speed up the calculation and we employ a segregated approach to solve the two-dimensional
48
48
  integrals that appear in the schemes.
49
49
 
50
- .. literalinclude:: ../examples/docs/solveQuantumSchemes.py
50
+ .. literalinclude:: ../examples/docs/solve_quantum_schemes.py
51
51
  :language: python
52
52
 
53
53
  Solving the VS schemes
54
- ---------------------------
54
+ ----------------------
55
55
 
56
56
  This example shows how to solve the classical VS-STLS scheme at finite temperature.
57
- First the scheme is solved up to rs = 5.0, then the results are
58
- plotted and then the calculation is resumed up to rs = 10. In the second
57
+ First the scheme is solved up to rs = 2, then the results are
58
+ plotted and then the calculation is resumed up to rs = 5. In the second
59
59
  part of the calculation, the pre-computed value of the free energy integrand
60
- available from the VS-STLS solution at rs = 5.0 is used in order to speed
60
+ available from the VS-STLS solution at rs = 2 is used in order to speed
61
61
  up the calculation.
62
62
 
63
- .. literalinclude:: ../examples/docs/solveVSStls.py
63
+ .. literalinclude:: ../examples/docs/solve_vsstls.py
64
64
  :language: python
65
65
 
66
66
  This example shows how to solve the quantum version of the VS-STLS scheme.
@@ -68,9 +68,9 @@ Following the same logic of the previous example we first solve the scheme
68
68
  up to rs = 1.0 and then we resume the calculation up to rs = 2.0 while using
69
69
  the pre-compute values of the free energy integrand.
70
70
 
71
- .. literalinclude:: ../examples/docs/solveQVSStls.py
71
+ .. literalinclude:: ../examples/docs/solve_qvsstls.py
72
72
  :language: python
73
-
73
+
74
74
  Define an initial guess
75
75
  -----------------------
76
76
 
@@ -80,24 +80,23 @@ an initial guess is not specified the code will use the default, namely zero sta
80
80
  local field correction for the classical schemes and STLS static structure factor
81
81
  for the quantum schemes.
82
82
 
83
- .. literalinclude:: ../examples/docs/initialGuessStls.py
83
+ .. literalinclude:: ../examples/docs/initial_guess_stls.py
84
84
  :language: python
85
85
 
86
86
  In the following example we solve the QSTLS scheme twice and the second time we
87
87
  specify the initial guess as the solution obtained from the first solution. Having
88
88
  provided a nearly exact initial guess the scheme converges in a single iteration.
89
-
90
- .. literalinclude:: ../examples/docs/initialGuessQstls.py
89
+
90
+ .. literalinclude:: ../examples/docs/initial_guess_qstls.py
91
91
  :language: python
92
92
 
93
- The QSTLS-IET scheme requires to specify an initial guess for the auxiliary density
93
+ The QSTLS-IET scheme requires to specify an initial guess for the auxiliary density
94
94
  response and the number of matsubara frequencies corresponding to such initial guess.
95
95
  These specifications can be skipped in all other schemes.
96
96
 
97
- .. literalinclude:: ../examples/docs/initialGuessQstlsIet.py
97
+ .. literalinclude:: ../examples/docs/initial_guess_qstls_iet.py
98
98
  :language: python
99
-
100
-
99
+
101
100
  Speed-up the quantum schemes
102
101
  ----------------------------
103
102
 
@@ -116,19 +115,19 @@ that can be employed to speed up the calculations:
116
115
  This can usually be done by passing in input the so-called 'fixed' component of the
117
116
  auxiliary density response. The fixed component of the auxiliary density response depends
118
117
  only on the degeneracy parameter and is printed to specific ouput files when a quantum
119
- scheme is solved. These output files can be used is successive calculations to avoid
120
- recomputing the fixed component and to speed-up the solution of the quantum schemes.
118
+ scheme is solved. These output files can be used in successive calculations to avoid
119
+ recomputing the fixed component and to speed-up the solution of the quantum schemes.
121
120
  The following two examples illustrate how this can be done for both the QSTLS and
122
121
  the QSTLS-IET schemes.
123
122
 
124
- For the QSTLS scheme it is sufficient to pass the name of binary file containing the fixed component.
123
+ For the QSTLS scheme it is sufficient to pass the name of binary file containing the fixed component.
125
124
  This allows to obtain identical results (compare the internal energies printed at the end of
126
125
  the example) in a fraction of the time. We can also recycle the same fixed component for
127
126
  different coupling parameters provided that the degeneracy parameter stays the same. On the
128
- other hand, when changing the degeneracy parameter the fixed component must also be upated
127
+ other hand, when changing the degeneracy parameter the fixed component must also be updated
129
128
  otherwise the calculation fails as shown at the end of the example.
130
129
 
131
- .. literalinclude:: ../examples/docs/fixedAdrQstls.py
130
+ .. literalinclude:: ../examples/docs/fixed_adr_qstls.py
132
131
  :language: python
133
132
 
134
133
  For the QSTLS-IET schemes we must pass the name of two files: the binary file with the
@@ -137,7 +136,7 @@ of binary files representing the fixed component for the QSTLS-IET scheme. Here
137
136
  component depends only on the degeneracy parameter but not on the coupling
138
137
  parameter and not on the theory used for the bridge function.
139
138
 
140
- .. literalinclude:: ../examples/docs/fixedAdrQstlsIet.py
139
+ .. literalinclude:: ../examples/docs/fixed_adr_qstls_iet.py
141
140
  :language: python
142
141
 
143
142
  For the QVS-STLS scheme we must pass the name of one zip file containing the data for the
@@ -145,7 +144,5 @@ fixed auxiliary density response. The same fixed component can be re-used for di
145
144
  coupling parameters provided that the degeneracy parameter and the degeneracy parameter
146
145
  resolution remain the same.
147
146
 
148
- .. literalinclude:: ../examples/docs/fixedAdrQVSStls.py
147
+ .. literalinclude:: ../examples/docs/fixed_adr_qvsstls.py
149
148
  :language: python
150
-
151
-
@@ -528,6 +528,6 @@ Initial guess
528
528
  Output
529
529
  ------
530
530
 
531
- .. autoclass:: qupled.util.Hdf
531
+ .. autoclass:: qupled.util.HDF
532
532
  :members:
533
533
 
@@ -11,14 +11,14 @@ inputs.threads = 16
11
11
 
12
12
  # Solve the QSTLS scheme and store the internal energy (v1 calculation)
13
13
  qstls.compute(inputs)
14
- uInt1 = qstls.computeInternalEnergy()
14
+ uInt1 = qstls.compute_internal_energy()
15
15
 
16
16
  # Pass in input the fixed component of the auxiliary density response
17
17
  inputs.fixed = "adr_fixed_theta1.000_matsubara16_QSTLS.bin"
18
18
 
19
19
  # Repeat the calculation and recompute the internal energy (v2 calculation)
20
20
  qstls.compute(inputs)
21
- uInt2 = qstls.computeInternalEnergy()
21
+ uInt2 = qstls.compute_internal_energy()
22
22
 
23
23
  # Compare the internal energies obtained with the two methods
24
24
  print("Internal energy (v1) = %.8f" % uInt1)
@@ -8,19 +8,19 @@ inputs = QstlsIet.Input(10.0, 1.0, "QSTLS-HNC")
8
8
  inputs.mixing = 0.5
9
9
  inputs.matsubara = 16
10
10
  inputs.threads = 16
11
- inputs.int2DScheme = "segregated"
11
+ inputs.integral_strategy = "segregated"
12
12
 
13
13
  # Solve the QSTLS-HNC scheme and store the internal energy (v1 calculation)
14
14
  qstls.compute(inputs)
15
- uInt1 = qstls.computeInternalEnergy()
15
+ uInt1 = qstls.compute_internal_energy()
16
16
 
17
17
  # Pass in input the fixed component of the auxiliary density response
18
18
  inputs.fixed = "adr_fixed_theta1.000_matsubara16_QSTLS-HNC.bin"
19
- inputs.fixediet = "adr_fixed_theta1.000_matsubara16_QSTLS-HNC.zip"
19
+ inputs.fixed_iet = "adr_fixed_theta1.000_matsubara16_QSTLS-HNC.zip"
20
20
 
21
21
  # Repeat the calculation and recompute the internal energy (v2 calculation)
22
22
  qstls.compute(inputs)
23
- uInt2 = qstls.computeInternalEnergy()
23
+ uInt2 = qstls.compute_internal_energy()
24
24
 
25
25
  # Compare the internal energies obtained with the two methods
26
26
  print("Internal energy (v1) = %.8f" % uInt1)
@@ -13,14 +13,14 @@ inputs.threads = 16
13
13
 
14
14
  # Solve the QVSSTLS scheme and store the internal energy (v1 calculation)
15
15
  qvsstls.compute(inputs)
16
- uInt1 = qvsstls.computeInternalEnergy()
16
+ uInt1 = qvsstls.compute_internal_energy()
17
17
 
18
18
  # Pass in input the fixed component of the auxiliary density response
19
19
  inputs.fixed = "adr_fixed_theta1.000_matsubara16_QVSSTLS.zip"
20
20
 
21
21
  # Repeat the calculation and recompute the internal energy (v2 calculation)
22
22
  qvsstls.compute(inputs)
23
- uInt2 = qvsstls.computeInternalEnergy()
23
+ uInt2 = qvsstls.compute_internal_energy()
24
24
 
25
25
  # Compare the internal energies obtained with the two methods
26
26
  print("Internal energy (v1) = %.8f" % uInt1)
@@ -13,7 +13,7 @@ inputs.threads = 16
13
13
  qstls.compute(inputs)
14
14
 
15
15
  # Create a custom initial guess from the output files of the previous run
16
- inputs.guess = Qstls.getInitialGuess("rs10.000_theta1.000_QSTLS.h5")
16
+ inputs.guess = Qstls.get_initial_guess("rs10.000_theta1.000_QSTLS.h5")
17
17
 
18
18
  # Solve the scheme again with the new initial guess
19
19
  qstls.compute(inputs)
@@ -8,13 +8,13 @@ inputs = QstlsIet.Input(10.0, 1.0, "QSTLS-HNC")
8
8
  inputs.mixing = 0.5
9
9
  inputs.matsubara = 16
10
10
  inputs.threads = 16
11
- inputs.int2DScheme = "segregated"
11
+ inputs.integral_strategy = "segregated"
12
12
 
13
13
  # Solve the scheme
14
14
  qstls.compute(inputs)
15
15
 
16
16
  # Create a custom initial guess from the output files of the previous run
17
- inputs.guess = QstlsIet.getInitialGuess("rs10.000_theta1.000_QSTLS-HNC.h5")
17
+ inputs.guess = QstlsIet.get_initial_guess("rs10.000_theta1.000_QSTLS-HNC.h5")
18
18
 
19
19
  # Solve the scheme again with the new initial guess
20
20
  qstls.compute(inputs)
@@ -11,7 +11,7 @@ inputs.mixing = 0.2
11
11
  stls.compute(inputs)
12
12
 
13
13
  # Create a custom initial guess from the output files of the previous run
14
- inputs.guess = Stls.getInitialGuess("rs10.000_theta1.000_STLS.h5")
14
+ inputs.guess = Stls.get_initial_guess("rs10.000_theta1.000_STLS.h5")
15
15
 
16
16
  # Solve the scheme again with the new initial guess and coupling parameter
17
17
  stls.compute(inputs)
@@ -24,7 +24,7 @@ inputs = QstlsIet.Input(10.0, 1.0, "QSTLS-LCT")
24
24
  inputs.mixing = 0.5
25
25
  inputs.matsubara = 16
26
26
  inputs.threads = 16
27
- inputs.int2DScheme = "segregated"
27
+ inputs.integral_strategy = "segregated"
28
28
 
29
29
  # solve the QSTLS-IET scheme
30
30
  qstls.compute(inputs)
@@ -15,15 +15,15 @@ inputs.threads = 16
15
15
  qvsstls.compute(inputs)
16
16
 
17
17
  # Load the free energy integrand computed for rs = 1.0
18
- fxci = QVSStls.getFreeEnergyIntegrand("rs1.000_theta1.000_QVSSTLS.h5")
18
+ fxci = QVSStls.get_free_energy_integrand("rs1.000_theta1.000_QVSSTLS.h5")
19
19
 
20
20
  # Setup a new simulation for rs=2.0
21
21
  inputs.coupling = 2.0
22
22
  inputs.alpha = [0.1, 0.5]
23
- inputs.freeEnergyIntegrand = fxci
23
+ inputs.free_energy_integrand = fxci
24
24
 
25
25
  # Solve scheme for rs = 2.0
26
26
  qvsstls.compute(inputs)
27
27
 
28
28
  # Plot the results
29
- qvsstls.plot(["ssf", "fxci"])
29
+ qvsstls.plot(["ssf", "fxc_int"])
@@ -18,18 +18,18 @@ esa = ESA()
18
18
  esa.compute(ESA.Input(10.0, 1.0))
19
19
 
20
20
  # Inspect the outuput files to see what data was saved
21
- outputFileRPA = rpa.hdfFileName
22
- outputFileESA = esa.hdfFileName
21
+ outputFileRPA = rpa.hdf_file_name
22
+ outputFileESA = esa.hdf_file_name
23
23
  print("########## Data stored for the RPA scheme #########")
24
- pprint(qpu.Hdf().inspect(outputFileRPA))
24
+ pprint(qpu.HDF().inspect(outputFileRPA))
25
25
  print("########## Data stored for the ESA scheme #########")
26
- pprint(qpu.Hdf().inspect(outputFileRPA))
26
+ pprint(qpu.HDF().inspect(outputFileRPA))
27
27
 
28
28
  # Retrieve some information that we want to plot from the output files
29
- hdfDataRPA = qpu.Hdf().read(
29
+ hdfDataRPA = qpu.HDF().read(
30
30
  outputFileRPA, ["coupling", "degeneracy", "theory", "ssf", "wvg"]
31
31
  )
32
- hdfDataESA = qpu.Hdf().read(
32
+ hdfDataESA = qpu.HDF().read(
33
33
  outputFileESA, ["coupling", "degeneracy", "theory", "ssf", "wvg"]
34
34
  )
35
35
 
@@ -1,6 +1,6 @@
1
1
  import numpy as np
2
2
  from qupled.classic import Stls
3
- from qupled.util import Hdf
3
+ from qupled.util import HDF
4
4
 
5
5
  # Define the object used to solve the scheme
6
6
  stls = Stls()
@@ -19,10 +19,10 @@ stls.plot(["ssf", "slfc", "rdf"])
19
19
  stls.plot(["idr"], matsubara=np.arange(1, 10, 2))
20
20
 
21
21
  # Access the static structure factor from the output file
22
- ssf = Hdf().read(stls.hdfFileName, ["ssf"])["ssf"]
22
+ ssf = HDF().read(stls.hdf_file_name, ["ssf"])["ssf"]
23
23
  print("Static structure factor from the output file: ")
24
24
  print(ssf)
25
25
 
26
26
  # Compute the internal energy
27
27
  print("Internal energy: ")
28
- print(stls.computeInternalEnergy())
28
+ print(stls.compute_internal_energy())
@@ -0,0 +1,29 @@
1
+ from qupled.classic import VSStls
2
+
3
+ # Define the object used to solve the scheme
4
+ vsstls = VSStls()
5
+
6
+ # Define the input parameters
7
+ inputs = VSStls.Input(2.0, 1.0)
8
+ inputs.mixing = 0.5
9
+ inputs.alpha = [-0.2, 0.2]
10
+
11
+ # Compute
12
+ vsstls.compute(inputs)
13
+
14
+ # Plot the results
15
+ vsstls.plot(["ssf", "slfc", "fxc_int", "sdr"])
16
+
17
+ # Load the free energy integrand computed for rs = 2.0
18
+ fxci = VSStls.get_free_energy_integrand("rs2.000_theta1.000_VSSTLS.h5")
19
+
20
+ # Setup a new VSStls simulation for rs = 5.0
21
+ inputs.coupling = 5.0
22
+ inputs.alpha = [0.5, 0.7]
23
+ inputs.free_energy_integrand = fxci
24
+
25
+ # Compute
26
+ vsstls.compute(inputs)
27
+
28
+ # Plot the results
29
+ vsstls.plot(["ssf", "slfc", "fxc_int"])
@@ -5,7 +5,7 @@ import numpy as np
5
5
  import matplotlib as mpl
6
6
  from matplotlib import pyplot as plt
7
7
  from matplotlib import colormaps as cm
8
- from qupled.util import Hdf
8
+ from qupled.util import HDF
9
9
  from qupled.quantum import Qstls
10
10
 
11
11
 
@@ -81,7 +81,7 @@ def solve_qstls():
81
81
  )
82
82
  inputs.fixed = adr_file if os.path.exists(adr_file) else inputs.fixed
83
83
  qstls.compute(inputs)
84
- results = Hdf().read(qstls.hdfFileName, ["wvg", "adr", "ssf", "idr", "error"])
84
+ results = HDF().read(qstls.hdf_file_name, ["wvg", "adr", "ssf", "idr", "error"])
85
85
  return QStlsData(
86
86
  results["wvg"], results["adr"], results["idr"], results["ssf"], results["error"]
87
87
  )
@@ -0,0 +1,87 @@
1
+ import os
2
+ import sys
3
+ import glob
4
+ import importlib
5
+ import matplotlib.pyplot as plt
6
+ import pytest
7
+
8
+
9
+ @pytest.fixture(scope="session", autouse=True)
10
+ def setup_examples_dir():
11
+ examples_dir = os.path.abspath("docs")
12
+ if examples_dir not in sys.path:
13
+ sys.path.insert(0, examples_dir)
14
+ yield
15
+ if examples_dir in sys.path:
16
+ sys.path.remove(examples_dir)
17
+
18
+
19
+ @pytest.fixture(autouse=True)
20
+ def mock_plt_show(mocker):
21
+ mocker.patch.object(plt, plt.show.__name__)
22
+
23
+
24
+ @pytest.fixture(autouse=True)
25
+ def clean_example_files():
26
+ yield
27
+ for file_extension in ["h5", "bin", "zip"]:
28
+ file_names = glob.glob(f"*.{file_extension}")
29
+ for file_name in file_names:
30
+ os.remove(file_name)
31
+
32
+
33
+ def run_example(example_name, expected_error_message=None):
34
+ if expected_error_message is not None:
35
+ with pytest.raises(SystemExit) as excinfo:
36
+ importlib.import_module(example_name)
37
+ assert excinfo.value.code == expected_error_message
38
+ else:
39
+ importlib.import_module(example_name)
40
+
41
+
42
+ def test_fixed_adr_qstls():
43
+ run_example("fixed_adr_qstls", "Error while solving the dielectric theory")
44
+
45
+
46
+ def test_fixed_adr_qstls_iet():
47
+ run_example("fixed_adr_qstls_iet")
48
+
49
+
50
+ def test_fixed_adr_qvs_stls():
51
+ run_example("fixed_adr_qvsstls")
52
+
53
+
54
+ def test_initial_guess_qstls():
55
+ run_example("initial_guess_qstls")
56
+
57
+
58
+ def test_initial_guess_qstls_iet():
59
+ run_example("initial_guess_qstls_iet")
60
+
61
+
62
+ def test_initial_guess_stls():
63
+ run_example("initial_guess_stls")
64
+
65
+
66
+ def test_solve_quantum_schemes():
67
+ run_example("solve_quantum_schemes")
68
+
69
+
70
+ def test_solve_qvs_stls():
71
+ run_example("solve_qvsstls")
72
+
73
+
74
+ def test_solve_rpa_and_esa():
75
+ run_example("solve_rpa_and_esa")
76
+
77
+
78
+ def test_solve_stls():
79
+ run_example("solve_stls")
80
+
81
+
82
+ def test_solve_stls_iet():
83
+ run_example("solve_stls_iet")
84
+
85
+
86
+ def test_solve_vs_stls():
87
+ run_example("solve_vsstls")
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "qupled"
7
- version = "1.0.2"
7
+ version = "1.0.3"
8
8
  description = "qupled: a package to investigate quantum plasmas via the dielectric formalism"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10, <3.14"