rgpycrumbs.chemgp.match_atoms¶
Match atoms in structure file to target coordinates.
CLI for matching target coordinates to closest atoms in a structure file. Useful for identifying atom IDs in eOn calculations.
Added in version 1.7.0: Extracted from rgpycrumbs._aux to standalone CLI script.
Attributes¶
Functions¶
|
Parse multiline string of target coordinates. |
|
Match target coordinates to closest atoms in structure. |
|
Match target coordinates to closest atoms in a structure. |
Module Contents¶
- rgpycrumbs.chemgp.match_atoms.DEFAULT_TARGET_COORDS = Multiline-String[source]¶
Show Value
""" 19.7267 23.4973 21.4053 21.6919 21.7746 21.7746 19.7274 21.4053 23.4968 21.6918 21.7752 25.2201 21.6915 25.2205 21.7761 18.0999 23.4978 23.4978 19.7265 25.5905 23.4985 21.6915 25.2206 25.2206 22.7758 23.4966 23.4983 20.6077 23.4982 23.4977 19.7268 23.4982 25.5902 23.6566 21.4042 23.4962 23.6566 23.4979 21.4058 23.6561 25.5897 23.4984 23.6566 23.4984 25.5906 25.2834 23.4976 23.4978 """
- rgpycrumbs.chemgp.match_atoms.parse_target_coords(text_block: str) numpy.ndarray[source]¶
Parse multiline string of target coordinates.
Parameters¶
- text_block
Multiline string with space-separated x y z coordinates
Returns¶
- np.ndarray
Array of shape (n, 3) with target coordinates
- rgpycrumbs.chemgp.match_atoms.match_atoms(structure_file: pathlib.Path, target_coords: numpy.ndarray) list[dict][source]¶
Match target coordinates to closest atoms in structure.
Parameters¶
- structure_file
Path to structure file (any ASE-readable format)
- target_coords
Array of target coordinates to match
Returns¶
- list[dict]
List of match results with atom info and distances
- rgpycrumbs.chemgp.match_atoms.main(structure_file: pathlib.Path, target_file: pathlib.Path | None, target_coords: str, output: pathlib.Path | None)[source]¶
Match target coordinates to closest atoms in a structure.
Reads a structure file and finds the closest atoms to specified target coordinates. Useful for identifying atom IDs in eOn calculations.