def test_set_protonate_amber(tmp_path): gmx.show_log() ########################################## # ## Create the topologie at PH 4.0 ### ########################################## res_prot_dict = { 'GLH': { 'res_num': [9, 24, 31, 57] }, 'ASH': { 'res_num': [3, 70] }, 'HIP': { 'res_num': [28, 35] }, 'HID': { 'res_num': [175] }, 'HIE': { 'res_num': [214] } } prot = gmx.GmxSys(name='1RXZ_ph4', coor_file=PDB_1RXZ) prot.prepare_top(out_folder=os.path.join(tmp_path, 'top_1RXZ_ph4'), ph=7.0, res_prot_dict=res_prot_dict, ff="amber99sb-ildn") top_coor = pdb_manip.Coor(prot.coor_file) assert top_coor.num == 4081 top_1RXZ = gmx.TopSys(prot.top_file) assert top_1RXZ.charge() == -4
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) 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, 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_insert_peptide_vsite(tmp_path): # Gromacs verions >= 2021 support cyclic peptides gmx.show_log() cyclic_pep = gmx.GmxSys(name='5vav', coor_file=PDB_5VAV) top_coor = pdb_manip.Multi_Coor(cyclic_pep.coor_file) assert top_coor.coor_list[0].num == 209 cyclic_pep.cyclic_peptide_top( out_folder=os.path.join(tmp_path, 'cyclic/top')) top_coor = pdb_manip.Coor(cyclic_pep.coor_file) assert top_coor.num == 209 cyclic_top = gmx.TopSys(cyclic_pep.top_file) assert cyclic_top.prot_res_num() == 14 cyclic_top.display() cyclic_pep.em(out_folder=os.path.join(tmp_path, 'cyclic/em/'), nsteps=10, create_box_flag=True) cyclic_amber_pep = gmx.GmxSys(name='5vav_amber', coor_file=PDB_5VAV) top_coor = pdb_manip.Coor(cyclic_pep.coor_file) assert top_coor.num == 209 cyclic_amber_pep.cyclic_peptide_top(out_folder=os.path.join( tmp_path, 'cyclic/top'), ff='amber99sb-ildn') top_coor = pdb_manip.Coor(cyclic_pep.coor_file) assert top_coor.num == 209 cyclic_amber_top = gmx.TopSys(cyclic_amber_pep.top_file) print(cyclic_amber_top.charge()) cyclic_amber_pep.em(out_folder=os.path.join(tmp_path, 'cyclic/em/'), nsteps=10, create_box_flag=True)
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) 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) 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