Exemple #1
0
if parallel:
    prog_str = "%s pmemd.MPI -O " % mpi_cmd
else:
    prog_str = "pmemd -O "

if opt.pbs:
    # Make the PBS_Script instance
    pbs_job = PBS_Script(template=opt.pbs_template)

    # Change the queue if desired
    if opt.pbs_queue:
        pbs_job.queue = opt.pbs_queue

    # Set the PBS job name
    pbs_job.set_name(opt.job_name)

    # Determine processor count
    nproc = opt.nproc.split(",")
    nproc = [int(i) for i in nproc]

    if not opt.pbs_nproc:
        pbs_nproc = nproc[:]
    else:
        pbs_nproc = opt.pbs_nproc.split(",")
        pbs_nproc = [int(i) for i in pbs_nproc]

    pbs_job.set_proc_count(pbs_nproc)

    # Set walltime
    pbs_job.set_walltime(opt.walltime)
Exemple #2
0
   else: prog_str = '%s sander.MPI -O ' % mpi_cmd
else: 
   if len(args) == 2:
      if opt.cuda: 'pmemd.cuda -O'
      else: prog_str = 'pmemd -O '
   else: prog_str = 'sander -O'

if opt.pbs:
   # Make the PBS_Script instance
   pbs_job = PBS_Script(template=opt.pbs_template)
   
   # Change the queue if desired
   if opt.pbs_queue: pbs_job.queue = opt.pbs_queue
   
   # Set the PBS job name
   pbs_job.set_name(opt.job_name)
   
   # Determine processor count
   nproc = opt.nproc.split(',')
   nproc = [int(i) for i in nproc]
   
   if not opt.pbs_nproc: pbs_nproc = nproc[:]
   else:
      pbs_nproc = opt.pbs_nproc.split(',')
      pbs_nproc = [int(i) for i in pbs_nproc]
   
   pbs_job.set_proc_count(pbs_nproc)
   
   # Set walltime
   pbs_job.set_walltime(opt.walltime)
   
Exemple #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()
Exemple #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()