aton 0.3.0__tar.gz → 0.3.2__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 (52) hide show
  1. {aton-0.3.0 → aton-0.3.2}/LICENSE +0 -0
  2. {aton-0.3.0 → aton-0.3.2}/PKG-INFO +3 -3
  3. {aton-0.3.0 → aton-0.3.2}/README.md +0 -0
  4. {aton-0.3.0 → aton-0.3.2}/aton/__init__.py +0 -0
  5. {aton-0.3.0 → aton-0.3.2}/aton/_version.py +1 -1
  6. {aton-0.3.0 → aton-0.3.2}/aton/interface/castep.py +0 -0
  7. {aton-0.3.0 → aton-0.3.2}/aton/interface/phonopy.py +0 -0
  8. {aton-0.3.0 → aton-0.3.2}/aton/interface/qe.py +0 -0
  9. {aton-0.3.0 → aton-0.3.2}/aton/interface/slurm.py +0 -0
  10. {aton-0.3.0 → aton-0.3.2}/aton/phys/__init__.py +8 -7
  11. {aton-0.3.0 → aton-0.3.2}/aton/phys/units.py +4 -2
  12. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/__init__.py +7 -3
  13. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/constants.py +2 -2
  14. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/plot.py +0 -0
  15. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/potential.py +8 -7
  16. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/rotate.py +0 -0
  17. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/solve.py +3 -2
  18. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/system.py +0 -0
  19. {aton-0.3.0 → aton-0.3.2}/aton/qrotor/systems.py +2 -2
  20. {aton-0.3.0 → aton-0.3.2}/aton/spx/__init__.py +0 -0
  21. {aton-0.3.0 → aton-0.3.2}/aton/spx/classes.py +0 -0
  22. {aton-0.3.0 → aton-0.3.2}/aton/spx/deuterium.py +1 -1
  23. {aton-0.3.0 → aton-0.3.2}/aton/spx/fit.py +0 -0
  24. {aton-0.3.0 → aton-0.3.2}/aton/spx/normalize.py +0 -0
  25. {aton-0.3.0 → aton-0.3.2}/aton/spx/plot.py +0 -0
  26. {aton-0.3.0 → aton-0.3.2}/aton/spx/samples.py +0 -0
  27. {aton-0.3.0 → aton-0.3.2}/aton/st/__init__.py +0 -0
  28. {aton-0.3.0 → aton-0.3.2}/aton/st/alias.py +0 -0
  29. {aton-0.3.0 → aton-0.3.2}/aton/st/call.py +0 -0
  30. {aton-0.3.0 → aton-0.3.2}/aton/st/file.py +0 -0
  31. {aton-0.3.0 → aton-0.3.2}/aton/txt/edit.py +0 -0
  32. {aton-0.3.0 → aton-0.3.2}/aton/txt/extract.py +0 -0
  33. {aton-0.3.0 → aton-0.3.2}/aton/txt/find.py +0 -0
  34. {aton-0.3.0 → aton-0.3.2}/aton.egg-info/PKG-INFO +3 -3
  35. {aton-0.3.0 → aton-0.3.2}/aton.egg-info/requires.txt +2 -2
  36. {aton-0.3.0 → aton-0.3.2}/setup.py +1 -1
  37. {aton-0.3.0 → aton-0.3.2}/tests/__init__.py +0 -0
  38. {aton-0.3.0 → aton-0.3.2}/tests/test_edit.py +0 -0
  39. {aton-0.3.0 → aton-0.3.2}/tests/test_extract.py +0 -0
  40. {aton-0.3.0 → aton-0.3.2}/tests/test_file.py +0 -0
  41. {aton-0.3.0 → aton-0.3.2}/tests/test_find.py +0 -0
  42. {aton-0.3.0 → aton-0.3.2}/tests/test_qe.py +0 -0
  43. {aton-0.3.0 → aton-0.3.2}/tests/test_qrotor.py +0 -0
  44. {aton-0.3.0 → aton-0.3.2}/tests/test_spx.py +0 -0
  45. {aton-0.3.0 → aton-0.3.2}/aton/interface/__init__.py +0 -0
  46. {aton-0.3.0 → aton-0.3.2}/aton/phys/atoms.py +0 -0
  47. {aton-0.3.0 → aton-0.3.2}/aton/phys/functions.py +0 -0
  48. {aton-0.3.0 → aton-0.3.2}/aton/txt/__init__.py +0 -0
  49. {aton-0.3.0 → aton-0.3.2}/aton.egg-info/SOURCES.txt +0 -0
  50. {aton-0.3.0 → aton-0.3.2}/aton.egg-info/dependency_links.txt +0 -0
  51. {aton-0.3.0 → aton-0.3.2}/aton.egg-info/top_level.txt +0 -0
  52. {aton-0.3.0 → aton-0.3.2}/setup.cfg +0 -0
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: aton
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: The Ab-iniTiO & Neutron research toolbox, or ATON, provides powerful and comprehensive tools for cutting-edge materials research, focused on (but not limited to) neutron science.
5
5
  Author: Pablo Gila-Herranz
