def add_Atom_List(File): fr = open(File, "r") Atom_List = [] fl_read.read_pdb_file(fr, Atom_List) return Atom_List
def main(): # parse args parser = argparse.ArgumentParser(description="output the CHELPG grid points") parser.add_argument("FILE", nargs=1, help="input file(.pdb)") parser.add_argument("-o", "--output", nargs=1, dest="grid_path", default="grid.mpac", help="output file") args = parser.parse_args() # setting pdb_path = args.FILE[0] fr = open(pdb_path, "r") Atom_List = fl_read.read_pdb_file(fr) # calculation range_List = grid_chelpg.range_List(Atom_List) all_grid_List = grid_chelpg.CHELPG_List_all(range_List) chelpg_List = grid_chelpg.CHELPG_List(Atom_List, all_grid_List) # output fw_path = args.grid_path[0] fw = open(fw_path, "wb") data = {} data["atoms"] = Atom_List data["grids"] = chelpg_List packed = msgpack.packb(data) fw.write(packed) fw.close()
def main(): # parse args parser = argparse.ArgumentParser( description="output the CHELPG grid points") parser.add_argument("FILE", nargs=1, help="input file(.pdb)") parser.add_argument("-o", "--output", nargs=1, dest="grid_path", default="grid.mpac", help="output file") args = parser.parse_args() # setting pdb_path = args.FILE[0] fr = open(pdb_path, "r") Atom_List = fl_read.read_pdb_file(fr) # calculation range_List = grid_chelpg.range_List(Atom_List) all_grid_List = grid_chelpg.CHELPG_List_all(range_List) chelpg_List = grid_chelpg.CHELPG_List(Atom_List, all_grid_List) # output fw_path = args.grid_path[0] fw = open(fw_path, "wb") data = {} data["atoms"] = Atom_List data["grids"] = chelpg_List packed = msgpack.packb(data) fw.write(packed) fw.close()
def main(): # parse args parser = argparse.ArgumentParser(description="make data file") parser.add_argument("-a", "--atom", nargs=1, dest="atom_path", default=False) parser.add_argument("-g", "--grid", nargs=1, dest="grid_path", default=False) parser.add_argument("-m", "--mulliken", nargs=1, dest="mulliken_path", default=False) parser.add_argument( "-o", "--output", nargs=1, dest="data_path", ) # read the data fatom = open(args.atom_path[0], "r") Atom_List = fl_read.read_pdb_file(fatom) fgrid = open(args.grid_path[0], "rb") Grid_List = fl_read.read_grid_msg_file(fgrid) fesp = open(args.grid_path[0], "rb") ESP_List = fl_read.read_esp_msg_file(fesp) fmulliken = open(args.mulliken_path[0], "r") Mulliken_List = fl_read.read_mulliken_file(fmulliken) # calculate the data X = mkmat.matrixX(Atom_List, Grid_List) Y = mkmat.matrixY(Grid_List) # write the msgpack file fw_path = args.data_path[0] fw = open(fw_path, "wb") data = {} data["atoms"] = Atom_List data["grids"] = Grid_List data["ESP"] = ESP_List data["mulliken"] = Mulliken_List data["matrixX"] = np.array(X) data["matrixY"] = np.array(Y) data["net_charge"] = -2 data["Nelec"] = 3000 packed = msgpack.packb(data) fw.write(packed) fw.close()
def main(): # parse args parser = argparse.ArgumentParser(description="make data file") parser.add_argument("-a", "--atom", nargs=1, dest="atom_path", default=False) parser.add_argument("-g", "--grid", nargs=1, dest="grid_path", default=False) parser.add_argument("-m", "--mulliken", nargs=1, dest="mulliken_path", default=False) parser.add_argument("-o", "--output", nargs=1, dest="data_path",) # read the data fatom = open(args.atom_path[0], "r") Atom_List = fl_read.read_pdb_file(fatom) fgrid = open(args.grid_path[0], "rb") Grid_List = fl_read.read_grid_msg_file(fgrid) fesp = open(args.grid_path[0], "rb") ESP_List = fl_read.read_esp_msg_file(fesp) fmulliken = open(args.mulliken_path[0], "r") Mulliken_List = fl_read.read_mulliken_file(fmulliken) # calculate the data X = mkmat.matrixX(Atom_List, Grid_List) Y = mkmat.matrixY(Grid_List) # write the msgpack file fw_path = args.data_path[0] fw = open(fw_path, "wb") data = {} data["atoms"] = Atom_List data["grids"] = Grid_List data["ESP"] = ESP_List data["mulliken"] = Mulliken_List data["matrixX"] = np.array(X) data["matrixY"] = np.array(Y) data["net_charge"] = -2 data["Nelec"] = 3000 packed = msgpack.packb(data) fw.write(packed) fw.close()
def main(): # parse args parser = argparse.ArgumentParser(description="output the MK grid points") parser.add_argument("FILE", nargs=1, help="input file(.pdb)") parser.add_argument("-o", "--output", nargs=1, dest="grid_path", default="grid.mpac", help="output file") args = parser.parse_args() # setting pdb_path = args.FILE[0] fr = open(pdb_path, "r") Atom_List = fl_read.read_pdb_file(fr) # calculation All_Layer1 = grid_mk.generate_All_Grid_List(Atom_List, 1) All_Layer2 = grid_mk.generate_All_Grid_List(Atom_List, 2) All_Layer3 = grid_mk.generate_All_Grid_List(Atom_List, 3) All_Layer4 = grid_mk.generate_All_Grid_List(Atom_List, 4) Layer1 = grid_mk.position_check(Atom_List, All_Layer1, 1) Layer2 = grid_mk.position_check(Atom_List, All_Layer2, 2) Layer3 = grid_mk.position_check(Atom_List, All_Layer3, 3) Layer4 = grid_mk.position_check(Atom_List, All_Layer4, 4) Grid_List = Layer1 + Layer2 + Layer3 + Layer4 # output fw_path = args.grid_path[0] fw = open(fw_path, "wb") data = {} data["atoms"] = Atom_List data["grids"] = Grid_List packed = msgpack.packb(data) fw.write(packed) fw.close()