params["trajfile"] = traj_file if args.start_frame: start_frame = int(args.start_frame) params["start_frame"] = start_frame if args.end_frame: end_frame = int(args.end_frame) params["end_frame"] = end_frame if args.benchmark: params["benchmark"] = True if not (os.path.exists(coord_file) and os.path.exists(top_file)): parser.print_help() print("\nPlease supply the name of an existing topology and coordinate file.") if not os.path.exists(coord_file): print("(cannot find coordinate file %s)" % coord_file) if not os.path.exists(top_file): print("(cannot find topology file %s)" % top_file) sys.exit(-1) if not (os.path.exists(traj_file)): parser.print_help() print("\nPlease supply the name of an existing trajectory file.") sys.exit(-1) print("\nRunning nautilus-traj2cell.py using files %s, %s and %s " % (top_file, coord_file, traj_file) ) Nautilus.traj2cell(params)
if args.gridforces: gridforces = args.gridforces params["gridforces"] = gridforces elif "gridforces" in params: gridforces = params["gridforces"] else: gridforces = "grid.forces" params["gridforces"] = gridforces if args.R: R = float(args.R) params["R"] = R else: R = 6 params["R"] = R if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces)): parser.print_help() print( "\nPlease supply the name of an existing grid force file and coordinates" ) if not os.path.exists(gridforces): print("(cannot find grid file %s)" % gridforces) sys.exit(-1) print("\nRunning nautilus-subgrids.py using file %s" % (gridforces)) Nautilus.subgrids(params)
if args.avggridfiles: print(args.avggridfiles) avggridfiles = ast.literal_eval(str(args.avggridfiles)) params["avggridfiles"] = avggridfiles else: parser.print_help() print("\nNo grid files to average specified") sys.exit(-1) if args.avgdx: grid2 = args.avgdx params["avgdx"] = avgdx elif "avgdx" in params: avgdx = params["avgdx"] else: avgdx = "avg.dx" params["avgdx"] = avgdx if args.benchmark: params["benchmark"] = True if not (os.path.exists(avggridfiles[0])): parser.print_help() print("\nPlease supply the names of relevant dx files.") if not os.path.exists(avggridfiles[0]): print("(cannot find dx files %s)" % (avggridfiles[0])) sys.exit(-1) print("\nRunning nautilus-avggrids.py using list of files %s" % (avggridfiles)) Nautilus.avggrids(params)
print (args.avggridfiles) avggridfiles = ast.literal_eval(str(args.avggridfiles)) params["avggridfiles"] = avggridfiles else: parser.print_help() print ("\nNo grid files to average specified") sys.exit(-1) if args.avgdx: grid2 = args.avgdx params["avgdx"] = avgdx elif "avgdx" in params: avgdx = params["avgdx"] else: avgdx = "avg.dx" params["avgdx"] = avgdx if args.benchmark: params["benchmark"] = True if not (os.path.exists(avggridfiles[0])): parser.print_help() print("\nPlease supply the names of relevant dx files.") if not os.path.exists(avggridfiles[0]): print("(cannot find dx files %s)" % (avggridfiles[0])) sys.exit(-1) print("\nRunning nautilus-avggrids.py using list of files %s" % (avggridfiles) ) Nautilus.avggrids(params)
if args.start_frame: start_frame = int(args.start_frame) params["start_frame"] = start_frame if args.end_frame: end_frame = int(args.end_frame) params["end_frame"] = end_frame if args.benchmark: params["benchmark"] = True if not (os.path.exists(coord_file) and os.path.exists(top_file)): parser.print_help() print( "\nPlease supply the name of an existing topology and coordinate file." ) if not os.path.exists(coord_file): print("(cannot find coordinate file %s)" % coord_file) if not os.path.exists(top_file): print("(cannot find topology file %s)" % top_file) sys.exit(-1) if not (os.path.exists(traj_file)): parser.print_help() print("\nPlease supply the name of an existing trajectory file.") sys.exit(-1) print("\nRunning nautilus-traj2cell.py using files %s, %s and %s " % (top_file, coord_file, traj_file)) Nautilus.traj2cell(params)
elif "gridl" in params: gridl = params["gridl"] else: gridl = "gridl.dx" params["gridl"] = gridl if args.diffdx: diffdx = args.diffdx params["diffdx"] = diffdx elif "diffdx" in params: diffdx= params["diffdx"] else: diffdx = "diff.dx" params["diffdx"] = diffdx if args.benchmark: params["benchmark"] = True #print (params) if not (os.path.exists(gridf) and os.path.exists(gridl)): parser.print_help() print("\nPlease supply the names of an dx files to be subtracted.") if not os.path.exists(os.path.exists(gridf) and os.path.exists(gridl)): print("(cannot find dx files %s %s)" % (gridf, gridl)) sys.exit(-1) print("\nRunning nautilus-subgrids.py using files %s %s" % (gridf, gridl) ) Nautilus.subgrids(params)
gridforces = params["gridforces"] else: gridforces = "grid.forces" params["gridforces"] = gridforces if args.regionfile: regionfile = args.regionfile params["regionfile"] = regionfile elif "regionfile" in params: regionfile = params["regionfile"] else: regionfile = "all.region" params["regionfile"] = regionfile if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces) and os.path.exists(regionfile)): parser.print_help() print("\nPlease supply the name of an existing grid and region file.") if not os.path.exists(regionfile): print("cannot find region file %s" % regionfile) if not os.path.exists(gridforces): print("cannot find grid file %s" % gridforces) sys.exit(-1) #print (params,args) print("\nRunning nautilus-regionproperties.py using files %s and %s" % (gridforces, regionfile) ) Nautilus.regionproperties(params)
gridforces = params["gridforces"] else: gridforces = "grid.forces" params["gridforces"] = gridforces if args.regionfile: regionfile = args.regionfile params["regionfile"] = regionfile elif "regionfile" in params: regionfile = params["regionfile"] else: regionfile = "all.region" params["regionfile"] = regionfile if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces) and os.path.exists(regionfile)): parser.print_help() print("\nPlease supply the name of an existing grid and region file.") if not os.path.exists(regionfile): print("cannot find region file %s" % regionfile) if not os.path.exists(gridforces): print("cannot find grid file %s" % gridforces) sys.exit(-1) #print (params,args) print("\nRunning nautilus-regionproperties.py using files %s and %s" % (gridforces, regionfile)) Nautilus.regionproperties(params)
if args.R: R = float(args.R) params["R"] = R else: R = 10 params["R"] = R if args.center: center = ast.literal_eval(center) params["center"] = center elif "center" in params: center = parms["center"] else: print("Using grid center specified in config file") if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces)): parser.print_help() print( "\nPlease supply the name of an existing grid force file and a center coordinate and the distance from it" ) if not os.path.exists(gridforces): print("(cannot find grid file %s)" % gridforces) sys.exit(-1) print("\nRunning nautilus-boxgrid.py using file %s" % (gridforces)) Nautilus.boxgrid(params)
print("Loading configuration information from file %s" % args.config) params = readParams(args.config) if args.cell_dir: cell_dir = args.cell_dir params["cell_dir"] = cell_dir elif "cell_dir" in params: cell_dir = params["cell_dir"] else: cell_dir = "cell" params["cell_dir"] = cell_dir if args.start_frame: start_frame = int(args.start_frame) params["start_frame"] = start_frame if args.end_frame: end_frame = int(args.end_frame) params["end_frame"] = end_frame if args.benchmark: params["benchmark"] = True if not (os.path.exists(cell_dir)): parser.print_help() print("\nPlease supply the cell file directory, it is missing") sys.exit(-1) print("\nRunning nautilus-cell2grid.py using files %s " % (cell_dir)) Nautilus.cell2grid(params)
if args.R: R = float(args.R) params["R"] = R else: R = 10 params["R"] = R if args.center: center = ast.literal_eval(center) params["center"] = center elif "center" in params: center = parms["center"] else: print ("Using grid center specified in config file") if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces)): parser.print_help() print("\nPlease supply the name of an existing grid force file and a center coordinate and the distance from it") if not os.path.exists(gridforces): print("(cannot find grid file %s)" % gridforces) sys.exit(-1) print("\nRunning nautilus-boxgrid.py using file %s" % (gridforces) ) Nautilus.boxgrid(params)
if args.gridforces: gridforces = args.gridforces params["gridforces"] = gridforces elif "gridforces" in params: gridforces = params["gridforces"] else: gridforces = "grid.forces" params["gridforces"] = gridforces if args.neighcut: neighcut = float(args.neighcut) params["neighcut"] = neighcut if args.lowt: lowt = float(args.lowt) params["lowt"] = lowt if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces)): parser.print_help() print("\nPlease supply the name of an existing grid force file.") if not os.path.exists(gridforces): print("(cannot find grid file %s)" % gridforces) sys.exit(-1) print("\nRunning nautilus-clustergrids.py using file %s" % (gridforces) ) Nautilus.clustergrids(params)
if args.gridforces: gridforces = args.gridforces params["gridforces"] = gridforces elif "gridforces" in params: gridforces = params["gridforces"] else: gridforces = "grid.forces" params["gridforces"] = gridforces if args.neighcut: neighcut = float(args.neighcut) params["neighcut"] = neighcut if args.lowt: lowt = float(args.lowt) params["lowt"] = lowt if args.benchmark: params["benchmark"] = True if not (os.path.exists(gridforces)): parser.print_help() print("\nPlease supply the name of an existing grid force file.") if not os.path.exists(gridforces): print("(cannot find grid file %s)" % gridforces) sys.exit(-1) print("\nRunning nautilus-clustergrids.py using file %s" % (gridforces)) Nautilus.clustergrids(params)
params = readParams(args.config) if args.cell_dir: cell_dir = args.cell_dir params["cell_dir"] = cell_dir elif "cell_dir" in params: cell_dir = params["cell_dir"] else: cell_dir= "cell" params["cell_dir"] = cell_dir if args.start_frame: start_frame = int(args.start_frame) params["start_frame"] = start_frame if args.end_frame: end_frame = int(args.end_frame) params["end_frame"] = end_frame if args.benchmark: params["benchmark"] = True if not (os.path.exists(cell_dir)): parser.print_help() print("\nPlease supply the cell file directory, it is missing") sys.exit(-1) print("\nRunning nautilus-cell2grid.py using files %s " % (cell_dir) ) Nautilus.cell2grid(params)