Coverage for cosmolayer / parser / dmol3.py: 100%
7 statements
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-11 14:25 +0000
« prev ^ index » next coverage.py v7.13.4, created at 2026-03-11 14:25 +0000
1"""DMol-3 COSMO file parser.
3This module provides functions to parse COSMO output files from DMol-3.
4"""
6import re
8from .common import ( # noqa: F401
9 ATOM_INFO_SCHEMA,
10 ATOM_ROW_REGEX,
11 SEGMENT_INFO_SCHEMA,
12 SEGMENT_POSITION_CONVERSION_FACTOR,
13 SEGMENT_ROW_REGEX,
14)
16SEGMENT_SECTION_REGEX = re.compile(
17 r"Segment information:.*?n\s+atom\s+position.*?potential\s*\n+((?:"
18 + SEGMENT_ROW_REGEX.pattern
19 + r"(?:\n|$))+)",
20 re.MULTILINE | re.DOTALL,
21)
23ATOM_SECTION_REGEX = re.compile(
24 r"Molecular car file\s*:.*?!DATE[^\n]*\n((?:"
25 + ATOM_ROW_REGEX.pattern
26 + r"(?:\n|$))+)",
27 re.MULTILINE | re.DOTALL,
28)
30VOLUME_REGEX = re.compile(r"Total volume of cavity \(A\*\*3\)\s*=\s*(\d+(?:\.\d+)?)")
32ATOM_POSITION_CONVERSION_FACTOR = 1.0
33VOLUME_CONVERSION_FACTOR = 1.0