def METHOD_NAME(self):
    f = open(self.specs['template_script'], 'r')
    content = f.read()
    f.close()
    params = self.specs
    # Error check
    if params.isValid('mpi_procs') and params.isValid('total_mpi_procs'):
        print "ERROR: 'mpi_procs' and 'total_mpi_procs' are exclusive.  Only specify one!"
        sys.exit(1)
    # Do a few PBS job size calculations
    if params.isValid('mpi_procs'):
        params['mpi_procs_per_chunk'] = params['mpi_procs']
    elif params.isValid('total_mpi_procs'):
        params['mpi_procs_per_chunk'] = str(int(params['total_mpi_procs']) / int(params['chunks']))  # Need some more error checking here
    else:
        print "ERROR: You must specify either 'mpi_procs' or 'total_mpi_procs'"
        sys.exit(1)
    if params.isValid('threads'):
        threads = int(params['threads'])
    else:
        threads = 1
    params['ncpus_per_chunk'] = str(int(params['mpi_procs_per_chunk']) * threads)
    # Soft Link output requires several substitutions in the template file
    soft_link1 = ''
    soft_link2 = ''
    soft_link3 = ''
    if params['soft_link_output'] == 'True':
        soft_link1 = '#PBS -koe'
        soft_link2 = 'ln -s $HOME/$PBS_JOBNAME.o$JOB_NUM $PBS_JOBNAME.o$JOB_NUM\nln -s $HOME/$PBS_JOBNAME.e$JOB_NUM $PBS_JOBNAME.e$JOB_NUM'
        soft_link3 = 'rm $PBS_JOBNAME.o$JOB_NUM\nmv $HOME/$PBS_JOBNAME.o$JOB_NUM $PBS_JOBNAME.o$JOB_NUM\nmv $HOME/$PBS_JOBNAME.e$JOB_NUM $PBS_JOBNAME.e$JOB_NUM'
    # Add substitutions on the fly
    params.addStringSubParam('soft_link1', 'SOFT_LINK1', soft_link1, 'private')
    params.addStringSubParam('soft_link2', 'SOFT_LINK2', soft_link2, 'private')
    params.addStringSubParam('soft_link3', 'SOFT_LINK3', soft_link3, 'private')
    f = open(os.path.split(params['template_script'])[1], 'w')
    # Do all of the replacements for the valid parameters
    for param in params.valid_keys():
        if param in params.substitute:
            params[param] = params.substitute[param].replace(param.upper(), params[param])
        content = content.replace('<' + param.upper() + '>', str(params[param]))
    # Make sure we strip out any string substitution parameters that were not supplied
    for param in params.substitute_keys():
        if not params.isValid(param):
            content = content.replace('<' + param.upper() + '>', '')
    f.write(content)
    f.close()