Example #1
0
File: main.py Project: 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
Example #2
0
File: main.py Project: mdav2/optavc
# 2. build an options object
from optavc.options import Options
options_kwargs = {
    'template_file_path': "template.json",
    'energy_regex':
    r"\d+\w+-\d+.\d+\w+0.\d+\w+\d+.\d+\n\w*\n    * SCF iteration converged.\n",
    'success_regex': "",
    'program': "BAGEL",
    'input_name': "input.json",
    'output_name': "output.dat",
    'submitter': submit,
    'maxiter': 20,
    'findif': {
        'points': 3
    }
}
options_obj = Options(**options_kwargs)

from optavc.template import TemplateFileProcessor
tfp = TemplateFileProcessor(open('template.json').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('Ran succesfully')