6
6
  Author-email: pgila001@ikasle.ehu.eus
@@ -16,9 +16,9 @@ Classifier: Operating System :: Other OS
16
16
  Requires-Python: >=3
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: numpy
19
+ Requires-Dist: scipy>=1.15.2
20
20
  Requires-Dist: pandas
21
- Requires-Dist: scipy
21
+ Requires-Dist: numpy
22
22
  Requires-Dist: matplotlib
23
23
  Dynamic: author
24
24
  Dynamic: author-email
File without changes
File without changes
@@ -10,5 +10,5 @@ https://semver.org/
10
10
 
11
11
  """
12
12
 
13
- __version__ = 'v0.3.0'
13
+ __version__ = 'v0.3.2'
14
14
 
File without changes
File without changes
File without changes
File without changes
@@ -38,22 +38,23 @@ See the API reference of the specific modules for more information.
38
38
  Constant values come from the [2022 CODATA](https://doi.org/10.48550/arXiv.2409.03787) Recommended Values of the Fundamental Physical Constants.
39
39
 
40
40
  Conversion factors for neutron scattering come from
41
- [M. Bée, "Quasielastic Neutron scattering", Adam Hilger, Bristol and Philadelphia, 1988](https://www.ncnr.nist.gov/instruments/dcs/dcs_usersguide/Conversion_Factors.pdf).
41
+ [David L. Price and Felix Fernandez-Alonso, *Neutron Scattering Fundamentals*, Experimental methods in the physical sciences, Elsevier Academic Press (2013)](https://doi.org/10.1016/B978-0-12-398374-9.00001-2),
42
+ and from
43
+ [M. Bée, "Quasielastic Neutron scattering", Adam Hilger, Bristol and Philadelphia (1988)](https://www.ncnr.nist.gov/instruments/dcs/dcs_usersguide/Conversion_Factors.pdf);
42
44
 
43
45
 
44
46
  ## `aton.phys.atoms`
45
47
 
46
48
  Atomic `mass` are in atomic mass units (amu), and come from:
47
- Pure Appl. Chem., Vol. 78, No. 11, pp. 2051-2066, 2006.
49
+ [M. E. Wieser, *Atomic weights of the elements 2005*, Pure and Applied Chemistry 78, 20512066 (2006)](https://doi.org/10.1351/pac200678112051).
48
50
  The following masses are obtained from Wikipedia:
49
51
  Ac: 227, Np: 237, Pm: 145, Tc: 98.
50
52
 
51
- Isotope `mass`, `mass_number` and `abundance` come from:
52
- J. R. de Laeter, J. K. Böhlke, P. De Bièvre, H. Hidaka, H. S. Peiser, K. J. R. Rosman
53
- and P. D. P. Taylor (2003). *"Atomic weights of the elements. Review 2000 (IUPAC Technical Report)"*.
53
+ Isotope `mass`, `mass_number` and `abundance` come from
54
+ [J. R. de Laeter *et al*., *Atomic weights of the elements 2000*, Pure and Applied Chemistry 75, 683–800 (2003)](https://doi.org/10.1351/pac200375060683).
54
55
 
55
- Total bound scattering `cross_sections` $\\sigma_s$ are in barns (1 b = 100 fm$^2$).
56
- From Felix Fernandez-Alonso, *"Neutron Scattering Fundamentals"*, 2013.
56
+ Total bound scattering `cross_sections` $\\sigma_s$ are in barns (1 b = 100 fm$^2$ = 10e-28 m$^2$). From
57
+ [David L. Price and Felix Fernandez-Alonso, *Neutron Scattering Fundamentals*, Experimental methods in the physical sciences, Elsevier Academic Press (2013)](https://doi.org/10.1016/B978-0-12-398374-9.00001-2).
57
58
 
58
59
  """
59
60
 
