qupled 1.3.2__cp313-cp313-macosx_14_0_arm64.whl → 1.3.4__cp313-cp313-macosx_14_0_arm64.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.
Files changed (41) hide show
  1. qupled/.dylibs/libSQLiteCpp.0.dylib +0 -0
  2. qupled/.dylibs/{libsqlite3.3.50.1.dylib → libsqlite3.3.50.2.dylib} +0 -0
  3. qupled/database.py +66 -28
  4. qupled/esa.py +11 -5
  5. qupled/hf.py +134 -73
  6. qupled/include/fmt/args.h +235 -0
  7. qupled/include/fmt/chrono.h +2240 -0
  8. qupled/include/fmt/color.h +643 -0
  9. qupled/include/fmt/compile.h +535 -0
  10. qupled/include/fmt/core.h +2969 -0
  11. qupled/include/fmt/format-inl.h +1678 -0
  12. qupled/include/fmt/format.h +4535 -0
  13. qupled/include/fmt/os.h +455 -0
  14. qupled/include/fmt/ostream.h +245 -0
  15. qupled/include/fmt/printf.h +675 -0
  16. qupled/include/fmt/ranges.h +738 -0
  17. qupled/include/fmt/std.h +537 -0
  18. qupled/include/fmt/xchar.h +259 -0
  19. qupled/lib/cmake/fmt/fmt-config-version.cmake +43 -0
  20. qupled/lib/cmake/fmt/fmt-config.cmake +31 -0
  21. qupled/lib/cmake/fmt/fmt-targets-release.cmake +19 -0
  22. qupled/lib/cmake/fmt/fmt-targets.cmake +116 -0
  23. qupled/lib/libfmt.a +0 -0
  24. qupled/lib/pkgconfig/fmt.pc +11 -0
  25. qupled/mpi.py +104 -69
  26. qupled/native.cpython-313-darwin.so +0 -0
  27. qupled/qstls.py +13 -10
  28. qupled/qstlsiet.py +13 -10
  29. qupled/qvsstls.py +13 -11
  30. qupled/rpa.py +11 -7
  31. qupled/serialize.py +43 -0
  32. qupled/stls.py +29 -26
  33. qupled/stlsiet.py +34 -25
  34. qupled/timer.py +33 -0
  35. qupled/vsstls.py +44 -42
  36. {qupled-1.3.2.dist-info → qupled-1.3.4.dist-info}/METADATA +1 -1
  37. qupled-1.3.4.dist-info/RECORD +45 -0
  38. qupled-1.3.2.dist-info/RECORD +0 -24
  39. {qupled-1.3.2.dist-info → qupled-1.3.4.dist-info}/WHEEL +0 -0
  40. {qupled-1.3.2.dist-info → qupled-1.3.4.dist-info}/licenses/LICENSE +0 -0
  41. {qupled-1.3.2.dist-info → qupled-1.3.4.dist-info}/top_level.txt +0 -0
qupled/qstls.py CHANGED
@@ -2,20 +2,22 @@ from __future__ import annotations
2
2
 
3
3
  from . import database
4
4
  from . import native
5
+ from . import serialize
5
6
  from . import stls
6
7
 
7
8
 
8
- class Qstls(stls.Stls):
9
+ class Solver(stls.Solver):
9
10
  """
10
11
  Class used to solve the Qstls scheme.
11
12
  """
12
13
 
14
+ # Native classes used to solve the scheme
15
+ native_scheme_cls = native.Qstls
16
+ native_inputs_cls = native.QstlsInput
17
+
13
18
  def __init__(self):
14
19
  super().__init__()
15
20
  self.results: stls.Result = stls.Result()
16
- # Undocumented properties
17
- self.native_scheme_cls = native.Qstls
18
- self.native_inputs_cls = native.QstlsInput
19
21
 
20
22
  def compute(self, inputs: Input):
21
23
  self.find_fixed_adr_in_database(inputs)
@@ -55,14 +57,15 @@ class Qstls(stls.Stls):
55
57
  return
56
58
 
57
59
 
58
- # Input class
60
+ @serialize.serializable_dataclass
59
61
  class Input(stls.Input):
