gen.forcefield_selection() gen.fragment_selection() gen.check_water_molecules() if g_var.args.posre != None and len(g_var.np_directories) > 0: check_library.add_posres_file() if g_var.args.compare != None and len(g_var.np_directories) > 0: check_library.compare_forcefield_to_database() if g_var.args.info: gen.database_information() if g_var.args.v >= 1: print(gen.fragments_in_use()) gen.fetch_fragment_multi() gen.fetch_fragment_single() gen.fetch_chain_groups() gen.sort_swap_group() print(gen.print_swap_residues()) ### #### collects initial structures into INPUT folder gro.collect_input() #### saves flags used into INPUT folder gen.flags_used() g_var.tc['i_t_e'] = time.time() #### reads in CG file and separates into residue types box_vec_initial = read_in.read_initial_cg_pdb() #### box size update if g_var.args.box != None: print('box cutting only works for cubic boxes currently') g_var.box_vec, box_shift = gen.new_box_vec(box_vec_initial, g_var.args.box) else:
if g_var.fg != None: print('Cannot find fragment library: ' + frag + ' please select library from below\n') fragment_number = gen.database_selection(fragments_available, 'fragments') p_directories_unsorted, mod_directories_unsorted, np_directories_unsorted = gen.fetch_residues( fragments_available, fragment_number) np_residues, p_residues, mod_residues, np_directories, p_directories, mod_directories = gen.sort_directories( p_directories_unsorted, mod_directories_unsorted, np_directories_unsorted) chiral = gen.fetch_chiral(np_directories, p_directories) if not g_var.at2cg: ### reads in water molecules water_dir, water = gen.check_water_molecules(g_var.w, np_directories) ### return backbone information backbone, sorted_connect, hydrogen, heavy_bond = gen.fetch_fragment( p_residues, p_directories, mod_directories, np_directories, forcefield_location + forcefield, mod_residues) swap_dict = gen.sort_swap_group() ### finds initial rotation matrices x_rot, y_rot, z_rot = [], [], [] for angle in range(0, 360, 5): angle = np.radians(angle) x_rot.append(gen.eulerAnglesToRotationMatrix([angle, 0, 0])) y_rot.append(gen.eulerAnglesToRotationMatrix([0, angle, 0])) z_rot.append(gen.eulerAnglesToRotationMatrix([0, 0, angle]))