def load_all_K_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], filename_must_not_contain=[], filename_must_contain=[], reps='all'): """ Will load all the K files in a specified folder. This will output an Ordered Dictionary with filenames as keys and data as values. Inputs: * folder = the folder to look for sigma files in * min_step = first step to read * max_step = last step to read * stride = stride to take when reading * ignore_steps = which steps to ignore * filename_must_contain = any strings the filename must contain (list) * filename_must_not_contain = any strings the filename must not contain (list) * reps = which replicas to get data for """ filename_must_contain.append("K") filename_must_contain.append("list") return Utils.load_all_in_folder( folder=folder, func=load_K, args=[min_step, max_step, stride, ignore_steps], filename_must_not_contain=filename_must_not_contain, filename_must_contain=filename_must_contain, reps=reps)
def load_all_tintf_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): return Utils.load_all_in_folder( folder=folder, func=load_tintf, args=[min_step, max_step, stride, ignore_steps], filename_must_contain=['t_int_frc', 'xyz'], filename_must_not_contain=[], reps=reps)
def load_all_ad_frc_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): """ Loads all adiabatic forces in a folder """ return Utils.load_all_in_folder( folder=folder, func=load_ad_frc, args=[min_step, max_step, stride, ignore_steps], filename_must_contain=['frc', 'xyz', 'ad'], filename_must_not_contain=[], reps=reps)
def load_all_pos_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): """ Loads all forces in a folder """ return Utils.load_all_in_folder( folder=folder, func=load_pos, args=[min_step, max_step, stride, ignore_steps], filename_must_contain=['pos', 'xyz'], filename_must_not_contain=['init'], reps=reps)
def load_all_QM_0_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): """ Will load all the QM_0 files in 1 folder. """ return Utils.load_all_in_folder( folder=folder, func=load_QM_0, args=[min_step, max_step, stride, ignore_steps], filename_must_contain=['QM_0', 'xyz'], filename_must_not_contain=['force'], reps=reps)
def load_all_coeff_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], filename_must_not_contain=[], filename_must_contain=[], reps='all'): return Utils.load_all_in_folder( folder=folder, func=load_coeff, args=[min_step, max_step, stride, ignore_steps], filename_must_not_contain=filename_must_not_contain, filename_must_contain=filename_must_contain, reps=reps)
def load_all_ham_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): allHamFiles = [i for i in os.listdir(folder) if 'run-ham' in i] filepath = folder + allHamFiles[0] num_basis = find_num_basis(filepath) metadata = XYZ.get_xyz_step_metadata2(filepath) return Utils.load_all_in_folder( folder=folder, func=load_ham, args=[num_basis, metadata, min_step, max_step, stride, ignore_steps], filename_must_contain=['ham', 'xyz'], filename_must_not_contain=[], reps=reps)
def load_all_ener_time_in_folder(folder, reps): """ Will load all ener files in a folder. This means the kinetic, potential and conserved energies and the time taken. Inputs: * folder => the folder to look in [str] * reps => Which reps to load (can be 'all') [str] or [list of int] Outpus: * dictionary of each file with parse energy data. Filename is key and data is value. """ return Utils.load_all_in_folder(folder=folder, func=load_ener_time_data, filename_must_contain=['csv', 'ener'], filename_must_not_contain=['ad'], reps=reps)
def load_all_Rlk_in_folder(folder, min_step=0, max_step='all', stride=1, ignore_steps=[], reps='all'): rlk_data = Utils.load_all_in_folder( folder=folder, func=load_Qlk, args=[min_step, max_step, stride, ignore_steps], filename_must_contain=['rlk', 'xyz'], filename_must_not_contain=[], reps=reps) keys = list(rlk_data.keys()) if len(keys) > 1: files = '\n\t*'.join(keys) raise SystemExit("Found more than 1 Rlk file!\n\n\t*%s" % files) rlk_data = rlk_data[keys[0]] return rlk_data
def load_all_ener_ad(folder, reps, max_time='all', min_time=0): return Utils.load_all_in_folder(folder, load_ener_ad, args=[max_time, min_time], filename_must_contain=['csv', 'ad_ener'], reps=reps)
def load_all_ener_dat(folder, reps, max_time): return Utils.load_all_in_folder(folder, load_ener_dat, args=[max_time], filename_must_contain=['dat', 'ener'], reps=reps)