Skip to content

Commit

Permalink
Create example Jupyter notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
bobbypaton committed Jul 1, 2022
1 parent d4a7183 commit 28b20f2
Show file tree
Hide file tree
Showing 74 changed files with 2,440 additions and 8 deletions.
1,216 changes: 1,216 additions & 0 deletions .ipynb_checkpoints/jupyter_goodvibes_examples-checkpoint.ipynb

Large diffs are not rendered by default.

11 changes: 6 additions & 5 deletions goodvibes/GoodVibes.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def add_time(tm, cpu):
return fulldate


def calc_cpu(thermo_data, options, log):
def calc_cpu(thermo_data, log):
# Initialize the total CPU time
add_days = 0
cpu = datetime(100, 1, 1, 00, 00, 00, 00)
Expand All @@ -115,7 +115,7 @@ def calc_cpu(thermo_data, options, log):
cpu.minute, 'mins', cpu.second, 'secs'))


def get_vib_scale_factor(files, level_of_theory, freq_scale_factor, mm_freq_scale_factor, log):
def get_vib_scale_factor(files, level_of_theory, log, freq_scale_factor=False, mm_freq_scale_factor=False):
''' Attempt to automatically obtain frequency scale factor
Application of freq scale factors requires all outputs to be same level of theory'''

Expand Down Expand Up @@ -148,7 +148,8 @@ def get_vib_scale_factor(files, level_of_theory, freq_scale_factor, mm_freq_scal
levels_l_o_t.append(i)
filtered_calcs_l_o_t.append(files_l_o_t)
filtered_calcs_l_o_t.append(levels_l_o_t)
io.print_check_fails(log, filtered_calcs_l_o_t[1], filtered_calcs_l_o_t[0], "levels of theory")
print(filtered_calcs_l_o_t)
#io.print_check_fails(log, filtered_calcs_l_o_t[1], filtered_calcs_l_o_t[0], "levels of theory")

# Exit program if molecular mechanics scaling factor is given and all files are not ONIOM calculations
if mm_freq_scale_factor is not False:
Expand Down Expand Up @@ -608,7 +609,7 @@ def main():
bbe_vals = [[]] * len(file_list) # initialize a list that will be populated with thermochemical values

# scaling vibrational Frequencies
options.freq_scale_factor, options.mm_freq_scale_factor = get_vib_scale_factor(file_list, l_o_t, options.freq_scale_factor, options.mm_freq_scale_factor, log)
options.freq_scale_factor, options.mm_freq_scale_factor = get_vib_scale_factor(file_list, l_o_t, log, options.freq_scale_factor, options.mm_freq_scale_factor)

for i, file in enumerate(file_list):
d3_term = 0.0 # computes D3 term if requested
Expand Down Expand Up @@ -644,7 +645,7 @@ def main():
gv_summary = io.summary(thermo_data, options, log, boltz_facs, clusters)

if options.cputime: # Print CPU usage if requested
cpu = calc_cpu(thermo_data, options, log)
cpu = calc_cpu(thermo_data, log)

if options.ee is not False: # Compute selectivity
[a_name, b_name], [a_files, b_files], ee, er, ratio, dd_free_energy, preference = get_selectivity(options.ee, file_list, boltz_facs, options.temperature, log)
Expand Down
1 change: 0 additions & 1 deletion goodvibes/examples/reaction_profile/PhPy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
gridlines: True
show_conformers: True
show_gconf: False
dpi : 400
title: Potential Energy Surface


2 changes: 1 addition & 1 deletion goodvibes/io.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class Logger:
log (file object): file to write GV output to.
thermodata (bool): decides if string passed to logger is thermochemical data, needing to be separated by commas
"""
def __init__(self, filein, append, csv):
def __init__(self, filein, append='output', csv=False):
self.csv = csv
if not self.csv:
suffix = 'dat'
Expand Down
2 changes: 1 addition & 1 deletion goodvibes/pes.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class get_pes:
g_species_qhgzero (list):quasi-harmonic Gibbs free energy "zero" values used for graphing.
g_rel_val (list): relative Gibbs free energy values used for graphing.
"""
def __init__(self, file, thermo_data, log, temperature, gconf, QH, cosmo=None, cosmo_int=None):
def __init__(self, file, thermo_data, log, temperature, gconf=True, QH=False, cosmo=None, cosmo_int=None):
# Default values
self.dec, self.units, self.boltz = 2, 'kcal/mol', False

Expand Down
Loading

0 comments on commit 28b20f2

Please sign in to comment.