Coverage for cosmolayer / parser / turbomole.py: 100%

5 statements  

« prev     ^ index     » next       coverage.py v7.13.4, created at 2026-03-11 14:25 +0000

1import re 

2 

3from .common import ( # noqa: F401 

4 ATOM_INFO_SCHEMA, 

5 ATOM_POSITION_CONVERSION_FACTOR, 

6 ATOM_ROW_REGEX, 

7 SEGMENT_INFO_SCHEMA, 

8 SEGMENT_POSITION_CONVERSION_FACTOR, 

9 SEGMENT_ROW_REGEX, 

10 VOLUME_CONVERSION_FACTOR, 

11) 

12 

13SEGMENT_SECTION_REGEX = re.compile( 

14 rf"^\$segment_information\b.*?\n((?:{SEGMENT_ROW_REGEX.pattern}(?:\n|$))+)", 

15 re.MULTILINE | re.DOTALL, 

16) 

17 

18ATOM_SECTION_REGEX = re.compile( 

19 rf"\$coord_car\b.*?\n((?:{ATOM_ROW_REGEX.pattern}(?:\n|$))+)", 

20 re.MULTILINE | re.DOTALL, 

21) 

22 

23VOLUME_REGEX = re.compile(r"volume=\s+(\d+(?:\.\d+)?)")