geom.gui.structure_generator

Programmatic structure generation helpers used by the native GUI.

Attributes

_GENERATION_LOCK

_CONVERSION_LOCK

GUI_TMP_ROOT

Classes

AtomRecord

StructureResult

Functions

supported_metals(→ list[str])

Return metals supported by GEOM, optionally filtered by crystal arrangement.

supported_atomistic_metals(→ list[str])

Return FCC/BCC metals supported by the bulk-lattice atomistic generators.

supported_fcc_metals(→ list[str])

Return FCC metals used by the ASE cluster generators.

generate_structure(→ StructureResult)

Run GEOM's existing CLI generator and return the newest generated XYZ file.

convert_molecule_to_xyz(→ pathlib.Path)

Convert a PDB/SMI-like molecule file to XYZ through GEOM's RDKit command path.

smiles_to_xyz(→ pathlib.Path)

Write a SMILES string into GEOM's GUI temp folder and convert it to XYZ.

manipulate_xyz(→ pathlib.Path)

Run an existing GEOM manipulation command in the GUI temp folder.

translate_pair_controlled_distance(...)

Run GEOM -t for two XYZ files, translating the second to a controlled distance.

cleanup_gui_tmp(→ None)

Remove GUI-generated temporary conversion files.

_xyz_snapshot(→ dict[pathlib.Path, int])

_newest_generated_xyz(→ pathlib.Path)

read_xyz(→ tuple[AtomRecord, Ellipsis])

Read the atom records from an XYZ file.

Module Contents

geom.gui.structure_generator._GENERATION_LOCK[source]
geom.gui.structure_generator._CONVERSION_LOCK[source]
geom.gui.structure_generator.GUI_TMP_ROOT[source]
class geom.gui.structure_generator.AtomRecord[source]
element: str[source]
x: float[source]
y: float[source]
z: float[source]
class geom.gui.structure_generator.StructureResult[source]
xyz_path: pathlib.Path[source]
atoms: tuple[AtomRecord, Ellipsis][source]
command: tuple[str, Ellipsis][source]
property atom_count: int[source]
geom.gui.structure_generator.supported_metals(arrangements: set[str] | None = None) list[str][source]

Return metals supported by GEOM, optionally filtered by crystal arrangement.

geom.gui.structure_generator.supported_atomistic_metals() list[str][source]

Return FCC/BCC metals supported by the bulk-lattice atomistic generators.

geom.gui.structure_generator.supported_fcc_metals() list[str][source]

Return FCC metals used by the ASE cluster generators.

geom.gui.structure_generator.generate_structure(command_args: list[str], output_root: pathlib.Path) StructureResult[source]

Run GEOM’s existing CLI generator and return the newest generated XYZ file.

geom.gui.structure_generator.convert_molecule_to_xyz(input_path: pathlib.Path) pathlib.Path[source]

Convert a PDB/SMI-like molecule file to XYZ through GEOM’s RDKit command path.

geom.gui.structure_generator.smiles_to_xyz(smiles: str) pathlib.Path[source]

Write a SMILES string into GEOM’s GUI temp folder and convert it to XYZ.

geom.gui.structure_generator.manipulate_xyz(input_path: pathlib.Path, command_args: Callable[[str], list[str]]) pathlib.Path[source]

Run an existing GEOM manipulation command in the GUI temp folder.

geom.gui.structure_generator.translate_pair_controlled_distance(fixed_path: pathlib.Path, moving_path: pathlib.Path, distance: float, axis: str) tuple[pathlib.Path, pathlib.Path][source]

Run GEOM -t for two XYZ files, translating the second to a controlled distance.

geom.gui.structure_generator.cleanup_gui_tmp() None[source]

Remove GUI-generated temporary conversion files.

geom.gui.structure_generator._xyz_snapshot(results_dir: pathlib.Path) dict[pathlib.Path, int][source]
geom.gui.structure_generator._newest_generated_xyz(results_dir: pathlib.Path, before: dict[pathlib.Path, int]) pathlib.Path[source]
geom.gui.structure_generator.read_xyz(path: pathlib.Path) tuple[AtomRecord, Ellipsis][source]

Read the atom records from an XYZ file.