Skip to content

Commit

Permalink
Regex fixes in cp2k
Browse files Browse the repository at this point in the history
  • Loading branch information
ladinesa committed Nov 23, 2023
1 parent 7a5ee66 commit bc2d715
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions electronicparsers/cp2k/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def str_to_information(val_in):
geometry_optimization_quantities = [
Quantity(
'method',
r'\*{3}\s*((?:CONJUGATE GRADIENTS|L-BFGS|BFGS))\s*\*{3}', flatten=False),
r'\*{3}\s*((?:CONJUGATE GRADIENTS|L\-BFGS|BFGS))\s*\*{3}', flatten=False),
Quantity(
'self_consistent',
r'SCF WAVEFUNCTION OPTIMIZATION([\s\S]+?)OPTIMIZ', repeats=False,
Expand Down Expand Up @@ -642,7 +642,7 @@ def str_to_information(val_in):
sub_parser=TextParser(quantities=scf_wavefunction_optimization_quantities)),
Quantity(
'geometry_optimization',
r'STARTING GEOMETRY OPTIMIZATION([\s\S]+?(?:GEOMETRY OPTIMIZATION COMPLETED|\Z))',
r'STARTING.+?OPTIMIZATION([\s\S]+?(?:OPTIMIZATION COMPLETED|\Z))',
sub_parser=TextParser(quantities=geometry_optimization_quantities)),
Quantity(
'molecular_dynamics',
Expand Down Expand Up @@ -680,7 +680,7 @@ def str_to_information(val_in):
# TODO add restart find example
Quantity(
'quickstep',
r'\.\.\. make the atoms dance([\s\S]+?(?:\-{79}\s*\-|\Z))',
r'\.\.\. make the atoms dance([\s\S]+?(?:\-{79}\s*\- +\-|\Z))',
sub_parser=TextParser(quantities=quickstep_quantities)),
Quantity('spin_polarized', r'\| Spin unrestricted \(spin\-polarized\) Kohn\-Sham calculation *([a-zA-Z]+)', repeats=False),
Quantity(
Expand Down

0 comments on commit bc2d715

Please sign in to comment.