Ejemplo n.º 1
0
        prefix,
        prefix,
        prefix,
    )

    if opt.rst_wt:
        cmd_str += " -ref %s" % args[1]

    pbs_job.add_command(cmd_str)

    # If we just want to print the jobfile
    if opt.jobfile:
        pbs_job.print_submit(opt.jobfile)

    elif opt.ask:
        pbs_job.submit_ask(after_job=opt.jobid)

    else:
        pbs_job.submit(after_job=opt.jobid)
else:

    cmd_str = ("%s -i %s.min.mdin -p %s -c %s -r %s.min.rst7 -o %s.min.mdout " + "-inf %s.min.mdinfo -suffix %s") % (
        prog_str,
        prefix,
        args[0],
        args[1],
        prefix,
        prefix,
        prefix,
        prefix,
    )
Ejemplo n.º 2
0
              opt.label, prefix, opt.label, prefix, opt.label, prefix)

   if opt.rst_wt:
      cmd_str += " -ref %s" % args[1]
   if len(args) == 3:
      cmd_str += " -cpin %s -cpout %s.%s.cpout -cprestrt %s.%s.cpin" % (args[2],
         prefix, opt.label, prefix, opt.label)
   
   pbs_job.add_command(cmd_str)
   
   # If we just want to print the jobfile
   if opt.jobfile:
      pbs_job.print_submit(opt.jobfile)
   
   elif opt.ask:
      pbs_job.submit_ask(after_job=opt.jobid)
   
   else:
      pbs_job.submit(after_job=opt.jobid)
else:
   
   cmd_str = ("%s -i %s.%s.mdin -p %s -c %s -r %s.%s.rst7 -o %s.%s." +
              "mdout -inf %s.%s.mdinfo -x %s.%s.nc -suffix %s") % (prog_str,
              prefix, opt.label, args[0], args[1], prefix, opt.label, prefix, 
              opt.label, prefix, opt.label, prefix, opt.label, prefix)

   if opt.rst_wt:
      cmd_str += " -ref %s" % args[1]
   if len(args) == 3:
      cmd_str += " -cpin %s -cpout %s.%s.cpout -cprestrt %s.%s.cpin" % (args[2],
         prefix, opt.label, prefix, opt.label)
Ejemplo n.º 3
0
    opt.path = path.join(getenv('%sroot' % opt.version))

if not path.exists(args[0]):
    print >> sys.stderr, "Error: Gaussian input file %s doesn't exist!" % args[
        1]
    sys.exit()

# Create the gaussian PBSjob instance
gaussjob = PBS_Script(name=opt.name, template=opt.template)
gaussjob.set_proc_count([1])

# Source the resource file
if not path.exists(path.join(opt.path, 'bsd', '%s.profile' % opt.version)):
    print >> sys.stderr, 'Error: Missing %sprofile script! Looked in %s' % (
        opt.version, path.join(opt.path, 'bsd'))
    sys.exit(1)

gaussjob.add_command('source %s' %
                     (path.join(opt.path, 'bsd', '%s.profile' % opt.version)))

gaussjob.add_command(opt.version + ' ' + args[0])

# Set a random name if no name had been set
if not opt.name: gaussjob.set_name()

# Do we ask permission before submitting the job or just submit it?
if opt.jobfile: gaussjob.print_submit(opt.jobfile)
elif not opt.force: gaussjob.submit_ask()
else:
    gaussjob.submit()
Ejemplo n.º 4
0
if not opt.path:
   opt.path = path.join(getenv('%sroot' % opt.version))

if not path.exists(args[0]):
   print >> sys.stderr, "Error: Gaussian input file %s doesn't exist!" % args[1]
   sys.exit()

# Create the gaussian PBSjob instance
gaussjob = PBS_Script(name=opt.name, template=opt.template)
gaussjob.set_proc_count([1])

# Source the resource file
if not path.exists(path.join(opt.path, 'bsd', '%s.profile' % opt.version)):
   print >> sys.stderr, 'Error: Missing %sprofile script! Looked in %s' % (
            opt.version, path.join(opt.path, 'bsd'))
   sys.exit(1)

gaussjob.add_command('source %s' % (path.join(opt.path, 'bsd', '%s.profile' % 
                     opt.version)))

gaussjob.add_command(opt.version + ' ' + args[0])

# Set a random name if no name had been set
if not opt.name: gaussjob.set_name()

# Do we ask permission before submitting the job or just submit it?
if opt.jobfile: gaussjob.print_submit(opt.jobfile)
elif not opt.force: gaussjob.submit_ask()
else: gaussjob.submit()