60
62
  """
61
63
  Class used to manage the input for the :obj:`qupled.qstls.Qstls` class.
62
64
  """
63
65
 
64
- def __init__(self, coupling: float, degeneracy: float):
65
- super().__init__(coupling, degeneracy)
66
- # Undocumented default values
67
- self.fixed_run_id: int | None = None
68
- self.theory = "QSTLS"
66
+ fixed_run_id: int | None = None
67
+ theory: str = "QSTLS"
68
+
69
+
70
+ if __name__ == "__main__":
71
+ Solver.run_mpi_worker(Input, stls.Result)
qupled/qstlsiet.py CHANGED
@@ -2,36 +2,39 @@ from __future__ import annotations
2
2
 
3
3
  from . import native
4
4
  from . import qstls
5
+ from . import serialize
5
6
  from . import stlsiet
6
7
 
7
8
 
8
- class QstlsIet(qstls.Qstls):
9
+ class Solver(qstls.Solver):
9
10
  """
10
11
  Class used to solve the Qstls-IET schemes.
11
12
  """
12
13
 
14
+ # Native classes used to solve the scheme
15
+ native_scheme_cls = native.QstlsIet
16
+ native_inputs_cls = native.QstlsIetInput
17
+
13
18
  def __init__(self):
14
19
  super().__init__()
15
20
  self.results: stlsiet.Result = stlsiet.Result()
16
- self.native_scheme_cls = native.QstlsIet
17
- self.native_inputs_cls = native.QstlsIetInput
18
21
 
19
22
  @staticmethod
20
23
  def get_initial_guess(
21
24
  run_id: str, database_name: str | None = None
22
25
  ) -> stlsiet.Guess:
23
- return stlsiet.StlsIet.get_initial_guess(run_id, database_name)
26
+ return stlsiet.Solver.get_initial_guess(run_id, database_name)
24
27
 
25
28
 
26
- # Input class
29
+ @serialize.serializable_dataclass
27
30
  class Input(stlsiet.Input, qstls.Input):
28
31
  """
29
32
  Class used to manage the input for the :obj:`qupled.qstlsiet.QStlsIet` class.
30
33
  Accepted theories: ``QSTLS-HNC``, ``QSTLS-IOI`` and ``QSTLS-LCT``.
31
34
  """
32
35
 
33
- def __init__(self, coupling: float, degeneracy: float, theory: str):
34
- super().__init__(coupling, degeneracy, "STLS-HNC")
35
- if theory not in {"QSTLS-HNC", "QSTLS-IOI", "QSTLS-LCT"}:
36
- raise ValueError("Invalid dielectric theory")
37
- self.theory = theory
36
+ allowed_theories = {"QSTLS-HNC", "QSTLS-IOI", "QSTLS-LCT"}
37
+
38
+
39
+ if __name__ == "__main__":
40
+ Solver.run_mpi_worker(Input, stlsiet.Result)
qupled/qvsstls.py CHANGED
@@ -3,19 +3,21 @@ from __future__ import annotations
3
3
  from . import native
4
4
  from . import qstls
5
5
  from . import vsstls
6
+ from . import serialize
6
7
 
7
8
 
8
- class QVSStls(vsstls.VSStls):
9
+ class Solver(vsstls.Solver):
9
10
  """
10
11
  Class used to solve the QVStls scheme.
11
12
  """
12
13
 
14
+ # Native classes used to solve the scheme
15
+ native_scheme_cls = native.QVSStls
16
+ native_inputs_cls = native.QVSStlsInput
17
+
13
18
  def __init__(self):
14
19
  super().__init__()
15
20
  self.results: vsstls.Result = vsstls.Result()
16
- # Undocumented properties
17
- self.native_scheme_cls = native.QVSStls
18
- self.native_inputs_cls = native.QVSStlsInput
19
21
 
20
22
  def compute(self, inputs: Input):
21
23
  """
@@ -24,7 +26,7 @@ class QVSStls(vsstls.VSStls):
24
26
  Args:
25
27
  inputs: Input parameters.
26
28
  """
27
- qstls.Qstls.find_fixed_adr_in_database(self, inputs)
29
+ qstls.Solver.find_fixed_adr_in_database(self, inputs)
28
30
  super().compute(inputs)
