qupled 1.3.3__cp311-cp311-manylinux_2_28_aarch64.whl → 1.3.5__cp311-cp311-manylinux_2_28_aarch64.whl

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.
qupled/vsstls.py CHANGED
@@ -1,23 +1,26 @@
1
1
  from __future__ import annotations
2
2
 
3
+ from dataclasses import field
3
4
  import numpy as np
4
5
 
5
6
  from . import native
6
7
  from . import output
8
+ from . import serialize
7
9
  from . import stls
8
10
 
9
11
 
10
- class VSStls(stls.Stls):
12
+ class Solver(stls.Solver):
11
13
  """
12
14
  Class used to solve the VSStls scheme.
13
15
  """
14
16
 
17
+ # Native classes used to solve the scheme
18
+ native_scheme_cls = native.VSStls
19
+ native_inputs_cls = native.VSStlsInput
20
+
15
21
  def __init__(self):
16
22
  super().__init__()
17
23
  self.results: Result = Result()
18
- # Undocumented properties
19
- self.native_scheme_cls = native.VSStls
20
- self.native_inputs_cls = native.VSStlsInput
21
24
 
22
25
  def compute(self, inputs: Input):
23
26
  """
@@ -130,58 +133,53 @@ class VSStls(stls.Stls):
130
133
  return FreeEnergyIntegrand(data[names[0]], data[names[1]])
131
134
 
132
135
 
133
- # Input class
136
+ @serialize.serializable_dataclass
134
137
  class Input(stls.Input):
135
138
  """
136
139
  Class used to manage the input for the :obj:`qupled.vsstls.VSStls` class.
137
140
  """
138
141
 
139
- def __init__(self, coupling: float, degeneracy: float):
140
- super().__init__(coupling, degeneracy)
141
- self.alpha: list[float] = [0.5, 1.0]
142
- """Initial guess for the free parameter. Default = ``[0.5, 1.0]``"""
143
- self.coupling_resolution: float = 0.1
144
- """Resolution of the coupling parameter grid. Default = ``0.1``"""
145
- self.degeneracy_resolution: float = 0.1
146
- """Resolution of the degeneracy parameter grid. Default = ``0.1``"""
147
- self.error_alpha: float = 1.0e-3
148
- """Minimum error for convergence in the free parameter. Default = ``1.0e-3``"""
149
- self.iterations_alpha: int = 50
150
- """Maximum number of iterations to determine the free parameter. Default = ``50``"""
151
- self.free_energy_integrand: FreeEnergyIntegrand = FreeEnergyIntegrand()
152
- """Pre-computed free energy integrand."""
153
- self.threads: int = 9
154
- """Number of threads. Default = ``9``"""
155
- # Undocumented default values
156
- self.theory: str = "VSSTLS"
157
-
158
-
142
+ alpha: list[float] = field(default_factory=lambda: [0.5, 1.0])
143
+ """Initial guess for the free parameter. Default = ``[0.5, 1.0]``"""
144
+ coupling_resolution: float = 0.1
145
+ """Resolution of the coupling parameter grid. Default = ``0.1``"""
146
+ degeneracy_resolution: float = 0.1
147
+ """Resolution of the degeneracy parameter grid. Default = ``0.1``"""
148
+ error_alpha: float = 1.0e-3
149
+ """Minimum error for convergence in the free parameter. Default = ``1.0e-3``"""
150
+ iterations_alpha: int = 50
151
+ """Maximum number of iterations to determine the free parameter. Default = ``50``"""
152
+ free_energy_integrand: FreeEnergyIntegrand = field(
153
+ default_factory=lambda: FreeEnergyIntegrand()
154
+ )
155
+ """Pre-computed free energy integrand."""
156
+ threads: int = 9
157
+ """Number of threads. Default = ``9``"""
158
+ # Undocumented default values
159
+ theory: str = "VSSTLS"
160
+
161
+
162
+ @serialize.serializable_dataclass
159
163
  class Result(stls.Result):
160
164
  """
161
165
  Class used to store the results for the :obj:`qupled.vsstls.VSStls` class.
