qrunch.chemistry.embedded_atoms.embedded_atoms_selector_protocols
Active site selection based on coordination environment changes and partial charge changes during a reaction.
Classes
Extends an existing embedded atoms selection with additional atoms. |
|
Identifies the core set of active atoms from a reaction. |
- class EmbeddedAtomsExtender
Bases:
ProtocolExtends an existing embedded atoms selection with additional atoms.
- __init__(*args, **kwargs)
- extend(active_indices: set[int], reaction: Reaction) set[int]
Return additional atom indices to include based on the current active set.
The returned set should contain all new atoms to add (not including the input set).
- Parameters:
active_indices (set[int]) – The current set of active atom indices.
reaction (Reaction) – The reaction being analyzed.
- Return type:
set[int]
- class PrimaryEmbeddedAtomsSelector
Bases:
ProtocolIdentifies the core set of active atoms from a reaction.
- __init__(*args, **kwargs)
- scores(reaction: Reaction, prepared_data: Sequence[PreparedRestrictedData] | Sequence[PreparedUnrestrictedData] | None = None, molecular_configurations: Sequence[MolecularConfiguration] | None = None) ndarray[tuple[Any, ...], dtype[float64]]
Compute a normalized per-atom score for the reaction.
The returned array has one entry per atom, with values in
[0.0, 1.0]where the highest-scoring atom is1.0. This shared scale lets the scores of different selectors be summed to rank atoms against one another, for example to enforce a maximum number of embedded atoms. This method is only consulted when the selection must be reduced to fitmax_number_of_embedded_atoms.- Parameters:
reaction (Reaction) – The reaction to analyze.
prepared_data (Sequence[PreparedRestrictedData] | Sequence[PreparedUnrestrictedData] | None) – Optional sequence of prepared data (one per reaction image) from the mean-field and localization stages. Required by selectors that depend on electronic structure information.
molecular_configurations (Sequence[MolecularConfiguration] | None) – Optional sequence of molecular configurations (one per reaction image). Required by selectors that need basis set information (e.g., for IAO construction).
- Return type:
ndarray[tuple[Any, …], dtype[float64]]
- select(reaction: Reaction, prepared_data: Sequence[PreparedRestrictedData] | Sequence[PreparedUnrestrictedData] | None = None, molecular_configurations: Sequence[MolecularConfiguration] | None = None) set[int]
Select the core active atom indices for the reaction.
- Parameters:
reaction (Reaction) – The reaction to analyze.
prepared_data (Sequence[PreparedRestrictedData] | Sequence[PreparedUnrestrictedData] | None) – Optional sequence of prepared data (one per reaction image) from the mean-field and localization stages. Required by selectors that depend on electronic structure information.
molecular_configurations (Sequence[MolecularConfiguration] | None) – Optional sequence of molecular configurations (one per reaction image). Required by selectors that need basis set information (e.g., for IAO construction).
- Return type:
set[int]