#list of lists of strings. name_lists = [[map_to_atom_sel(mnames) for mnames in mapping_list] for mapping_list in mapping_atom_names_system] ############################### run ######################################## ### pull in trajectories trj = md.load(input_dir + input_traj, top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #actual map command cg_trj = cg.map_molecules(trj=trj, selection_list=name_lists, bead_label_list=label_lists, molecule_types=molecule_types, transfer_labels=True) cg_trj.save(output_dir + output_traj) cg_trj[0].save(output_dir + output_top) ############################### check results ############################### # reloading results from disk. cg_traj = cg_trj.load(output_dir + output_traj, top=output_dir + output_top) ref_cg_traj = cg_trj.load(reference_dir + reference_traj, top=reference_dir + reference_top) result = check.md_content_equality(cg_traj, ref_cg_traj)
] #names of cg beads created. label_lists = ['DPH', 'DPM', 'DPT'] ############################### run ######################################## ### pull in trajectories trj = md.load(input_dir + input_traj, top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #actual map command cg_trj = cg.map_molecules(trj=trj, selection_list=[name_lists], bead_label_list=[label_lists], molecule_types=molecule_types) cg_trj.save(output_dir + output_traj) cg_trj[0].save(output_dir + output_top) #actual map command cg_id_trj = cg.map_identical_molecules(trj=trj, selection_list=name_lists, bead_label_list=label_lists) cg_id_trj.save(output_dir + output_id_traj) cg_id_trj[0].save(output_dir + output_id_top) ############################### check results ############################### # reloading results from disk.
#names of cg beads created. label_lists = ['DPH', 'DPM', 'DPT'] ############################### run ######################################## ### pull in trajectories trj = md.load(input_dir + input_traj, top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #actual map command cg_trj = cg.map_molecules(trj=trj, selection_list=[name_lists], bead_label_list=[label_lists], molecule_types=molecule_types, split_shared_atoms=False) cg_trj.save(output_dir + output_traj) cg_trj[0].save(output_dir + output_top) ############################### check results ############################### # reloading results from disk. cg_traj = cg_trj.load(output_dir + output_traj, top=output_dir + output_top) ref_cg_traj = cg_trj.load(reference_dir + reference_traj, top=reference_dir + reference_top) result = check.md_content_equality(cg_traj, ref_cg_traj) sys.exit(check.check_result_to_exitval(result))
############################### run native ############################### ### pull in trajectories trj = md.load(input_dir + input_traj,top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #preprocess trajectory content by adding new parts for a in trj.top.atoms: a.charge = 0 #actual map command cg_trj = cg.map_molecules( trj = trj, selection_list = [ name_lists ], bead_label_list = [ label_lists ], molecule_types = molecule_types, mapping_function = 'center') cg_trj.save(output_dir + output_traj_native) cg_trj[0].save(output_dir + output_top_native) ############################### run null mass ############################ ### pull in trajectories trj = md.load(input_dir + input_traj,top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #preprocess trajectory content by adding new parts
############################### run null mass ############################ ### pull in trajectories trj = md.load(input_dir + input_traj,top=input_dir + input_top) #the types of each molecule in the trajectory. molecule_types = [lipid_types.index(r.name) for r in trj.top.residues] #preprocess trajectory content by adding new parts for a in trj.top.atoms: a.element = Element.getBySymbol('H') #actual map command call_params = cg.map_molecules( trj = trj, selection_list = [ name_lists ], bead_label_list = [ label_lists ], molecule_types = molecule_types, mapping_function = 'com', return_call = True) cg_trj = cg.cg_by_index(call_params[0],call_params[1],call_params[2], mapping_function=call_params[3]['mapping_function']) cg_trj.save(output_dir + output_traj_null_mass) cg_trj[0].save(output_dir + output_top_null_mass) ############################### check results ############################### # reloading results from disk. cg_traj_null_mass = cg_trj.load(output_dir + output_traj_null_mass, top=output_dir + output_top_null_mass)