Esempio n. 1
0
File: main.py Progetto: mdav2/optavc
              output=optns.output_name,
              sync=True)


# 2. build an options object
from optavc.options import Options
options_kwargs = {
    'template_file_path': "template.dat",
    'energy_regex': r"@DF-RHF Final Energy:\s+(-\d+\.\d+)",
    'success_regex': r"\*\*\* P[Ss][Ii]4 exiting successfully.",
    'queue': "gen4.q",
    'program': "psi4@master",
    'input_name': "input.dat",
    'output_name': "output.dat",
    'submitter': submit
}
options_obj = Options(**options_kwargs)

from optavc.template import TemplateFileProcessor
tfp = TemplateFileProcessor(open("template.dat").read(), options_obj)

from optavc.singlepoint import SinglePoint
singlepoint_obj = SinglePoint(tfp.molecule,
                              tfp.input_file_object,
                              options_obj,
                              path="SP")
singlepoint_obj.write_input()
singlepoint_obj.run()
print(singlepoint_obj.get_energy_from_output()
      )  # currently, you need to enter DISP2 and run the input
Esempio n. 2
0
def submit(optns):
    vq.submit(optns.queue,
              optns.program,
              input=optns.input_name,
              output=optns.output_name,
              sync=True)


# 2. build an options object
options_kwargs = {
    'template_file_path': "template.json",
    'energy_regex': Bagel_regex.mrci,
    'success_regex': "",
    'queue': "gen4.q",
    'program': "bagel@master",
    'input_name': "input.json",
    'output_name': "output.dat",
    'submitter': submit,
    'maxiter': 20,
}
options_obj = Options(**options_kwargs)

tfp = TemplateFileProcessor(open('template.json').read(), options_obj)
singlepoint_obj = SinglePoint(tfp.molecule,
                              tfp.input_file_object,
                              options_obj,
                              path="SP")
singlepoint_obj.write_input()
singlepoint_obj.run()
print(singlepoint_obj.get_energy_from_output())