-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.py
42 lines (32 loc) · 1.38 KB
/
main.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# This is a script designed to convert thermodynamic data of elements taken from nist.gov into different units.
import scipy.constants as spc
import scripts
import os
def main():
choice = input("Type PT for entire periodic table, SE for just a single element, AM for Atomic Mass Testing, or "
"OTHER for different testing purposes: ")
choice.upper()
# Convert the entire periodic table:
if choice == "PT":
os.chdir(os.getcwd() + '\\Tables\\')
scripts.convert_periodic_table()
# Convert just a single element with a corresponding state of matter:
elif choice == "SE":
os.chdir(os.getcwd() + '\\Tables\\')
element = input("What element would you like to convert the units of? (Use the symbol for input) ")
state_of_matter = input("Solid or Liquid state of matter? (S for solid, L for liquid) ")
scripts.convert_single_element(element, state_of_matter)
elif choice == "AM":
scripts.update_atomic_mass()
scripts.create_conversion_table_entropy()
scripts.create_conversion_table_entropy_reverse()
scripts.create_conversion_table_energy()
scripts.create_conversion_table_energy_reverse()
# scripts.get_factor_from_table()
elif choice == "Other":
print(spc.erg)
else:
print("Invalid Output!")
exit(-1)
if __name__ == '__main__':
main()