chemistry_paradise 1.1.26

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of chemistry_paradise might be problematic. Click here for more details.

Files changed (65) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +419 -0
  3. data/bin/chemistry_paradise +7 -0
  4. data/chemistry_paradise.gemspec +46 -0
  5. data/doc/BUGS.md +16 -0
  6. data/doc/README.gen +391 -0
  7. data/doc/todo/TODO.md +26 -0
  8. data/lib/chemistry_paradise/base/base.rb +101 -0
  9. data/lib/chemistry_paradise/base/colours.rb +65 -0
  10. data/lib/chemistry_paradise/commandline/help.rb +40 -0
  11. data/lib/chemistry_paradise/commandline/menu.rb +88 -0
  12. data/lib/chemistry_paradise/commandline/parse_commandline.rb +94 -0
  13. data/lib/chemistry_paradise/constants/constants.rb +52 -0
  14. data/lib/chemistry_paradise/constants/file_constants.rb +33 -0
  15. data/lib/chemistry_paradise/constants/german_names_of_elements_to_element_symbol.rb +157 -0
  16. data/lib/chemistry_paradise/converters/celsius_to_fahrenheit.rb +143 -0
  17. data/lib/chemistry_paradise/converters/fahrenheit_to_celsius.rb +132 -0
  18. data/lib/chemistry_paradise/converters/shared.rb +15 -0
  19. data/lib/chemistry_paradise/gui/gtk3/calculate_molecular_weight/calculate_molecular_weight.rb +34 -0
  20. data/lib/chemistry_paradise/gui/gtk3/show_periodic_table/show_periodic_table.rb +34 -0
  21. data/lib/chemistry_paradise/gui/gtk3/temperature_converter/temperature_converter.rb +249 -0
  22. data/lib/chemistry_paradise/gui/shared_code/calculate_molecular_weight/calculate_molecular_weight_module.rb +171 -0
  23. data/lib/chemistry_paradise/gui/shared_code/show_periodic_table/show_periodic_table_module.rb +318 -0
  24. data/lib/chemistry_paradise/images/show_periodic_table.png +0 -0
  25. data/lib/chemistry_paradise/interactive_chemistry_shell.rb +246 -0
  26. data/lib/chemistry_paradise/project/project.rb +24 -0
  27. data/lib/chemistry_paradise/requires/common_external_requires.rb +17 -0
  28. data/lib/chemistry_paradise/requires/require_the_project.rb +19 -0
  29. data/lib/chemistry_paradise/shared.rb +130 -0
  30. data/lib/chemistry_paradise/show_electron_configuration.rb +250 -0
  31. data/lib/chemistry_paradise/show_element.rb +145 -0
  32. data/lib/chemistry_paradise/sinatra/sinatra.rb +131 -0
  33. data/lib/chemistry_paradise/split_molecule_names.rb +228 -0
  34. data/lib/chemistry_paradise/toplevel_methods/atomgewichte.rb +31 -0
  35. data/lib/chemistry_paradise/toplevel_methods/convert_parens.rb +64 -0
  36. data/lib/chemistry_paradise/toplevel_methods/display_where_the_molmasses_are_kept.rb +24 -0
  37. data/lib/chemistry_paradise/toplevel_methods/e.rb +16 -0
  38. data/lib/chemistry_paradise/toplevel_methods/kelvin.rb +34 -0
  39. data/lib/chemistry_paradise/toplevel_methods/language.rb +50 -0
  40. data/lib/chemistry_paradise/toplevel_methods/misc.rb +128 -0
  41. data/lib/chemistry_paradise/toplevel_methods/periodic_table.rb +16 -0
  42. data/lib/chemistry_paradise/toplevel_methods/remove_this_molecule_from.rb +63 -0
  43. data/lib/chemistry_paradise/toplevel_methods/show_electron_negativity_chart.rb +26 -0
  44. data/lib/chemistry_paradise/utility_scripts/calculate_atomic_mass.rb +559 -0
  45. data/lib/chemistry_paradise/utility_scripts/combustion_analysis.rb +207 -0
  46. data/lib/chemistry_paradise/utility_scripts/electron_negativity_chart.rb +78 -0
  47. data/lib/chemistry_paradise/utility_scripts/equalize_chemical_formula.rb +84 -0
  48. data/lib/chemistry_paradise/utility_scripts/equation_solver.rb +130 -0
  49. data/lib/chemistry_paradise/utility_scripts/orbitals.rb +70 -0
  50. data/lib/chemistry_paradise/utility_scripts/show_electron_negativity_of_this_element.rb +103 -0
  51. data/lib/chemistry_paradise/verbose_chemical_calculation.rb +21 -0
  52. data/lib/chemistry_paradise/version/version.rb +19 -0
  53. data/lib/chemistry_paradise/www/chemistry/chemistry.cgi +7 -0
  54. data/lib/chemistry_paradise/www/chemistry/chemistry.rb +1526 -0
  55. data/lib/chemistry_paradise/www/chemistry/chemistry.sinatra +56 -0
  56. data/lib/chemistry_paradise/www/organic_chemistry/organic_chemistry.md +16 -0
  57. data/lib/chemistry_paradise/yaml/atomgewichte.yml +113 -0
  58. data/lib/chemistry_paradise/yaml/colours_for_the_elements.yml +13 -0
  59. data/lib/chemistry_paradise/yaml/dichte.yml +21 -0
  60. data/lib/chemistry_paradise/yaml/electron_negativity_chart.yml +111 -0
  61. data/lib/chemistry_paradise/yaml/molecular_formula_of_different_molecules.yml +13 -0
  62. data/lib/chemistry_paradise/yaml/periodic_table_of_the_elements.yml +125 -0
  63. data/lib/chemistry_paradise.rb +1 -0
  64. data/test/testing_chemistry_paradise.rb +49 -0
  65. metadata +155 -0
