Exemple #1
0
  args = vars(argParser.parse_args())

  if args['version']:
    print("{}".format(version[1:]))
    sys.exit(0)

  # Checking if multiple fragmentation specifications where given
  if args['fragSize'] != (-1) and (args['fragments'] != "" or args['detailedFrag']):
    msg = "Please do not specify fragments manually when using the --fragSize option."
    printError(msg)

  if args['fragments'] and args['detailedFrag']:
    msg = "Please only use one of --fragments or --detailedFrag, not both"
    printError(msg)

  o.calcHydr  = path.abspath(args['exe'])
  o.REMOPath  = path.abspath(args['REMOdir'])
  o.runDir    = os.getcwd()

  # Generate temprary directory
  if args['inData'] == "":
    checkPathExists(args['tmpDir'])
    o.tmpPath   = tempfile.mkdtemp(dir=path.abspath(args['tmpDir']), prefix="HYCUD_")
  else:
    o.tmpPath   = cwd

  if not path.isdir(o.tmpPath):
    msg = "{} is not a valid directory".format(o.tmpPath)
    printError(msg)
  if args['fragments'] == "" and args['detailedFrag'] == "" and args['fragSize'] == (-1):
    fragSize = default_fragmentSize