enforce_required_zmatrix_coordinates
enforce_required_zmatrix_coordinates(zm, required_coordinates=None, root_coordinates=None, isolated_coordinates=None, reparent_isolated_coordinates=True, reparent_root_coordinates=True, validate=False):
LLM Docstring
Reparent a Z-matrix tree so requested bonds, angles, and dihedrals occur as row parent prefixes.
Already satisfied constraints are retained. Isolated coordinates can first be prevented from serving as references for unrelated rows, and root coordinates can be promoted into the initial embedding chain. Missing required coordinates are then tried in both orientations by replacing candidate parent prefixes through _adjust_zm_parents; all previously accepted constraints must remain valid. The result is returned in the same row representation as the input.
zm:Sequence[Sequence[int]] | dictZ-matrix rows or tree mapping.
required_coordinates:Sequence[Sequence[int]] | NoneCoordinates that must appear in either orientation.
root_coordinates:Sequence[Sequence[int]] | NoneCoordinates preferentially incorporated into the initial chain.
isolated_coordinates:Sequence[Sequence[int]] | NoneCoordinates whose endpoint atoms should not become unrelated parents.
reparent_isolated_coordinates:boolRemove isolated-coordinate endpoints as references where alternatives exist.
reparent_root_coordinates:boolAttempt to move root coordinates into the root chain.
validate:boolEnable duplicate-parent and intermediate-tree checks.
:returns:list[list[int]] | dictReparented Z-matrix in the original input representation.