Legacy compatibility¶
vcsmd.compat is an isolated, one-way adapter for historical fixed-format
inputs and output directories. Imported data preserves available source fields
and provenance. Missing or damaged restart history remains partial and is not
represented as an exact native checkpoint.
- class vcsmd.compat.LegacyFormatError¶
Bases:
ValueErrorRaised when a historical input cannot be represented safely.
- class vcsmd.compat.ConversionReport(source, destination, available_data=(), missing_fields=(), malformed_records=(), limitations=(), native_files=(), source_files=(), provenance=<factory>, converted_steps=(), completion_status='complete')¶
Bases:
objectMachine-readable account of a legacy conversion.
sourceand the paths innative_files/source_filesare useful to the application while the conversion is running. Serializing viaas_dict()emits only relative names for the report itself, avoiding machine-specific paths in a run folder.- Parameters:
source (Path)
destination (Path)
available_data (tuple[str, ...])
missing_fields (tuple[str, ...])
malformed_records (tuple[str, ...])
limitations (tuple[str, ...])
native_files (tuple[Path, ...])
source_files (tuple[Path, ...])
provenance (Mapping[str, Any])
converted_steps (tuple[int, ...])
completion_status (str)
- source: Path¶
- destination: Path¶
- available_data: tuple[str, ...] = ()¶
- missing_fields: tuple[str, ...] = ()¶
- malformed_records: tuple[str, ...] = ()¶
- limitations: tuple[str, ...] = ()¶
- native_files: tuple[Path, ...] = ()¶
- source_files: tuple[Path, ...] = ()¶
- provenance: Mapping[str, Any]¶
- converted_steps: tuple[int, ...] = ()¶
- completion_status: str = 'complete'¶
- property problems: tuple[str, ...]¶
Missing data, malformed records, and known reliability limitations.
- as_dict()¶
Return a JSON-safe report with destination-relative file names.
- Return type:
dict[str, Any]
- vcsmd.compat.parse_legacy_input(text)¶
Parse one historical
inpfile into the native configuration dict.- Parameters:
text (str)
- Return type:
dict[str, Any]
- vcsmd.compat.import_legacy_input(path)¶
Read a historical input file and return its normalized native mapping.
A
ccontinuation imports geometry from its siblingiofile and starts with thermal initialization. Affollow input is refused: its historical state cannot be represented as a complete native checkpoint.- Parameters:
path (Path)
- Return type:
dict[str, Any]
- vcsmd.compat.split_legacy_examples(text)¶
Extract complete original examples from an
AllInput.txtdocument.The returned values preserve the original lines exactly through the final temperature/tolerance/timestep record. Separators and any later dormant tables are excluded. Blocks that do not parse as complete inputs are skipped rather than being presented as runnable configurations.
- Parameters:
text (str)
- Return type:
dict[int, str]
- vcsmd.compat.convert_legacy_run(source, destination)¶
Convert available historical outputs into native JSON/CSV datasets.
Missing tapes remain missing and malformed rows are listed in the report. In particular, a header-only
carfile produces a missing trajectory entry; no positions or cell vectors are invented from other observables.- Parameters:
source (Path)
destination (Path)
- Return type:
The compatibility guide describes recognized historical files, imported CSV schemas, and conversion limitations.