Ejemplo n.º 1
0
def run_atomdb(executable, lot, atom_numbers, options, directory="."):
    old_directory = os.getcwd()
    if not os.path.isdir(directory):
        os.makedirs(directory)
    os.chdir(directory)
    log.set_verbose(options.verbose)
    program = Gaussian(executable, options)
    dirnames = make_inputs(program, lot, atom_numbers, options.max_ion)
    run_jobs(program, dirnames)
    select_ground_states(program, options.max_ion)
    make_density_profiles(
        program,
        options.lebedev, options.rlow*angstrom, options.rhigh*angstrom,
        options.num_steps, atom_numbers, options.max_ion, options.do_work,
        options.do_random,
    )
    os.chdir(old_directory)
Ejemplo n.º 2
0
    def __init__(self, filename, options):
        log.set_verbose(options.verbose)
        log.begin("Loading Electronic structure")
        self.wavefn = load_wavefunction(filename)
        self.wavefn.log()
        log.end()
        self.options = options

        outdir = "%s.hipart" % self.wavefn.prefix
        if options.do_output:
            self.output = Output(outdir, self.wavefn.molecule.numbers)
        else:
            self.output = Output()

        if options.do_work:
            workdir = os.path.join(outdir, "work")
        else:
            workdir = None
        self.work = Work(workdir, do_clean=options.do_clean)
Ejemplo n.º 3
0
def run_atomdb(executable, lot, atom_numbers, options, directory="."):
    old_directory = os.getcwd()
    if not os.path.isdir(directory):
        os.makedirs(directory)
    os.chdir(directory)
    log.set_verbose(options.verbose)
    program = Gaussian(executable, options)
    dirnames = make_inputs(program, lot, atom_numbers, options.max_ion)
    run_jobs(program, dirnames)
    select_ground_states(program, options.max_ion)
    make_density_profiles(
        program,
        options.lebedev,
        options.rlow * angstrom,
        options.rhigh * angstrom,
        options.num_steps,
        atom_numbers,
        options.max_ion,
        options.do_work,
        options.do_random,
    )
    os.chdir(old_directory)