29
31
 
30
32
  def _update_input_data(self, inputs: Input):
@@ -46,14 +48,14 @@ class QVSStls(vsstls.VSStls):
46
48
  inputs.fixed_run_id = self.run_id
47
49
 
48
50
 
49
- # Input class
51
+ @serialize.serializable_dataclass
50
52
  class Input(vsstls.Input, qstls.Input):
51
53
  """
52
54
  Class used to manage the input for the :obj:`qupled.qvsstls.QVSStls` class.
53
55
  """
54
56
 
55
- def __init__(self, coupling: float, degeneracy: float):
56
- vsstls.Input.__init__(self, coupling, degeneracy)
57
- qstls.Input.__init__(self, coupling, degeneracy)
58
- # Undocumented default values
59
- self.theory: str = "QVSSTLS"
57
+ theory: str = "QVSSTLS"
58
+
59
+
60
+ if __name__ == "__main__":
61
+ Solver.run_mpi_worker(Input, vsstls.Result)
qupled/rpa.py CHANGED
@@ -2,26 +2,30 @@ from __future__ import annotations
2
2
 
3
3
  from . import hf
4
4
  from . import native
5
+ from . import serialize
5
6
 
6
7
 
7
- class Rpa(hf.HF):
8
+ class Solver(hf.Solver):
8
9
  """
9
10
  Class used to solve the RPA scheme.
10
11
  """
11
12
 
13
+ # Native classes used to solve the scheme
14
+ native_scheme_cls = native.Rpa
15
+
12
16
  def __init__(self):
13
17
  super().__init__()
14
18
  self.results: hf.Result = hf.Result()
15
- # Undocumented properties
16
- self.native_scheme_cls = native.Rpa
17
19
 
18
20
 
21
+ @serialize.serializable_dataclass
19
22
  class Input(hf.Input):
20
23
  """
21
24
  Class used to manage the input for the :obj:`qupled.rpa.Rpa` class.
22
25
  """
23
26
 
24
- def __init__(self, coupling: float, degeneracy: float):
25
- super().__init__(coupling, degeneracy)
26
- # Undocumented default values
27
- self.theory = "RPA"
27
+ theory: str = "RPA"
28
+
29
+
30
+ if __name__ == "__main__":
31
+ Solver.run_mpi_worker(Input, hf.Result)
qupled/serialize.py ADDED
@@ -0,0 +1,43 @@
1
+ import numpy as np
2
+
3
+ from dataclasses import dataclass
4
+ from typing import get_type_hints
5
+
6
+
7
+ def serializable_dataclass(cls):
8
+
9
+ cls = dataclass(cls)
10
+
11
+ def to_dict(self):
12
+ result = {}
13
+ for key, value in self.__dict__.items():
14
+ if hasattr(value, "to_dict") and callable(value.to_dict):
15
+ result[key] = value.to_dict()
16
+ elif isinstance(value, np.ndarray):
17
+ result[key] = value.tolist()
18
+ else:
19
+ result[key] = value
20
+ return result
21
+
22
+ @classmethod
23
+ def from_dict(cls, d):
24
+ obj = cls.__new__(cls)
25
+ annotations = get_type_hints(cls)
26
+ for key, value in d.items():
27
+ expected_type = annotations.get(key)
28
+ from_dict_fn = getattr(expected_type, "from_dict", None)
29
+ convert_to_np_array = expected_type is np.ndarray and isinstance(
30
+ value, list
31
+ )
32
+ call_from_dict = callable(from_dict_fn) and isinstance(value, dict)
33
+ if convert_to_np_array:
34
+ setattr(obj, key, np.array(value))
35
+ elif call_from_dict:
36
+ setattr(obj, key, from_dict_fn(value))
37
+ else:
38
+ setattr(obj, key, value)
39
+ return obj
40
+
41
+ cls.to_dict = to_dict
42
+ cls.from_dict = from_dict
43
+ return cls
qupled/stls.py CHANGED
@@ -1,24 +1,27 @@
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 hf
6
7
  from . import native
7
8
  from . import output
