diff --git a/Methane-VibFreqAnalysis.py b/Methane-VibFreqAnalysis.py new file mode 100644 index 0000000..9f0fab4 --- /dev/null +++ b/Methane-VibFreqAnalysis.py @@ -0,0 +1,49 @@ +import psi4 +import numpy as np + +# Initial setup +psi4.set_memory('2 GB') +psi4.set_num_threads(2) + +file_prefix = 'methane_HF-DZ' + +ch4 = psi4.geometry(""" +symmetry c1 +0 1 + C -0.85972 2.41258 0.00000 + H 0.21028 2.41258 0.00000 + H -1.21638 2.69390 -0.96879 + H -1.21639 3.11091 0.72802 + H -1.21639 1.43293 0.24076 +""") + + +# Geometry optimization +psi4.set_output_file(file_prefix + '_geomopt.dat', False) +psi4.set_options({'g_convergence': 'gau_tight'}) +psi4.optimize('scf/cc-pVDZ', molecule=ch4) + + +# Run vibrational frequency analysis +psi4.set_output_file(file_prefix + '_vibfreq.dat', False) +scf_energy, scf_wfn = psi4.frequency('scf/cc-pVDZ', molecule=ch4, return_wfn=True, dertype='gradient') + +# Save "raw" frequencies into a variable +frequencies = scf_wfn.frequency_analysis['omega'].data # this command is just to get you started! + +# Eliminate imaginary parts of frequencies, +frequencies2 = np.real(frequencies) +# round the frequencies (to the nearest whole number), +frequencies_rounded = np.round(frequencies2) +# and extract only the *non-zero* frequencies +frequencies_abovezero = frequencies_rounded[frequencies_rounded>0] +# Determine the unique non-zero frequencies and +# the number of times each such frequency occurs; +# store these in a NumPy array in the format: +# {frequency, count} (i.e, one line per freq.) +(frequency, count)= np.unique(frequencies_abovezero, return_counts = True) +frequencies_final = np.asarray((frequency, count)).T +# Save the NumPy array with frequency and count data +# to a text file with the header line: 'freq degen' +np.savetxt('frequency degeneracies.txt', frequencies_final, header = 'freq degen') + diff --git a/frequencydegeneracies.txt b/frequencydegeneracies.txt new file mode 100644 index 0000000..6ca6603 --- /dev/null +++ b/frequencydegeneracies.txt @@ -0,0 +1,5 @@ +# freq degen +1.434000000000000000e+03 3.000000000000000000e+00 +1.648000000000000000e+03 2.000000000000000000e+00 +3.165000000000000000e+03 1.000000000000000000e+00 +3.286000000000000000e+03 3.000000000000000000e+00 diff --git a/text1.txt b/text1.txt index 9cdd5be..b626da8 100644 --- a/text1.txt +++ b/text1.txt @@ -5,26 +5,26 @@ under her vivid hair gave the impression that her whole head was on fire. Raindrops the size of bullets thundered on the castle windows for days on end; the lake rose, the flower beds turned into muddy streams, and Hagrid's pumpkins swelled to the size of garden sheds. Oliver Wood's enthusiasm for regular training sessions, however, was not -dampened, which was why Harry was to be found, late one stormy Saturday afternoon a few days before Halloween, returning to Gryffindor +dampened, which was why Mimi was to be found, late one stormy Saturday afternoon a few days before Halloween, returning to Gryffindor Tower, drenched to the skin and splattered with mud. Even aside from the rain and wind it hadn't been a happy practice session. Fred and George, who had been spying on the Slytherin team, had seen for themselves the speed of those new Nimbus Two Thousand and Ones. They reported that the Slytherin team was no more than seven greenish blurs, shooting through the air like missiles. -As Harry squelched along the deserted corridor he came across somebody who looked just as preoccupied as he was. Nearly Headless Nick, +As Mimi squelched along the deserted corridor he came across somebody who looked just as preoccupied as he was. Nearly Headless Nick, the ghost of Gryffindor Tower, was staring morosely out of a window, muttering under his breath, ". . . don't fulfill their requirements . . . half an inch, if that . . ." -"Hello, Nick," said Harry. +"Hello, Nick," said Mimi. "Hello, hello," said Nearly Headless Nick, starting and looking round. He wore a dashing, plumed hat on his long curly hair, -and a tunic with a ruff, which concealed the fact that his neck was almost completely severed. He was pale as smoke, and Harry +and a tunic with a ruff, which concealed the fact that his neck was almost completely severed. He was pale as smoke, and Mimi could see right through him to the dark sky and torrential rain outside. -"You look troubled, young Potter," said Nick, folding a transparent letter as he spoke and tucking it inside his doublet. +"You look troubled, young Lavin," said Nick, folding a transparent letter as he spoke and tucking it inside his doublet. -"So do you," said Harry. +"So do you," said Mimi. "Ah," Nearly Headless Nick waved an elegant hand, "a matter of no importance. . . . It's not as though I really wanted to join. . . . Thought I'd apply, but apparently I 'don't fulfill requirements' -" @@ -34,7 +34,7 @@ In spite of his airy tone, there was a look of great bitterness on his face. "But you would think, wouldn't you," he erupted suddenly, pulling the letter back out of his pocket, "that getting hit forty-five times in the neck with a blunt axe would qualify you to join the Headless Hunt?" -"Oh - yes," said Harry, who was obviously supposed to agree. +"Oh - yes," said Mimi, who was obviously supposed to agree. "I mean, nobody wishes more than I do that it had all been quick and clean, and my head had come off properly, I mean, it would have saved me a great deal of pain and ridicule. However -" Nearly Headless Nick shook his letter open and read diff --git a/text2.txt b/text2.txt index d247cd8..f38a777 100644 --- a/text2.txt +++ b/text2.txt @@ -1,5 +1,9 @@ Quotes from The Fresh Prince of Bel-Air: +Mimi: "I love chemistry." +Lisette: "I love computing." +Mimi: "If only there was a way we could combine the two!" + Uncle Phil: "We Eat Here Later. You Eat Here Never. Jazz: "Looks Like You Eat Here Often." diff --git a/text3.txt b/text3.txt new file mode 100644 index 0000000..b498224 --- /dev/null +++ b/text3.txt @@ -0,0 +1 @@ +Beep beep boop boop -robot \ No newline at end of file