Exemple #1
0
nproc = [int(i) for i in nproc]
parallel = False
for n in nproc:
    if n > 1:
        parallel = True

# Set up the command string

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:
Exemple #2
0
# Set up the command string

if parallel:
   if len(args) == 2:
      if opt.cuda: prog_str = '%s pmemd.cuda.MPI -O' % mpi_cmd
      else: prog_str = '%s pmemd.MPI -O ' % mpi_cmd
   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]
Exemple #3
0
    sys.exit(1)

if not opt.version in ('g09', 'g03'):
    print >> sys.stderr, 'Error: Gaussian version must be g03 or g09!'
    sys.exit(1)

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()
Exemple #4
0
   parser.print_help()
   sys.exit(1)

if not opt.version in ('g09', 'g03'):
   print >> sys.stderr, 'Error: Gaussian version must be g03 or g09!'
   sys.exit(1)

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()