8
9
  from . import rpa
10
+ from . import serialize
9
11
 
10
12
 
11
- class Stls(rpa.Rpa):
13
+ class Solver(rpa.Solver):
12
14
  """
13
15
  Class used to solve the Stls scheme.
14
16
  """
15
17
 
18
+ # Native classes used to solve the scheme
19
+ native_scheme_cls = native.Stls
20
+ native_inputs_cls = native.StlsInput
21
+
16
22
  def __init__(self):
17
23
  super().__init__()
18
24
  self.results: Result = Result()
19
- # Undocumented properties
20
- self.native_scheme_cls = native.Stls
21
- self.native_inputs_cls = native.StlsInput
22
25
 
23
26
  @staticmethod
24
27
  def get_initial_guess(run_id: int, database_name: str | None = None) -> Guess:
@@ -37,43 +40,39 @@ class Stls(rpa.Rpa):
37
40
  return Guess(data[names[0]], data[names[1]])
38
41
 
39
42
 
43
+ @serialize.serializable_dataclass
40
44
  class Input(rpa.Input):
41
45
  """
42
46
  Class used to manage the input for the :obj:`qupled.stls.Stls` class.
43
47
  """
44
48
 
45
- def __init__(self, coupling: float, degeneracy: float):
46
- super().__init__(coupling, degeneracy)
47
- self.error: float = 1.0e-5
48
- """Minimum error for convergence. Default = ``1.0e-5``"""
49
- self.mixing: float = 1.0
50
- """Mixing parameter. Default = ``1.0``"""
51
- self.iterations: int = 1000
52
- """Maximum number of iterations. Default = ``1000``"""
53
- self.guess: Guess = Guess()
54
- """Initial guess. Default = ``stls.Guess()``"""
55
- # Undocumented default values
56
- self.theory: str = "STLS"
49
+ error: float = 1.0e-5
50
+ """Minimum error for convergence. Default = ``1.0e-5``"""
51
+ mixing: float = 1.0
52
+ """Mixing parameter. Default = ``1.0``"""
53
+ iterations: int = 1000
54
+ """Maximum number of iterations. Default = ``1000``"""
55
+ guess: Guess = field(default_factory=lambda: Guess())
56
+ """Initial guess. Default = ``stls.Guess()``"""
57
+ theory: str = "STLS"
57
58
 
58
59
 
60
+ @serialize.serializable_dataclass
59
61
  class Result(hf.Result):
60
62
  """
61
63
  Class used to store the results for the :obj:`qupled.stls.Stls` class.
62
64
  """
63
65
 
64
- def __init__(self):
65
- super().__init__()
66
- self.error: float = None
67
- """Residual error in the solution"""
66
+ error: float = None
67
+ """Final error of the scheme. Default = ``None``"""
68
68
 
69
69
 
70
+ @serialize.serializable_dataclass
70
71
  class Guess:
71
-
72
- def __init__(self, wvg: np.ndarray = None, ssf: np.ndarray = None):
73
- self.wvg = wvg
74
- """ Wave-vector grid. Default = ``None``"""
75
- self.ssf = ssf
76
- """ Static structure factor. Default = ``None``"""
72
+ wvg: np.ndarray = None
73
+ """Wave-vector grid. Default = ``None``"""
74
+ ssf: np.ndarray = None
75
+ """Static structure factor. Default = ``None``"""
77
76
 
78
77
  def to_native(self) -> native.Guess:
79
78
  """
@@ -92,3 +91,7 @@ class Guess:
92
91
  if value is not None:
93
92
  setattr(native_guess, attr, value)
94
93
  return native_guess
94
+
95
+
96
+ if __name__ == "__main__":
97
+ Solver.run_mpi_worker(Input, Result)
qupled/stlsiet.py CHANGED
@@ -1,22 +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
7
8
  from . import stls
9
+ from . import serialize
8
10
 
9
11
 
10
- class StlsIet(stls.Stls):
12
+ class Solver(stls.Solver):
11
13
  """
12
14
  Class used to solve the StlsIet schemes.
