def main(argv=None): # Parse arguments parser = ap.build_getcontact_parser(__doc__, True) args = parser.parse_args(argv) top = args.topology traj = args.trajectory output = args.output cores = args.cores ligand = args.ligand solv = args.solv lipid = args.lipid sele1 = args.sele sele2 = args.sele2 beg = args.beg end = args.end if args.end else sys.maxsize stride = args.stride distout = args.distout geom_criteria = process_geometric_criterion_args(args) # If sele2 is None set it to sele1 if sele2 is None: sele2 = sele1 # Check interaction types all_itypes = ["hp", "sb", "pc", "ps", "ts", "vdw", "hb"] if "all" in args.itypes: itypes = all_itypes else: for itype in args.itypes: if itype not in all_itypes: parser.error(itype + " is not a valid interaction type") itypes = args.itypes # Begin computation tic = datetime.datetime.now() compute_contacts(top, traj, output, itypes, geom_criteria, cores, beg, end, stride, distout, ligand, solv, lipid, sele1, sele2) toc = datetime.datetime.now() total_time = (toc - tic).total_seconds() print("\nTotal computation time:", total_time, "seconds") print("topology=%s" % top) print("trajectory=%s" % traj) print("output=%s" % output) print("cores=%s" % cores) print("solv=%s" % solv) print("sele=%s" % sele1) print("sele2=%s" % sele2) print("stride=%s" % stride)
def main(argv=None): # Parse arguments parser = ap.build_getcontact_parser(__doc__, False) args, unknown = parser.parse_known_args(argv) top = args.structure traj = args.structure output = args.output cores = 1 solv = args.solv lipids = args.lipids sele1 = args.sele sele2 = args.sele2 beg = 0 end = 0 stride = 1 geom_criteria = process_geometric_criterion_args(args) # If sele2 is None set it to sele1 if sele2 is None: sele2 = sele1 # Check interaction types all_itypes = ["hp", "sb", "pc", "ps", "ts", "vdw", "hb", "lhb"] if "all" in args.itypes: itypes = all_itypes else: for itype in args.itypes: if itype not in all_itypes: parser.error(itype + " is not a valid interaction type") itypes = args.itypes # Begin computation tic = datetime.datetime.now() compute_contacts(top, traj, output, itypes, geom_criteria, cores, beg, end, stride, solv, lipids, sele1, sele2) toc = datetime.datetime.now() print("\nTotal computation time: " + str((toc - tic).total_seconds()) + " seconds") print("topology=%s" % top) print("trajectory=%s" % traj) print("output=%s" % output) print("solv=%s" % solv) print("sele=%s" % sele1) print("sele2=%s" % sele2)
def main(argv=None): # Parse arguments parser = ap.build_getcontact_parser(__doc__, False) args, unknown = parser.parse_known_args(argv) top = args.structure traj = args.structure output = args.output cores = 1 ligand = args.ligand solv = args.solv sele = args.sele beg = 0 end = 0 stride = 1 geom_criterion_values = process_geometric_criterion_args(args) # Check interaction types all_itypes = ["sb", "pc", "ps", "ts", "vdw", "hb", "lhb"] if "all" in args.itypes: itypes = all_itypes else: for itype in args.itypes: if itype not in all_itypes: parser.error(itype + " is not a valid interaction type") itypes = args.itypes # Begin computation tic = datetime.datetime.now() compute_contacts(top, traj, output, itypes, geom_criterion_values, cores, beg, end, stride, solv, sele, ligand) toc = datetime.datetime.now() print("\nTotal computation time: " + str((toc - tic).total_seconds()) + " seconds") print("topology=%s" % top) print("trajectory=%s" % traj) print("output=%s" % output) print("cores=%s" % cores) print("ligand=%s" % ",".join(ligand)) print("solv=%s" % solv) print("sele=%s" % sele) print("stride=%s" % stride)