schrodinger.application.xtb.textparser module¶
- exception schrodinger.application.xtb.textparser.XTBParseError¶
Bases:
Exception
- class schrodinger.application.xtb.textparser.TextParser¶
Bases:
object
- callback = {re.compile('\\* xtb version (?P<version>.*) compiled by'): <function version>, re.compile('\\s+\\| TOTAL ENERGY\\s+(-?\\d+\\.\\d+) Eh'): <function energy>, re.compile('\\s+\\| TOTAL FREE ENERGY\\s+(-?\\d+\\.\\d+) Eh'): <function free_energy>, re.compile('\\*\\*\\* FAILED TO CONVERGE GEOMETRY OPTIMIZATION'): <function opt_success>, re.compile('^normal termination'): <function status>, re.compile('\\[ERROR\\]'): <function error_message>}¶
- __init__()¶
- parse(xtb_output, file_iter)¶
Parse the provided file iterator.
Return an XTBOutput instance populated with properties parsed from the output file.
- Parameters
xtb_output – XTBOutput instance to populate
file_iter – Opened file iterator of the xTB output log
- Raises
StopIteration – In cases of unexpected file termination
XTBParseError – For parsing errors
- static finalize(xtb_out)¶
Additional settings after parsing completes successfully
- schrodinger.application.xtb.textparser.callback(regexp, parser_class=<class 'schrodinger.application.xtb.textparser.TextParser'>)¶
- schrodinger.application.xtb.textparser.version(tp, xtb_out, m, it)¶
- schrodinger.application.xtb.textparser.energy(tp, xtb_out, m, it)¶
- schrodinger.application.xtb.textparser.free_energy(tp, xtb_out, m, it)¶
- schrodinger.application.xtb.textparser.opt_success(tp, xtb_out, m, it)¶
- schrodinger.application.xtb.textparser.status(tp, xtb_out, m, it)¶
- schrodinger.application.xtb.textparser.error_message(tp, xtb_out, m, it)¶
Fetch the error message from a failing xtb job.