iphasimulator.trajectory_centering
Index-file helpers for reusable GROMACS centering groups.
Attributes
Classes
Parsed GROMACS index groups, preserving group order. |
|
Result from creating or reusing a dedicated centering index. |
Functions
|
Read a GROMACS |
|
Write a GROMACS index file with stable 15-atom line wrapping. |
|
Return source groups for a workflow, filtering to groups present in the index. |
|
Merge one or more index groups into a sorted unique atom list. |
|
Create or reuse a GROMACS index file containing a dedicated |
Module Contents
- iphasimulator.trajectory_centering.GROUP_HEADER_PATTERN
- iphasimulator.trajectory_centering.DEFAULT_CENTER_GROUP = 'center'
- iphasimulator.trajectory_centering.WORKFLOW_CENTER_SOURCES: dict[str, tuple[str, ...]]
- class iphasimulator.trajectory_centering.GromacsIndex
Parsed GROMACS index groups, preserving group order.
- groups: dict[str, tuple[int, ...]]
- property names: tuple[str, ...]
- has_group(name: str) bool
- group(name: str) tuple[int, ...]
- class iphasimulator.trajectory_centering.CenterIndexResult
Result from creating or reusing a dedicated centering index.
- index_path: pathlib.Path
- center_group: str
- source_groups: tuple[str, ...]
- created: bool
- reused_existing_center: bool
- iphasimulator.trajectory_centering.read_index(index_path: str | pathlib.Path) GromacsIndex
Read a GROMACS
.ndxfile into named atom groups.
- iphasimulator.trajectory_centering.write_index(index: GromacsIndex, index_path: str | pathlib.Path) pathlib.Path
Write a GROMACS index file with stable 15-atom line wrapping.
- iphasimulator.trajectory_centering.resolve_center_source_groups(index: GromacsIndex, *, workflow_type: str = 'polymer', source_groups: tuple[str, ...] | list[str] | None = None) tuple[str, ...]
Return source groups for a workflow, filtering to groups present in the index.
- iphasimulator.trajectory_centering.merged_group_atoms(index: GromacsIndex, group_names: tuple[str, ...]) tuple[int, ...]
Merge one or more index groups into a sorted unique atom list.
- iphasimulator.trajectory_centering.ensure_center_index(source_index: str | pathlib.Path, output_index: str | pathlib.Path | None = None, *, workflow_type: str = 'polymer', source_groups: tuple[str, ...] | list[str] | None = None, center_group: str = DEFAULT_CENTER_GROUP) CenterIndexResult
Create or reuse a GROMACS index file containing a dedicated
centergroup.Existing
[ center ]groups are reused. Otherwise the group is generated from the workflow source groups, currentlyPHAfor polymer-only systems.