162
166
  """
163
167
 
164
- def __init__(self):
165
- super().__init__()
166
- self.free_energy_grid = None
167
- """Free energy grid"""
168
- self.free_energy_integrand = None
169
- """Free energy integrand"""
170
- self.alpha = None
171
- """Free parameter"""
168
+ free_energy_grid: np.ndarray = None
169
+ """Free energy grid"""
170
+ free_energy_integrand: np.ndarray = None
171
+ """Free energy integrand"""
172
+ alpha: float = None
173
+ """Free parameter"""
172
174
 
173
175
 
176
+ @serialize.serializable_dataclass
174
177
  class FreeEnergyIntegrand:
175
178
 
176
- def __init__(
177
- self,
178
- grid: np.ndarray | None = None,
179
- integrand: np.ndarray | None = None,
180
- ):
181
- self.grid = grid
182
- """ Coupling parameter grid. Default = ``None``"""
183
- self.integrand = integrand
184
- """ Free energy integrand. Default = ``None``"""
179
+ grid: np.ndarray = None
180
+ """ Coupling parameter grid. Default = ``None``"""
181
+ integrand: np.ndarray = None
182
+ """ Free energy integrand. Default = ``None``"""
185
183
 
186
184
  def to_native(self) -> native.FreeEnergyIntegrand:
187
185
  """
@@ -201,3 +199,7 @@ class FreeEnergyIntegrand:
201
199
  if value is not None:
202
200
  setattr(native_guess, attr, value)
203
201
  return native_guess
202
+
203
+
204
+ if __name__ == "__main__":
205
+ Solver.run_mpi_worker(Input, Result)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: qupled
3
- Version: 1.3.3
3
+ Version: 1.3.5
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
  License-Expression: GPL-3.0-or-later