@@ -0,0 +1,318 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === ChemistryParadise::GUI::Gtk::ShowPeriodicTableModule
6
+ #
7
+ # If you need to determine the currently selected (active) element
8
+ # then you could use the method .active_element?().
9
+ # =========================================================================== #
10
+ # require 'chemistry_paradise/gui/shared_code/show_periodic_table/show_periodic_table_module.rb'
11
+ # include ::ChemistryParadise::GUI::Gtk::ShowPeriodicTableModule
12
+ # =========================================================================== #
13
+ module ChemistryParadise
14
+
15
+ module GUI
16
+
17
+ module Gtk
18
+
19
+ module ShowPeriodicTableModule # === ChemistryParadise::GUI::Gtk::ShowPeriodicTableModule
20
+
21
+ begin
22
+ require 'colours'
23
+ rescue LoadError; end
24
+
25
+ require 'chemistry_paradise/constants/file_constants.rb'
26
+ require 'chemistry_paradise/toplevel_methods/atomgewichte.rb'
27
+ require 'chemistry_paradise/utility_scripts/calculate_atomic_mass.rb'
28
+
29
+ require 'gtk_paradise/requires/require_the_base_module.rb'
30
+ include ::Gtk::BaseModule
31
+
32
+ # ========================================================================= #
33
+ # === NAMESPACE
34
+ # ========================================================================= #
35
+ NAMESPACE = inspect
36
+
37
+ # ========================================================================= #
38
+ # === TITLE
39
+ # ========================================================================= #
40
+ TITLE = 'Show Periodic Table'
41
+
42
+ # ========================================================================= #
43
+ # === FILE_ATOMGEWICHTE
44
+ # ========================================================================= #
45
+ FILE_ATOMGEWICHTE = ChemistryParadise::Constants::FILE_ATOMGEWICHTE
46
+
47
+ # ========================================================================= #
48
+ # === WIDTH
49
+ # ========================================================================= #
50
+ WIDTH = 1020
51
+
52
+ # ========================================================================= #
53
+ # === HEIGHT
54
+ # ========================================================================= #
55
+ HEIGHT = 500
56
+
57
+ # ========================================================================= #
58
+ # === USE_THIS_FONT
59
+ # ========================================================================= #
60
+ USE_THIS_FONT = :dejavu_condensed_20
61
+
62
+ # ========================================================================= #
63
+ # === initialize
64
+ # ========================================================================= #
65
+ def initialize(
66
+ optional_file = nil,
67
+ run_already = true
68
+ )
69
+ super(:vertical)
70
+ reset
71
+ run if run_already
72
+ end
73
+
74
+ # ========================================================================= #
75
+ # === reset (reset tag)
76
+ # ========================================================================= #
77
+ def reset
78
+ reset_the_internal_variables
79
+ # ======================================================================= #
80
+ # === @configuration
81
+ # ======================================================================= #
82
+ @configuration = [true, __dir__, NAMESPACE]
83
+ # ======================================================================= #
84
+ # === @title
85
+ # ======================================================================= #
86
+ @title = TITLE
87
+ # ======================================================================= #
88
+ # === @width
89
+ # ======================================================================= #
90
+ set_width(WIDTH)
91
+ # ======================================================================= #
92
+ # === @height
93
+ # ======================================================================= #
94
+ set_height(HEIGHT)
95
+ set_use_this_font(USE_THIS_FONT)
96
+ use_gtk_paradise_project_css_file
97
+ infer_the_size_automatically
98
+ end
99
+
100
+ # ========================================================================= #
101
+ # === padding?
102
+ # ========================================================================= #
103
+ def padding?
104
+ 0
105
+ end
106
+
107
+ # ========================================================================= #
108
+ # === border_size?
109
+ # ========================================================================= #
110
+ def border_size?
111
+ 0
112
+ end
113
+
114
+ # ========================================================================= #
115
+ # === create_skeleton (create tag)
116
+ # ========================================================================= #
117
+ def create_skeleton
118
+ end
119
+
120
+ # ========================================================================= #
121
+ # === return_the_dataset_from_the_file_atomgewichte
122
+ # ========================================================================= #
123
+ def return_the_dataset_from_the_file_atomgewichte(
124
+ use_this_file = ::ChemistryParadise.file_atomgewichte
125
+ )
126
+ YAML.load_file(use_this_file) if File.exist? use_this_file
127
+ end
128
+
129
+ # ========================================================================= #
130
+ # === run (run tag)
131
+ # ========================================================================= #
132
+ def run
133
+ create_skeleton_then_connect_skeleton
134
+ end
135
+
136
+ # ========================================================================= #
137
+ # === active_button?
138
+ #
139
+ # This method will return the currently selected, active button.
140
+ # ========================================================================= #
141
+ def active_button?
142
+ return_all_toggle_buttons.select {|another_button|
143
+ another_button.active?
144
+ }
145
+ end; alias active? active_button? # === active?
146
+
147
+ # ========================================================================= #
148
+ # === return_random_html_colour
149
+ # ========================================================================= #
150
+ def return_random_html_colour
151
+ ::Colours.random_html_colour
152
+ end
153
+
154
+ # ========================================================================= #
155
+ # === return_colour_based_on_index
156
+ # ========================================================================= #
157
+ def return_colour_based_on_index(i)
158
+ case i
159
+ when 0 .. 10
160
+ :darkseagreen
161
+ when 11 .. 20
162
+ :cornsilk
163
+ when 21 .. 30
164
+ :lightgreen
165
+ when 31 .. 40
166
+ :skyblue
167
+ when 41 .. 50
168
+ :yellow
169
+ when 51 .. 60
170
+ :steelblue
171
+ when 61 .. 70
172
+ :magenta
173
+ else
174
+ e 'Not handled above 70 right now, but this should be changed '\
175
+ 'eventually. The value was: '+i.to_s
176
+ end
177
+ end
178
+
179
+ # ========================================================================= #
180
+ # === clear_the_toggle_state_of_all_buttons_but_this_one
181
+ #
182
+ # We invoke this method only when the toggle-button's state is set
183
+ # to active.
184
+ # ========================================================================= #
185
+ def clear_the_toggle_state_of_all_buttons_but_this_one(
186
+ this_button
187
+ )
188
+ all_toggle_buttons = return_all_toggle_buttons
189
+ _ = all_toggle_buttons.reject {|another_button|
190
+ another_button == this_button
191
+ }
192
+ _.each {|another_button|
193
+ another_button.is_inactive
194
+ another_button.remove_this_css_class('bblack3')
195
+ another_button.add_this_css_class('bblack2')
196
+ }
197
+ end
198
+
199
+ # ========================================================================= #
200
+ # === active_element?
201
+ #
202
+ # This method will either return nil, or it will return the String
203
+ # indicating which element is currently active, such as "Co" for
204
+ # "Cobalt".
205
+ # ========================================================================= #
206
+ def active_element?
207
+ _ = active_button?
208
+ if _
209
+ _ = _.first if _.is_a? Array
210
+ return _.text?
211
+ else
212
+ return _
213
+ end
214
+ end
215
+
216
+ # ========================================================================= #
217
+ # === GtkParadise::GUI::Gtk::ShowPeriodicTableModule.run
218
+ # ========================================================================= #
219
+ def self.run(
220
+ i = ARGV
221
+ )
222
+ require 'gtk_paradise/run'
223
+ _ = ::ChemistryParadise::GUI::Gtk::ShowPeriodicTable.new(i)
224
+ r = ::Gtk.run
225
+ r << _
226
+ r.automatic
227
+ r.top_left_then_run
228
+ end
229
+
230
+ # ========================================================================= #
231
+ # === connect_skeleton (connect tag)
232
+ # ========================================================================= #
233
+ def connect_skeleton
234
+ abort_on_exception
235
+ dataset = return_the_dataset_from_the_file_atomgewichte
236
+ outer_vbox = gtk_vbox
237
+
238
+ index = 0
239
+
240
+ dataset.each_slice(10).each {|row|
241
+ hbox = gtk_hbox
242
+ row.each {|name_of_the_element, molecular_weight|
243
+ index += 1
244
+ button = gtk_toggle_button(name_of_the_element)
245
+ button.clear_background
246
+ button.bblack2
247
+ button.set_size_request(84, 84)
248
+ button.set_width_request(84)
249
+ button.set_height_request(84)
250
+ _ = return_random_html_colour
251
+ button.override_background_colour(
252
+ return_colour_based_on_index(index)
253
+ )
254
+ button.disallow_resizing
255
+ # =================================================================== #
256
+ # On click action for the toggle-button, do this:
257
+ # =================================================================== #
258
+ button.signal_connect(:button_press_event) {
259
+ output_the_name_of_this_element_and_this_molecular_weight(
260
+ name_of_the_element, molecular_weight
261
+ )
262
+ @entry1.append_text(name_of_the_element.to_s)
263
+ calculate_the_weight_for_entry2
264
+ if button.active?
265
+ button.remove_this_css_class('bblack2')
266
+ button.remove_this_css_class('bblack3')
267
+ clear_the_toggle_state_of_all_buttons_but_this_one(button)
268
+ button.bblack3
269
+ end
270
+ }
271
+ hbox.minimal(button, 1)
272
+ }
273
+ outer_vbox.minimal(hbox, 2)
274
+ }
275
+ outer_vbox.set_border_width(20)
276
+ outer_vbox.minimal(return_lower_widget_containing_the_user_input_entry, 2)
277
+ maximal(outer_vbox, 15)
278
+ end
279
+
280
+ # ========================================================================= #
281
+ # === output_the_name_of_this_element_and_this_molecular_weight
282
+ # ========================================================================= #
283
+ def output_the_name_of_this_element_and_this_molecular_weight(
284
+ name_of_the_element,
285
+ molecular_weight
286
+ )
287
+ e name_of_the_element+' '+molecular_weight.to_s+' ame'
288
+ end
289
+
290
+ # ========================================================================= #
291
+ # === calculate_the_weight_for_entry2
292
+ # ========================================================================= #
293
+ def calculate_the_weight_for_entry2
294
+ _ = @entry1.text?
295
+ result = ChemistryParadise.atomic_mass_of(_)
296
+ @entry2.set_text(result.to_s)
297
+ end
298
+
299
+ # ========================================================================= #
300
+ # === return_lower_widget_containing_the_user_input_entry
301
+ # ========================================================================= #
302
+ def return_lower_widget_containing_the_user_input_entry
303
+ vbox = gtk_vbox
304
+ @entry1 = gtk_entry
305
+ @entry1.bblack1
306
+ @entry1.center
307
+ @entry1.on_enter { calculate_the_weight_for_entry2 }
308
+ @entry1.yellow_background
309
+ vbox.minimal(@entry1, 2)
310
+ @entry2 = gtk_entry
311
+ @entry2.bblack1
312
+ @entry2.center
313
+ @entry2.yellow_background
314
+ vbox.minimal(@entry2, 2)
315
+ return vbox
316
+ end
317
+
318
+ end; end; end; end
@@ -0,0 +1,246 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # === ChemistryParadise::InteractiveChemistryShell
6
+ #
7
+ # Usage examples:
8
+ #
9
+ # ChemistryParadise::InteractiveChemistryShell.new
10
+ #
11
+ # =========================================================================== #
12
+ # require 'chemistry/interactive_chemistry_shell'
13
+ # =========================================================================== #
14
+ require 'chemistry_paradise/base/base.rb'
15
+
16
+ begin
17
+ require 'readline'
18
+ rescue LoadError; end
19
+
20
+ module ChemistryParadise
21
+
22
+ class InteractiveChemistryShell < Base # === ChemistryParadise::InteractiveChemistryShell
23
+
24
+ require 'chemistry_paradise/utility_scripts/calculate_atomic_mass.rb'
25
+
26
+ # ========================================================================= #
27
+ # === PROMPT
28
+ # ========================================================================= #
29
+ PROMPT = '> '
30
+ if File.exist? Shared.periodic_table?
31
+ PERIODIC_TABLE = YAML.load_file(Shared.periodic_table?)
32
+ else
33
+ PERIODIC_TABLE = nil
34
+ end
35
+
36
+ # ========================================================================= #
37
+ # === initialize
38
+ # ========================================================================= #
39
+ def initialize(run_already = true)
40
+ reset
41
+ run if run_already
42
+ end
43
+
44
+ # ========================================================================= #
45
+ # === reset
46
+ # ========================================================================= #
47
+ def reset
48
+ @lpad = ' '
49
+ end
50
+
51
+ # ========================================================================= #
52
+ # === show_welcome_message
53
+ # ========================================================================= #
54
+ def show_welcome_message
55
+ e 'Welcome to the InteractiveChemistryShell.'
56
+ e 'Input "help" to get a list of options, otherwise'
57
+ e 'just type in your input now.'
58
+ print PROMPT
59
+ end
60
+
61
+ # ========================================================================= #
62
+ # === report_input
63
+ # ========================================================================= #
64
+ def report_input(i)
65
+ ewarn 'Input was: `'+sfancy(i)+'`'
66
+ end
67
+
68
+ # ========================================================================= #
69
+ # === show_welcome_message_and_help
70
+ # ========================================================================= #
71
+ def show_welcome_message_and_help
72
+ show_welcome_message
73
+ show_help
74
+ end
75
+
76
+ # ========================================================================= #
77
+ # === calculate
78
+ #
79
+ # To test this, do:
80
+ # calc C3H5
81
+ # ========================================================================= #
82
+ def calculate(i)
83
+ if i.nil?
84
+ e 'Please provide proper input to this method now, for instance, `C12H12N2`:'
85
+ i = $stdin.gets.chomp
86
+ end
87
+ CalculateAtomicMass.new(i)
88
+ end; alias calc calculate # === calc
89
+
90
+ # ========================================================================= #
91
+ # === check_against_menu
92
+ # ========================================================================= #
93
+ def check_against_menu
94
+ _ = @user_input # We can use this now.
95
+ arguments = nil # Default to denote that we have no arguments.
96
+ if _.include? ' '
97
+ splitted = _.split(' ')
98
+ _ = splitted[0] # Reassign here to the first entry.
99
+ arguments = splitted[1..-1]
100
+ end
101
+ case _ # case tag
102
+ # ======================================================================= #
103
+ # === quit
104
+ # ======================================================================= #
105
+ when 'quit','exit','q'
106
+ e 'Bye from the InteractiveChemistryShell.'
107
+ exit
108
+ # ======================================================================= #
109
+ # === show_electron_negativity_chart
110
+ # ======================================================================= #
111
+ when '4','show_electron_negativity_chart'
112
+ ChemistryParadise.show_electron_negativity_chart
113
+ # ======================================================================= #
114
+ # === periodic_table?
115
+ # ======================================================================= #
116
+ when '3','periodic_table?','show_periodic_table','top','top?',
117
+ 'periodic?','periodic','showperiodictable'
118
+ show_periodic_table
119
+ # ======================================================================= #
120
+ # === help
121
+ # ======================================================================= #
122
+ when /-?-?help/,'hel','he','h','?'
123
+ show_help
124
+ when '1','calc','calculate'
125
+ calculate(arguments)
126
+ when '2','show'
127
+ e 'Input your element symbol now:'
128
+ element_symbol = $stdin.gets.chomp
129
+ ShowElectronConfiguration.new(element_symbol)
130
+ when '' # pass through
131
+ else
132
+ # To test the following, try:
133
+ # 454 g NH4NO3
134
+ if @user_input.include?('g') and @user_input =~ /\d+/
135
+ splitted = @user_input.strip.split('g').map(&:strip)
136
+ atomic_mass = ChemistryParadise::CalculateAtomicMass[splitted.last].to_f
137
+ n_times = splitted.first.strip.to_i
138
+ mass = n_times / atomic_mass
139
+ e (mass.round(2)).to_s+' mol'
140
+ else
141
+ report_input(_)
142
+ show_help
143
+ end
144
+ end
145
+ end
146
+
147
+ # ========================================================================= #
148
+ # === ecomment
149
+ # ========================================================================= #
150
+ def ecomment(i)
151
+ Colours.ecomment(i)
152
+ end
153
+
154
+ # ========================================================================= #
155
+ # === run_loop
156
+ # ========================================================================= #
157
+ def run_loop
158
+ loop {
159
+ fetch_user_input # Get user input first.
160
+ check_against_menu
161
+ }
162
+ end
163
+
164
+ # ========================================================================= #
165
+ # === run (run tag)
166
+ # ========================================================================= #
167
+ def run
168
+ show_welcome_message_and_help # Show the help section on startup.
169
+ run_loop
170
+ end
171
+
172
+ # ========================================================================= #
173
+ # === show_help
174
+ # ========================================================================= #
175
+ def show_help # help tag
176
+ e 'Available options:'
177
+ e
178
+ # ======================================================================= #
179
+ # Add more documented help-options to this Array here.
180
+ # ======================================================================= #
181
+ array = [
182
+ 'calculate the atomic mass',
183
+ 'show the electron configuration of an Element',
184
+ 'show the periodic table',
185
+ 'show electron negativity chart'
186
+ ]
187
+ array.each_with_index {|entry, index|
188
+ index += 1
189
+ ecomment @lpad+index.to_s+' # '+entry
190
+ }
191
+ end
192
+
193
+ # ========================================================================= #
194
+ # === has_readline?
195
+ # ========================================================================= #
196
+ def has_readline?
197
+ Object.const_defined? :Readline
198
+ end
199
+
200
+ # ========================================================================= #
201
+ # === fetch_user_input
202
+ # ========================================================================= #
203
+ def fetch_user_input
204
+ if has_readline?
205
+ @user_input = Readline.readline('', true)
206
+ else
207
+ @user_input = $stdin.gets.chomp
208
+ end
209
+ end
210
+
211
+ # ========================================================================= #
212
+ # === show_periodic_table
213
+ # ========================================================================= #
214
+ def show_periodic_table
215
+ e # Add a newline.
216
+ inverted = PERIODIC_TABLE.invert
217
+ 1.upto(7).each {|periode|
218
+ range = return_range_for_this_period(periode)
219
+ # ===================================================================== #
220
+ # Now we have a proper range.
221
+ # ===================================================================== #
222
+ matches = inverted.select {|index_position, value|
223
+ range.include? index_position
224
+ }
225
+ ee colourize_via_kde_konsole(periode.to_s)+': ' # Display the periode here.
226
+ matches.each_pair {|key, value|
227
+ ee simp(value)+' ('+key.to_s+') '
228
+ }; e
229
+ }
230
+ end
231
+
232
+ # ========================================================================= #
233
+ # === colourize_via_kde_konsole
234
+ # ========================================================================= #
235
+ def colourize_via_kde_konsole(i)
236
+ if Object.const_defined? :Colours
237
+ i = ::Colours.lightgreen(i)
238
+ end
239
+ return i
240
+ end
241
+
242
+ end; end
243
+
244
+ if __FILE__ == $PROGRAM_NAME
245
+ ChemistryParadise::InteractiveChemistryShell.new
246
+ end # ichem
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'chemistry_paradise/project/project.rb'
6
+ # =========================================================================== #
7
+ module ChemistryParadise
8
+
9
+ # ========================================================================= #
10
+ # === PROJECT_BASE_DIRECTORY
11
+ #
12
+ # The constant must have a trailing '/' character.
13
+ # ========================================================================= #
14
+ PROJECT_BASE_DIRECTORY =
15
+ File.absolute_path("#{__dir__}/..")+'/'
16
+
17
+ # ========================================================================= #
18
+ # === ChemistryParadise.project_base_directory?
19
+ # ========================================================================= #
20
+ def self.project_base_directory?
21
+ PROJECT_BASE_DIRECTORY
22
+ end
23
+
24
+ end
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'chemistry_paradise/requires/common_external_requires.rb'
6
+ # =========================================================================== #
7
+ require 'yaml'
8
+ begin
9
+ require 'colours'
10
+ rescue LoadError; end
11
+ begin
12
+ require 'opn'
13
+ rescue LoadError; end
14
+
15
+ begin
16
+ require 'cliner'
17
+ rescue LoadError; end
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/ruby -w
2
+ # Encoding: UTF-8
3
+ # frozen_string_literal: true
4
+ # =========================================================================== #
5
+ # require 'chemistry_paradise/requires/require_the_project.rb'
6
+ # =========================================================================== #
7
+ require 'chemistry_paradise/show_electron_configuration.rb'
8
+ require 'chemistry_paradise/commandline/parse_commandline.rb'
9
+ require 'chemistry_paradise/utility_scripts/calculate_atomic_mass.rb'
10
+ require 'chemistry_paradise/utility_scripts/combustion_analysis.rb'
11
+ require 'chemistry_paradise/utility_scripts/equation_solver.rb'
12
+ require 'chemistry_paradise/utility_scripts/equalize_chemical_formula.rb'
13
+ require 'chemistry_paradise/utility_scripts/orbitals.rb'
14
+ require 'chemistry_paradise/utility_scripts/show_electron_negativity_of_this_element.rb'
15
+
16
+ require 'chemistry_paradise/toplevel_methods/atomgewichte.rb'
17
+ require 'chemistry_paradise/toplevel_methods/misc.rb'
18
+ require 'chemistry_paradise/toplevel_methods/remove_this_molecule_from.rb'
19
+ require 'chemistry_paradise/toplevel_methods/show_electron_negativity_chart.rb'