Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove physical constants from aiida.common.constants #3278

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 2 additions & 14 deletions aiida/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,9 @@
# a migration.
AIIDA_FLOAT_PRECISION = 14

## PHYSICAL CONSTANTS BELOW HERE

bohr_to_ang = 0.52917720859 # pylint: disable=invalid-name
ang_to_m = 1.e-10 # pylint: disable=invalid-name
bohr_si = bohr_to_ang * ang_to_m # pylint: disable=invalid-name
ry_to_ev = 13.6056917253 # pylint: disable=invalid-name
ry_si = 4.35974394 / 2. * 10**(-18) # pylint: disable=invalid-name
hartree_to_ev = ry_to_ev * 2. # pylint: disable=invalid-name
timeau_to_sec = 2.418884326155573e-17 # pylint: disable=invalid-name
invcm_to_THz = 0.0299792458 # pylint: disable=invalid-name

# Element table, from NIST (http://www.nist.gov/pml/data/index.cfm)
# Retrieved in October 2014 for atomic numbers 1-103, and in May 2016
# for atomic numbers 104-112, 114 and 116. In addition, element X is
# added to support unknown elements.
# Retrieved in October 2014 for atomic numbers 1-103, and in May 2016 or atomic numbers 104-112, 114 and 116.
# In addition, element X is added to support unknown elements.
elements = { # pylint: disable=invalid-name
0: {
'mass': 1.00000,
Expand Down
2 changes: 1 addition & 1 deletion aiida/orm/nodes/data/array/trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -739,7 +739,7 @@ def collapse_into_unit_cell(point, cell):

try:
if self.get_attribute('units|positions') in ('bohr', 'atomic'):
from aiida.common.constants import bohr_to_ang
bohr_to_ang = 0.52917720859
positions *= bohr_to_ang
except KeyError:
pass
Expand Down