-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
28 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,21 @@ | ||
import aton.qrotor as qr | ||
|
||
system = qr.QSys() | ||
system.potential_name = 'zero' | ||
system.B = 1 | ||
system.E_levels = 10 | ||
system.gridsize = 200000 | ||
|
||
experiment = qr.solve.energies(system) | ||
print('Eigenvalues:') | ||
print(experiment.systems[0].eigenvalues) | ||
# Testing convergence for a specific energy level | ||
E_level = 5 | ||
gridsize = 200000 | ||
|
||
print('Rounded eigenvalues:') | ||
precision = 4 | ||
for value in experiment.systems[0].eigenvalues: | ||
print(round(value, precision)) | ||
# Definition of the quantum system for a zero potential | ||
system = qr.System() | ||
system.potential_name = 'zero' | ||
system.B = 1 # Rotational inertia | ||
system.E_levels = 10 # Number of energy levels to calculate | ||
system.gridsize = gridsize | ||
# Solve the system eigenvalues | ||
system = qr.solve.energies(system) | ||
print(f'Eigenvalues: {system.eigenvalues}') | ||
# Compare the calculated and ideal energies | ||
ideal_E = system.get_ideal_E(E_level) | ||
real_E = system.eigenvalues[E_level] | ||
deviation = abs(ideal_E - real_E) | ||
print(f'Deviation from ideal energy for the eigenvalue #{E_level} with a grid of size {gridsize}: {deviation} meV') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,21 @@ | ||
import aton.qrotor as qr | ||
|
||
system = qr.QSys() | ||
# Reproducing eigenvalues from: | ||
# K. Titov et al., Phys. Rev. Mater. 7, 073402 (2023) | ||
# https://link.aps.org/doi/10.1103/PhysRevMaterials.7.073402 | ||
|
||
system = qr.System() | ||
system.potential_name = 'titov2023' | ||
system.B = 0.573 # qr.B_CH3 | ||
system.E_levels = 10 | ||
system.B = 0.573 # Titov uses a custom B value, a more accurate one is qr.B_CH3 | ||
system.E_levels = 5 | ||
system.gridsize = 200000 | ||
|
||
experiment = qr.solve.energies(system) | ||
experiment.comment = 'titov2023' | ||
system = qr.solve.energies(system) | ||
system.comment = 'Reproduced eigenvalues from titov2023 with ATON.QRotor' | ||
print('Eigenvalues:') | ||
print(experiment.systems[0].eigenvalues) | ||
|
||
print('Rounded eigenvalues:') | ||
precision = 4 | ||
for value in experiment.systems[0].eigenvalues: | ||
for value in system.eigenvalues: | ||
print(round(value, precision)) | ||
|
||
qr.plot.potential(experiment) | ||
qr.plot.energies(system) | ||
|