@@ -0,0 +1,24 @@
1
+ qupled/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
+ qupled/database.py,sha256=NJP6bfMGZFD3_nMAAWCJH8HujPpFEVQjY_EXqA4WMh4,27424
3
+ qupled/esa.py,sha256=5LpHu4zdIe2p9DBnpYAqdW7KDeL75tPmsEbM3C5_nMA,684
4
+ qupled/hf.py,sha256=7MtwNwx0XQS6BRC97IzK-OsJH78ahKMG57U5elI6g0Y,12297
5
+ qupled/mpi.py,sha256=fvFQr0fuQaIOo9si7-AGgctTPxpDvqo1RcsnBkNN4Cc,2998
6
+ qupled/native.cpython-311-aarch64-linux-gnu.so,sha256=eJDEsrpIaBv1WA4j6CZMtgz5HMT0jGvYEnmT86_IV30,2548289
7
+ qupled/output.py,sha256=VP_7oKPuULYa0UB-wX_J_cLnGd2mZZxrYeeTpNY-iwE,3602
8
+ qupled/qstls.py,sha256=G2A5e_PUP1lsUaKEajrH3ZuY2lD5wxmsyYi8n7IN6nQ,2424
9
+ qupled/qstlsiet.py,sha256=UInCZT6jpTot8TQ6arpgqNMIg_KetCf3NL1r5xwxZhw,1039
10
+ qupled/qvsstls.py,sha256=ygJilrCV6d6byYerPhkDCccapDlqaBqu9k5O_lg8BB0,1642
11
+ qupled/rpa.py,sha256=5QwdMpqEj8WIR3Ncu605XzNr2Cw3afpqrK3OXSkgCPs,606
12
+ qupled/serialize.py,sha256=uNGQnAE2ABQnWSV-yjtEecByaaW1OzQ7I_Hp7g6z-_0,1325
13
+ qupled/stls.py,sha256=pxsqQG2yI_I59kCf8QdUbrSat53gX63u-sgFLPzAflQ,2878
14
+ qupled/stlsiet.py,sha256=4zJMMhz1lmqcAGVz2OqwDKZa00jD1wJ5TXnW7siFKbs,3254
15
+ qupled/timer.py,sha256=q1X9mpvSaq2NxFk6P22ceclTSd2tkdofF1lPdENLuJ8,985
16
+ qupled/vsstls.py,sha256=E07rQGF8HReVioWIw54vitm5lYP_hbEOi2MhoQC4aKk,7607
17
+ qupled.libs/libgomp-947d5fa1.so.1.0.0,sha256=3DIx-P1MrcRthlnDuN2BGuMxdHSehoB_FvYerW7lm_0,343345
18
+ qupled.libs/libgsl-f7298b36.so.23.1.0,sha256=jn8rrET0zE2xdhK56N6YuJ4cATdR-aOHSabwHHUDA50,2718809
19
+ qupled.libs/libgslcblas-cf1da87e.so.0.0.0,sha256=PAx-YFA8VXi4IZBK8FF4fwpbzOcjCWZAdroQEma-0b4,331041
20
+ qupled-1.3.5.dist-info/METADATA,sha256=VBEeGlRY55_tDEe-9zoVegM0Ggyqep_TCqU2pAdSpJs,4559
21
+ qupled-1.3.5.dist-info/WHEEL,sha256=8jTxASeLvPr09PZ22DGSMQlRkrmgeqGaotjla49xWxo,114
22
+ qupled-1.3.5.dist-info/top_level.txt,sha256=HLJfvnCPZQVptCRuekWA_3Z98SMkCNCXViGiGh8VenA,7
23
+ qupled-1.3.5.dist-info/RECORD,,
24
+ qupled-1.3.5.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
@@ -1,22 +0,0 @@
1
- qupled/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
2
- qupled/database.py,sha256=IDgY6uvxdg5f5SVxnvWzgeB5Zi7mR6tHEFnU0m3Y_xI,25027
3
- qupled/esa.py,sha256=ksFZJ3u7VF3OxffxAR7aGjZp8Zy2SeNQ8r2xFjjqQwc,613
4
- qupled/hf.py,sha256=2hKcYny6iLvVs5-M1NtmU6QAg_-u7RWZgS46OnhcWkc,10082
5
- qupled/mpi.py,sha256=Gbu6OlHvgA4q54pdIxFS16vNTIiKuF9o7aMuXka0tlg,1892
6
- qupled/native.cpython-311-aarch64-linux-gnu.so,sha256=98TlfsWdVjfm8_vP89MybmgpLyZqXFVJauYd0fP0V_I,2339289
7
- qupled/output.py,sha256=VP_7oKPuULYa0UB-wX_J_cLnGd2mZZxrYeeTpNY-iwE,3602
8
- qupled/qstls.py,sha256=m-8_81ZHzV9VKkckACGASqF0rx38ho3hSibK9FbVgXs,2465
9
- qupled/qstlsiet.py,sha256=W_N7HQ4538HKR37CxJpxfYlqGM-rarFbVmRkP60-N90,1112
10
- qupled/qvsstls.py,sha256=Jn98Ht9sK-dYIYvxhGfM5s-NIktjQcYGc7UD01hw0_8,1748
11
- qupled/rpa.py,sha256=RQ5wUTwoRnDqRzWO877OHgG2rcgYbSGBqn0PR3E4Uxw,613
12
- qupled/stls.py,sha256=B843hdgNAVr761Fo2lmzJSmdsPCu2LIoASNSh2UeKg4,2951
13
- qupled/stlsiet.py,sha256=pYDCKh4wwfOvw7BanjfspNMAVp2xj4b2h09pm65jLgk,2982
14
- qupled/vsstls.py,sha256=y83EPv_v3DLVyydWi2IPnzYPOP3qUKzrvc9MrwxIMgU,7723
15
- qupled.libs/libgomp-947d5fa1.so.1.0.0,sha256=3DIx-P1MrcRthlnDuN2BGuMxdHSehoB_FvYerW7lm_0,343345
16
- qupled.libs/libgsl-f7298b36.so.23.1.0,sha256=jn8rrET0zE2xdhK56N6YuJ4cATdR-aOHSabwHHUDA50,2718809
17
- qupled.libs/libgslcblas-cf1da87e.so.0.0.0,sha256=PAx-YFA8VXi4IZBK8FF4fwpbzOcjCWZAdroQEma-0b4,331041
18
- qupled-1.3.3.dist-info/METADATA,sha256=lImlk_1KfuyVUJd49pedwgsrkqiMs1GuQUBhCYhyBbw,4559
19
- qupled-1.3.3.dist-info/WHEEL,sha256=8jTxASeLvPr09PZ22DGSMQlRkrmgeqGaotjla49xWxo,114
20
- qupled-1.3.3.dist-info/top_level.txt,sha256=HLJfvnCPZQVptCRuekWA_3Z98SMkCNCXViGiGh8VenA,7
21
- qupled-1.3.3.dist-info/RECORD,,
22
- qupled-1.3.3.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
File without changes