@@ -5,8 +5,10 @@ This module contains the constants from the
5
5
  [2022 CODATA](https://doi.org/10.48550/arXiv.2409.03787)
6
6
  Recommended Values of the Fundamental Physical Constants.
7
7
 
8
- It also contains useful conversion factors for neutron scattering,
9
- from [M. Bée, "Quasielastic Neutron scattering", Adam Hilger, Bristol and Philadelphia, 1988](https://www.ncnr.nist.gov/instruments/dcs/dcs_usersguide/Conversion_Factors.pdf).
8
+ It also contains useful conversion factors for neutron scattering, from
9
+ [David L. Price and Felix Fernandez-Alonso, *Neutron Scattering Fundamentals*, Experimental methods in the physical sciences, Elsevier Academic Press (2013)](https://doi.org/10.1016/B978-0-12-398374-9.00001-2),
10
+ and from
11
+ [M. Bée, "Quasielastic Neutron scattering", Adam Hilger, Bristol and Philadelphia (1988)](https://www.ncnr.nist.gov/instruments/dcs/dcs_usersguide/Conversion_Factors.pdf);
10
12
 
11
13
 
12
14
  # Index
@@ -97,9 +97,8 @@ qr.plot.energies(system)
97
97
 
98
98
  ## Tunnel splittings and excitations
99
99
 
100
- When the quantum System is solved, tunnel splittings,
101
- excitations and energy level degeneracy
102
- below the potential maximum are also calculated:
100
+ Tunnel splittings, excitations and energy level degeneracy
101
+ below the potential maximum are also calculated upon solving the system:
103
102
 
104
103
  ```python
105
104
  system.solve()
@@ -108,6 +107,11 @@ system.excitations
108
107
  system.deg
109
108
  ```
110
109
 
110
+ An integer `System.deg` degeneracy (e.g. 3 for methyls)
111
+ indicates that the energy levels have been properly estimated.
112
+ However, if the degeneracy is a float instead,
113
+ please check the splittings and excitations manually from the system eigenvalues.
114
+
111
115
  To export the energies and the tunnel splittings of several calculations to a CSV file:
112
116
 
113
117
  ```python
@@ -3,8 +3,8 @@
3
3
 
4
4
  Common constants and default inertia values used in the QRotor subpackage.
5
5
 
6
- Bond lengths and angles were obtained from MAPbI3,
7
- see [*Cryst. Growth Des.* 2024, 24, 391404](https://doi.org/10.1021/acs.cgd.3c01112).
6
+ Bond lengths and angles were obtained from MAPbI3, see
7
+ [K. Drużbicki *et al*., Crystal Growth & Design 24, 391404 (2024)](https://doi.org/10.1021/acs.cgd.3c01112).
8
8
 
9
9
  ---
10
10
  """
File without changes
@@ -44,7 +44,8 @@ from aton._version import __version__
44
44
 
45
45
  def save(
46
46
  system:System,
47
- filepath:str='potential.dat',
47
+ comment:str='',
48
+ filepath:str='potential.csv',
48
49
  angle:str='deg',
49
50
  energy:str='meV',
50
51
  ) -> None:
@@ -65,7 +66,7 @@ def save(
65
66
  print("Aborted.")
66
67
  return None
67
68
  # Set header
68
- potential_data = f'# {system.comment}\n' if system.comment else ''
69
+ potential_data = f'# {comment}\n' if comment else f'# {system.comment}\n' if system.comment else ''
69
70
  potential_data += '# Rotational potential dataset\n'
70
71
  potential_data += f'# Saved with ATON {__version__}\n'
71
72
  potential_data += '# https://pablogila.github.io/ATON\n'
@@ -77,10 +78,10 @@ def save(
77
78
  potential_values = system.potential_values
78
79
  # Convert angle units
79
80
  if angle.lower() in alias.units['rad']:
80
- potential_data += '# Angle/rad '
81
+ potential_data += '# Angle/rad, '
81
82
  else:
82
83
  grid = np.degrees(grid)
83
- potential_data += '# Angle/deg '
84
+ potential_data += '# Angle/deg, '
84
85
  if not angle.lower() in alias.units['deg']:
85
86
  print(f"WARNING: Unrecognised '{angle}' angle units, using degrees instead")
86
87
  # Convert energy units
@@ -110,7 +111,7 @@ def save(
110
111
 
111
112
 
112
113
  def load(
113
- filepath:str='potential.dat',
114
+ filepath:str='potential.csv',
114
115
  comment:str=None,
115
116
  system:System=None,
116
117
  angle:str='deg',
@@ -136,7 +137,7 @@ def load(
136
137
  if line.startswith('#'):
137
138
  continue
138
139
  position, potential = line.split()
139
- positions.append(float(position.strip()))
140
+ positions.append(float(position.strip().strip(',').strip()))
140
141
  potentials.append(float(potential.strip()))
141
142
  # Save angles to numpy arrays
142
143
  if angle.lower() in alias.units['deg']:
@@ -166,7 +167,7 @@ def load(
166
167
 
167
168
  def from_qe(
168
169
  folder=None,
169
- filepath:str='potential.dat',
170
+ filepath:str='potential.csv',
170
171
  include:list=['.out'],
171
172
  exclude:list=['slurm-'],
172
173
  energy:str='meV',
File without changes
@@ -114,8 +114,9 @@ def hamiltonian_matrix(system:System):
114
114
  def laplacian_matrix(grid):
115
115
  """Calculates the Laplacian (second derivative) matrix for a given `grid`."""
116
116
  x = grid
117
- diagonals = [-2*np.ones(len(x)), np.ones(len(x)), np.ones(len(x))]
118
- laplacian_matrix = sparse.spdiags(diagonals, [0, -1, 1], format='lil')
117
+ n = len(x)
118
+ diagonals = [-2*np.ones(n), np.ones(n), np.ones(n)]
119
+ laplacian_matrix = sparse.spdiags(diagonals, [0, -1, 1], m=n, n=n, format='lil')
119
120
  # Periodic boundary conditions
120
121
  laplacian_matrix[0, -1] = 1
121
122
  laplacian_matrix[-1, 0] = 1
File without changes
@@ -92,9 +92,9 @@ def save_energies(
92
92
  def save_splittings(
93
93
  systems:list,
94
94
  comment:str='',
95
- filepath:str='tunnel_splittings.csv',
95
+ filepath:str='splittings.csv',
96
96
  ) -> pd.DataFrame:
97
- """Save the tunnel splitting energies for all `systems` to a tunnel_splittings.csv file.
97
+ """Save the tunnel splitting energies for all `systems` to a splittings.csv file.
98
98
 
99
99
  Returns a Pandas Dataset with `System.comment` columns and `System.splittings` values.
100
100
 
File without changes
File without changes
@@ -32,7 +32,7 @@ def impulse_approx(
32
32
  ) -> tuple:
33
33
  """Calculate the deuteration levels from INS spectra
34
34
  with the *Impulse Approximation*, see
35
- https://www.tandfonline.com/doi/full/10.1080/00018732.2017.1317963.
35
+ [Andreani et al., Advances in Physics 66, 1–73 (2017)](https://www.tandfonline.com/doi/full/10.1080/00018732.2017.1317963).
36
36
 
37
37
  Protonated and deuterated materials must be specified
38
38
  as `aton.spectra.classes.Material` objects.
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: aton
3
- Version: 0.3.0
3
+ Version: 0.3.2
4
4
  Summary: The Ab-iniTiO & Neutron research toolbox, or ATON, provides powerful and comprehensive tools for cutting-edge materials research, focused on (but not limited to) neutron science.
5
5
  Author: Pablo Gila-Herranz
6
6
  Author-email: pgila001@ikasle.ehu.eus
@@ -16,9 +16,9 @@ Classifier: Operating System :: Other OS
16
16
  Requires-Python: >=3
17
17
  Description-Content-Type: text/markdown
18
18
  License-File: LICENSE
19
- Requires-Dist: numpy
19
+ Requires-Dist: scipy>=1.15.2
20
20
  Requires-Dist: pandas
21
- Requires-Dist: scipy
21
+ Requires-Dist: numpy
22
22
  Requires-Dist: matplotlib
23
23
  Dynamic: author
24
24
  Dynamic: author-email
@@ -1,4 +1,4 @@
1
- numpy
1
+ scipy>=1.15.2
2
2
  pandas
3
- scipy
3
+ numpy
4
4
  matplotlib
@@ -16,7 +16,7 @@ setup(
16
16
  long_description = LONG_DESCRIPTION,
17
17
  long_description_content_type = 'text/markdown',
18
18
  packages = find_packages(),
19
- install_requires = ['numpy', 'pandas', 'scipy', 'matplotlib'],
19
+ install_requires = ['scipy>=1.15.2', 'pandas', 'numpy', 'matplotlib'],
20
20
  extras_requires = {
21
21
  'dev': ['pytest', 'twine', 'build']
22
22
  },
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes