def test_protonate_ph4_7_amber(tmp_path): gmx.show_log() ########################################## # ## Create the topologie at PH 4.0 ### ########################################## prot = gmx.GmxSys(name='1RXZ_ph4', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph4'), ph=4.0, ff="amber99sb-ildn") top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4108 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == 23 ########################################## # ## Create the topologie at PH 7.0 ### ########################################## prot = gmx.GmxSys(name='1RXZ_ph7', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph7'), ph=7.0, ff="amber99sb-ildn") top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4073 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == -12 ########################################## # ## Create the topologie at PH 10.0 ### ########################################## # Remark: Amber allow lysine unprotonated prot = gmx.GmxSys(name='1RXZ_ph10', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph10'), ph=10.0, ff="amber99sb-ildn") top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4071 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == -14
def test_protonate_ph4_7_12_charmm(tmp_path): gmx.show_log() ########################################## # ## Create the topologie at PH 4.0 ### ########################################## prot = gmx.GmxSys(name='1RXZ_ph4', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph4'), ph=4.0) top_coor = pdb_manip.Coor(prot.coor_file) top_1RXZ = gmx.TopSys(prot.top_file) if (version.parse(pdb2pqr.__version__) < version.parse("3.5")): assert top_coor.num == 4107 assert top_1RXZ.charge() == 22 else: assert top_coor.num == 4106 assert top_1RXZ.charge() == 21 ########################################## # ## Create the topologie at PH 7.0 ### ########################################## prot = gmx.GmxSys(name='1RXZ_ph7', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph7'), ph=7.0) top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4073 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == -12 ########################################## # ## Create the topologie at PH 10.0 ### ########################################## # Remark: Charmm doesn't allow lysine unprotonated prot = gmx.GmxSys(name='1RXZ_ph10', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph10'), ph=10.0) top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4073 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == -12
type=str, required=True) parser.add_argument('-vsite', action="store_true", dest="vsite_flag", help='Use virtual site for hydrogens') return parser if __name__ == "__main__": my_parser = parser_input() args = my_parser.parse_args() if args.vsite_flag: vsite = "hydrogens" else: vsite = "none" sys_name = args.f.split("/")[-1][:-4] md_sys = gmx.GmxSys(name=sys_name, coor_file=args.f) md_sys.prepare_top(out_folder=args.o, vsite=vsite) md_sys.create_box(dist=1.0, box_type="dodecahedron", check_file_out=True) print( "\n\nTopologie creation was sucessfull \n\tTopologie directorie :\t" + args.o) md_sys.display()
'default=0', type=float, default=0) parser.add_argument('-gpu_id', action="store", dest="gpuid", help='List of GPU device id-s to use, default=\"\" ', default="None") return parser if __name__ == "__main__": my_parser = parser_input() args = my_parser.parse_args() dt = args.dt nsteps = 1000 * args.time / dt sys_prod = gmx.GmxSys() sys_prod.nt = args.nt sys_prod.ntmpi = args.ntmpi if args.gpuid != "None": sys_prod.gpu_id = args.gpuid sys_prod.extend_equi_prod(args.tpr, nsteps=nsteps) print("\n\nProduction extension was sucessfull ") sys_prod.display()
type=float, default=0) parser.add_argument('-gpu_id', action="store", dest="gpuid", help='List of GPU device id-s to use, default=\"\" ', default="None") return parser if __name__ == "__main__": my_parser = parser_input() args = my_parser.parse_args() sys_min = gmx.GmxSys(name=args.name, coor_file=args.f, top_file=args.p) sys_min.nt = args.nt sys_min.ntmpi = args.ntmpi if args.gpuid != "None": sys_min.gpu_id = args.gpuid sys_min.em_2_steps(out_folder=args.o, name=args.name, no_constr_nsteps=args.min_steps, constr_nsteps=args.min_steps, posres="", create_box_flag=args.box) sys_min.convert_trj(traj=False) print("\n\nMinimisation was sucessfull \n\tMinimzed directory :\t" + args.o)
help='Number of molecule to insert', type=int, default=20) parser.add_argument('-o', action="store", dest="o", help='Output Directory') parser.add_argument('-n', action="store", dest="name", help='Output file name') return parser if __name__ == "__main__": my_parser = parser_input() args = my_parser.parse_args() sys_raw = gmx.GmxSys(name=args.name, coor_file=args.f_sys, top_file=args.p_sys) mol_gmx = gmx.GmxSys(name="mol", coor_file=args.f_mol, top_file=args.p_mol) sys_raw.display() mol_gmx.display() sys_raw.insert_mol_sys(mol_gromacs=mol_gmx, mol_num=args.num_mol, new_name=args.name, out_folder=args.o, check_file_out=True) print("\n\nInsertion was sucessfull \n\tSystem directory :\t" + args.o + "\n\tsystem coor file:\t" + sys_raw.coor_file + "\n\tsystem top file:\t" + sys_raw.top_file)
parser.add_argument('-o', action="store", dest="o", help='Output Directory', type=str, required=True) parser.add_argument('-m_steps', action="store", dest="min_steps", help='Minimisation nsteps, default=1000', type=int, default=1000) parser.add_argument('-time', action="store", dest="time", help='Vacuum equilibration time(ns), default = 1ns', type=float, default=1) return parser if __name__ == "__main__": my_parser = parser_input() args = my_parser.parse_args() dt = 0.001 step = 1000 * args.time / dt sequence = args.seq out_folder = args.o em_nsteps = args.min_steps peptide = gmx.GmxSys(name='pep_' + sequence) peptide.create_peptide(sequence=sequence, out_folder=out_folder, em_nsteps=em_nsteps, equi_nsteps=step) print("\n\nPeptide Creation was sucessfull \n\tPeptide directorie :\t" + args.o) peptide.display()
args = parser.parse_args() # General args: dt = args.dt out_folder = args.o sys_name = args.name maxwarn = args.maxwarn vsite = "hydrogens" # Peptide args: sequence = args.seq em_nsteps = args.em_steps pep_step = 1000 * args.pep_time / dt # Create peptide: peptide = gmx.GmxSys(name='pep_' + sequence) peptide.nt = args.nt peptide.ntmpi = args.ntmpi if args.gpuid != "None": peptide.gpu_id = args.gpuid peptide.create_peptide(sequence=sequence, out_folder=out_folder + "/" + sequence, em_nsteps=em_nsteps, equi_nsteps=pep_step, posre_post="_pep", vsite=vsite) peptide.display() # Starting system args: coor_sys = args.f_sys
maxwarn = args.maxwarn min_steps = args.min_steps dt_HA = args.dt_HA dt = args.dt HA_step = 1000 * args.HA_time / dt_HA CA_step = 1000 * args.CA_time / dt CA_LOW_step = 1000 * args.CA_LOW_time / dt prot_top_folder = args.o + "/top_prot/" prot_min_folder = args.o + "/em_prot/" sys_top_folder = args.o + "/top_sys/" sys_em_equi_folder = args.o + "/em_equi_sys/" if args.p != "None": prot_sys = gmx.GmxSys(name=sys_name, coor_file=args.f, top_file=args.p) else: prot_sys = gmx.GmxSys(name=sys_name, coor_file=args.f) prot_sys.nt = args.nt prot_sys.ntmpi = args.ntmpi if args.gpuid != "None": prot_sys.gpu_id = args.gpuid if args.p == "None": prot_sys.prepare_top(out_folder=prot_top_folder, vsite=vsite) prot_sys.create_box(dist=1.0, box_type="dodecahedron", check_file_out=True) prot_sys.em_2_steps(out_folder=prot_min_folder, name=sys_name, no_constr_nsteps=min_steps,