13
15
  """
14
16
 
17
+ # Native classes used to solve the scheme
18
+ native_scheme_cls = native.StlsIet
19
+ native_inputs_cls = native.StlsIetInput
20
+
15
21
  def __init__(self):
16
22
  super().__init__()
17
23
  self.results: Result = Result()
18
- self.native_scheme_cls = native.StlsIet
19
- self.native_inputs_cls = native.StlsIetInput
20
24
 
21
25
  @staticmethod
22
26
  def get_initial_guess(run_id: str, database_name: str | None = None) -> Guess:
@@ -42,19 +46,15 @@ class StlsIet(stls.Stls):
42
46
  )
43
47
 
44
48
 
49
+ @serialize.serializable_dataclass
45
50
  class Input(stls.Input):
46
51
  """
47
52
  Class used to manage the input for the :obj:`qupled.stlsiet.StlsIet` class.
48
53
  Accepted theories: ``STLS-HNC``, ``STLS-IOI`` and ``STLS-LCT``.
49
54
  """
50
55
 
51
- def __init__(self, coupling: float, degeneracy: float, theory: str):
52
- super().__init__(coupling, degeneracy)
53
- if theory not in {"STLS-HNC", "STLS-IOI", "STLS-LCT"}:
54
- raise ValueError("Invalid dielectric theory")
55
- self.theory = theory
56
- self.mapping = "standard"
57
- r"""
56
+ mapping: str = "standard"
57
+ r"""
58
58
  Mapping for the classical-to-quantum coupling parameter
59
59
  :math:`\Gamma` used in the iet schemes. Allowed options include:
60
60
 
@@ -69,29 +69,38 @@ class Input(stls.Input):
69
69
  the ground state they can differ significantly (the standard
70
70
  mapping diverges). Default = ``standard``.
71
71
  """
72
- self.guess: Guess = Guess()
73
- """Initial guess. Default = ``stlsiet.Guess()``"""
72
+ guess: Guess = field(default_factory=lambda: Guess())
73
+ allowed_theories = {"STLS-HNC", "STLS-IOI", "STLS-LCT"}
74
+
75
+ def __post_init__(self):
76
+ if self.is_default_theory():
77
+ raise ValueError(
78
+ f"Missing dielectric theory, choose among {self.allowed_theories} "
79
+ )
80
+ if self.theory not in self.allowed_theories:
81
+ raise ValueError(
82
+ f"Invalid dielectric theory {self.theory}, choose among {self.allowed_theories}"
83
+ )
84
+
85
+ def is_default_theory(self) -> bool:
86
+ return self.theory == Input.__dataclass_fields__["theory"].default
74
87
 
75
88
 
89
+ @serialize.serializable_dataclass
76
90
  class Result(stls.Result):
77
91
  """
78
92
  Class used to store the results for the :obj:`qupled.stlsiet.StlsIet` class.
79
93
  """
80
94
 
81
- def __init__(self):
82
- super().__init__()
83
- self.bf: np.ndarray = None
84
- """Bridge function adder"""
95
+ bf: np.ndarray = None
96
+ """Bridge function adder"""
85
97
 
86
98
 
99
+ @serialize.serializable_dataclass
87
100
  class Guess(stls.Guess):
101
+ lfc: np.ndarray = None
102
+ """ Local field correction. Default = ``None``"""
103
+
88
104
 
89
- def __init__(
90
- self,
91
- wvg: np.ndarray = None,
92
- ssf: np.ndarray = None,
93
- lfc: np.ndarray = None,
94
- ):
95
- super().__init__(wvg, ssf)
96
- self.lfc = lfc
97
- """ Local field correction. Default = ``None``"""
105
+ if __name__ == "__main__":
106
+ Solver.run_mpi_worker(Input, Result)
qupled/timer.py ADDED
@@ -0,0 +1,33 @@
1
+ import time
2
+
3
+
4
+ def timer(func):
5
+ """
6
+ A decorator that measures and prints the execution time of the decorated function.
7
+
8
+ The elapsed time is displayed in hours, minutes, and seconds as appropriate.
9
+
10
+ Args:
11
+ func (callable): The function whose execution time is to be measured.
12
+
13
+ Returns:
14
+ callable: A wrapper function that executes the original function and prints the elapsed time.
15
+ """
16
+
17
+ def wrapper(*args, **kwargs):
18
+ tic = time.perf_counter()
19
+ result = func(*args, **kwargs)
20
+ toc = time.perf_counter()
21
+ dt = toc - tic
22
+ hours = int(dt // 3600)
23
+ minutes = int((dt % 3600) // 60)
24
+ seconds = dt % 60
25
+ if hours > 0:
26
+ print(f"Elapsed time: {hours} h, {minutes} m, {seconds:.1f} s.")
27
+ elif minutes > 0:
28
+ print(f"Elapsed time: {minutes} m, {seconds:.1f} s.")
29
+ else:
30
+ print(f"Elapsed time: {seconds:.1f} s.")
31
+ return result
32
+
33
+ return wrapper
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.2
3
+ Version: 1.3.4
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,45 @@
1
+ qupled-1.3.4.dist-info/RECORD,,
2
+ qupled-1.3.4.dist-info/WHEEL,sha256=ZQJAUvKl3_G657Vy_VrVH7Krx2Keg1PVu64bdERsotU,136
3
+ qupled-1.3.4.dist-info/top_level.txt,sha256=HLJfvnCPZQVptCRuekWA_3Z98SMkCNCXViGiGh8VenA,7
4
+ qupled-1.3.4.dist-info/METADATA,sha256=d75nW7MqQlfhF7evEanAi4GrVI2YqjjOdhmh241ptxA,4559
5
+ qupled-1.3.4.dist-info/licenses/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
6
+ qupled/qstls.py,sha256=G2A5e_PUP1lsUaKEajrH3ZuY2lD5wxmsyYi8n7IN6nQ,2424
7
+ qupled/serialize.py,sha256=uNGQnAE2ABQnWSV-yjtEecByaaW1OzQ7I_Hp7g6z-_0,1325
8
+ qupled/rpa.py,sha256=5QwdMpqEj8WIR3Ncu605XzNr2Cw3afpqrK3OXSkgCPs,606
9
+ qupled/timer.py,sha256=q1X9mpvSaq2NxFk6P22ceclTSd2tkdofF1lPdENLuJ8,985
10
+ qupled/database.py,sha256=soPmbMpIYS7oELwOKU-W61LtwxLwu5xvwOFTb7LXzdI,26636
11
+ qupled/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
12
+ qupled/stlsiet.py,sha256=4zJMMhz1lmqcAGVz2OqwDKZa00jD1wJ5TXnW7siFKbs,3254
13
+ qupled/native.cpython-313-darwin.so,sha256=E1vlGpL0bc6DvApY4_tYJoq1ST8-9FDgbOmv2wgWKLQ,748880
14
+ qupled/qstlsiet.py,sha256=UInCZT6jpTot8TQ6arpgqNMIg_KetCf3NL1r5xwxZhw,1039
15
+ qupled/esa.py,sha256=5LpHu4zdIe2p9DBnpYAqdW7KDeL75tPmsEbM3C5_nMA,684
16
+ qupled/mpi.py,sha256=fvFQr0fuQaIOo9si7-AGgctTPxpDvqo1RcsnBkNN4Cc,2998
17
+ qupled/stls.py,sha256=pxsqQG2yI_I59kCf8QdUbrSat53gX63u-sgFLPzAflQ,2878
18
+ qupled/vsstls.py,sha256=E07rQGF8HReVioWIw54vitm5lYP_hbEOi2MhoQC4aKk,7607
19
+ qupled/qvsstls.py,sha256=ygJilrCV6d6byYerPhkDCccapDlqaBqu9k5O_lg8BB0,1642
20
+ qupled/output.py,sha256=VP_7oKPuULYa0UB-wX_J_cLnGd2mZZxrYeeTpNY-iwE,3602
21
+ qupled/hf.py,sha256=NYjLdeMpXHpNUuuECVGnMHlZGMi8fNESPtrrL2eHXOo,12157
22
+ qupled/include/fmt/ostream.h,sha256=-DnzYoGzasnlFOTG2UT29mmaIQG7NunUgJqt5L0l_2E,7305
23
+ qupled/include/fmt/format-inl.h,sha256=w5DfUohEgLEx3_0XhCrz3ejq5s1_Gq_aMLY--jadbmE,73646
24
+ qupled/include/fmt/ranges.h,sha256=h6mRGvU1Jz6fm-0A1towg7ce7DSRyaVAEyWKiCNCtvM,24446
25
+ qupled/include/fmt/xchar.h,sha256=57OfmYZ5IUZ2BZZxuQhdKrJUljSsDkn4_5QCiho-adw,9962
26
+ qupled/include/fmt/core.h,sha256=FD1ZHfY9tbIHhuuMp1YBLgt-LG2rfwAkiOLHAeiXqR8,99931
27
+ qupled/include/fmt/chrono.h,sha256=o41sAvZOKvNoQ2mtTfariL4gOg1L379R_eVC-DVG6sk,74011
28
+ qupled/include/fmt/os.h,sha256=ibepg2W5ASfhHV6EwvpYRDCIFk7JyZziYu0wOnwZfu0,13291
29
+ qupled/include/fmt/color.h,sha256=AUydrMUh-cN2hGj0anFUXRDaHzxKi4JrhZa4oDWIp3o,24531
30
+ qupled/include/fmt/args.h,sha256=QYtkXpAiJ3pYWIQcB6PGUjcFPUUxGowJlXOsUXtD0cI,7458
31
+ qupled/include/fmt/printf.h,sha256=0SHCtbSPaN45bKOsX6MrfH3XfdjY6WhOhgSoh1bmgOU,20837
32
+ qupled/include/fmt/compile.h,sha256=aapCl7QvJzu_rPXJ7r5Laia1UtBvt0zRUcRyYMN7aFA,18974
33
+ qupled/include/fmt/format.h,sha256=Y71aNNE5v8oXJ7-6-UGvu1dRyHGtqqkbd9zlinByMHM,164588
34
+ qupled/include/fmt/std.h,sha256=BkZ7QF9AKR9A8mxuRsFddWJUWBw5dBOnfAKyt9Yty0E,16239
35
+ qupled/.dylibs/libgsl.28.dylib,sha256=rcTB771UsiEC1W_E5mVMYKo6G91p0OD5GaUssM8gfk8,2241424
36
+ qupled/.dylibs/libomp.dylib,sha256=Ic_m8yVNxvjHQ-51C9MX9Bzl0wJAEsBdkx4V0_P_z7Y,735616
37
+ qupled/.dylibs/libsqlite3.3.50.2.dylib,sha256=Ae6aDP7MmVuBJwO7tcSfvaycvjWi5Dn4Xapjnw_bgzI,1241152
38
+ qupled/.dylibs/libgslcblas.0.dylib,sha256=3ATUzchJ3MFYqtB5KC07P7gu8g-GTlQ62fUwbNrZqMY,239760
39
+ qupled/.dylibs/libSQLiteCpp.0.dylib,sha256=neCBZ7UIgUr36H01mQ4E-eW8rgtddKk1q6NQRD0QYvc,94368
40
+ qupled/lib/libfmt.a,sha256=dzFG_ncHRFujJn7z5JfVOviFq8fkTWISRrvuxA77PaI,214704
41
+ qupled/lib/pkgconfig/fmt.pc,sha256=oIUJk5rSV9wH2-UZA7sI6iHKKEDfCJcv8T6awxvCr4o,351
42
+ qupled/lib/cmake/fmt/fmt-targets-release.cmake,sha256=0hurnnAYtVc8r8yvaxkXAS5Op01RPnwKE6SFNOL1nYA,807
43
+ qupled/lib/cmake/fmt/fmt-config.cmake,sha256=Cd-Xn_HSZ-Lk5ZBDX8q49OQKSvnS0_k4r0-tb6G8LW4,999
44
+ qupled/lib/cmake/fmt/fmt-config-version.cmake,sha256=O6qhq-qInAAjYQ6y2xLwA_dJQ1CQDmj9zJYcmxuY6dU,1862
45
+ qupled/lib/cmake/fmt/fmt-targets.cmake,sha256=rRXShlK4V1JpSsyAg0wbt1HHWe1pap-HtHlniem2l0I,4464