scine_chemoton.gears.elementary_steps.trial_generator.bond_based

Classes

BondBased()

Class to generate reactive complex calculations via bond-based approaches.

class scine_chemoton.gears.elementary_steps.trial_generator.bond_based.BondBased[source]

Class to generate reactive complex calculations via bond-based approaches.

Attributes:
optionsBondBased.Options

The options for generating reactive complex calculations.

reactive_site_filterReactiveSiteFilter

The filter applied to determine reactive sites, reactive pairs and trial reaction coordinates.

class Options(parent=None)[source]

The options for bond-based reactive complex enumeration.

class BimolOptions[source]

The options for the generation and exploration of bimolecular reactions.

NOTE: The minimum and maximum bounds regarding the number of bonds to be modified/formed/broken have to be understood as strict limitations. If different options are in conflict with each other the stricter limit is applied. For example, if you set max_bond_dissociations to 2 but max_bond_modifications to 1 you will never get a trial reaction coordinate containing two dissociations.

complex_generator
InterReactiveComplexes

The generator used for the composition of reactive complexes.

job: Job
db.Job (Scine::Database::Calculation::Job)

The Job used to evaluate the elementary step trial calculations. The default is: the scine_react_complex_nt2 order on a single core.

job_settings: ValueCollection
Dict[str, Union[bool, int, float]]

Additional settings added to the elementary step trial calculation. Empty by default.

max_bond_dissociations
int

The maximum number of bond dissociations to be encouraged simultaneously during an elementary step trial calculation. By default 1.

max_bond_modifications
int

The maximum number of bond modifications (formation or dissociation) to be encouraged simultaneously during an elementary step trial calculation. By default 1.

max_inter_bond_formations
int

The maximum number of bond formations between the two reactants to be encouraged simultaneously during an elementary step trial calculation. More than two intermolecular bond formations are currently not supported. By default 1.

max_intra_bond_formations
int

The maximum number of bond formations to be encouraged simultaneously during an elementary step trial calculation. By default 0.

min_bond_dissociations
int

The minimum number of intramolecular bond dissociations to be encouraged simultaneously during an elementary step trial calculation. By default 0.

min_bond_modifications
int

The minimum number of bond modifications (formation or dissociation) to be encouraged simultaneously during an elementary step trial calculation. By default 1.

min_inter_bond_formations
int

The minimum number of bond formations between the two reactants to be encouraged simultaneously during an elementary step trial calculation. Has to be equal or greater than 1. By default 1.

min_intra_bond_formations
int

The minimum number of intramolecular bond formations to be encouraged simultaneously during an elementary step trial calculation. By default 0.

minimal_spin_multiplicity
bool

Whether to assume max spin recombination, thus assuming minimal resulting spin, or take combination of input spin multiplicities. (default: False) True: | multiplicity1 - multiplicity2 | - 1 False: sum(multiplicities) - 1

unset_collections()

Duplicate name to HoldCollections method to be triggered in pickling process, so infinite _parent loops are avoided.

Return type:

None

class UnimolOptions[source]

The options for the generation and exploration of unimolecular reactions.

job: Job
db.Job (Scine::Database::Calculation::Job)

The Job used to evaluate the possible reactions. Jobs with the order scine_react_complex_nt2 are supported. The default is: the scine_react_complex_nt2 order on a single core.

job_settings_associative: ValueCollection
utils.ValueCollection

Additional settings passed to Calculation evaluating the possible reactions. These settings are passed to all calculations that are expected to result in the formations of at least one bond, i.e., that at least one of the reactive atom pairs is not bound in the start structure. Empty by default.

job_settings_disconnective: ValueCollection
utils.ValueCollection

Additional settings passed to Calculation evaluating the possible reactions. These settings are passed to all calculations for which all of the reactive atom pairs are bound in the start structure and cutting them apart would result into at least two separate molecules. Empty by default.

job_settings_dissociative: ValueCollection
utils.ValueCollection

Additional settings passed to Calculation evaluating the possible reactions. These settings are passed to all calculations for which all of the reactive atom pairs are bound in the start structure but cutting them apart would not result into two separate molecules. Empty by default.

max_bond_dissociations
int

The maximum number of bond dissociations to be encouraged simultaneously during an elementary steps trial calculation. By default 1.

max_bond_formations
int

The maximum number of bond formations to be encouraged simultaneously during an elementary step trial calculation. By default 1.

max_bond_modifications
int

The maximum number of bond modifications (formation or dissociation) to be encouraged simultaneously during an elementary step trial calculation. By default 1.

min_bond_dissociations
int

The minimum number of bond dissociations to be encouraged simultaneously during an elementary steps trial calculation. By default 1.

min_bond_formations
int

The minimum number of bond formations to be encouraged simultaneously during an elementary step trial calculation. By default 1.

min_bond_modifications
int

The minimum number of bond modifications (formation or dissociation) to be encouraged simultaneously during an elementary step trial calculation. By default 1.

unset_collections()

Duplicate name to HoldCollections method to be triggered in pickling process, so infinite _parent loops are avoided.

Return type:

None

base_job_settings: ValueCollection
bimolecular_options: BimolOptions
BimolOptions

The options for reactions involving two molecules, that are set up to be associative in nature.

model: db.Model
results_enabling_policy: Optional[EnableJobSpecificCalculations]
unimolecular_options: UnimolOptions
UnimolOptions

The options for reactions involving a single molecule.

unset_collections()

Duplicate name to HoldCollections method to be triggered in pickling process, so infinite _parent loops are avoided.

Return type:

None

bimolecular_coordinates(structure_list, with_exact_settings_check=False)[source]

Returns the reaction coordinates allowed for bimolecular reactions for the given structures based on the set options and filters. This method does not set up new calculations. The returned object is a list of dictionary. The keys are a tuple containing a reaction coordinates and the number of dissociations. The values hold a list of instructions. Each entry in this list allows to construct a reactive complex. Therefore, the number of reactive complexes per reaction coordinate can also be inferred.

Return type:

Dict[Tuple[List[Tuple[int, int]], int], List[Tuple[ndarray, ndarray, float, float]]]

Parameters:
structure_listList[db.Structure]

List of the two structures to be considered. The Structures have to be linked to a database.

with_exact_settings_checkbool

If True, more expensive queries are carried out to check if the settings of the calculations are exactly the same as the settings of the trial generator. This allows to add more inclusive additional reaction trials but the queries are less efficient, therefore this option should be only toggled if necessary.

Notes

The index basis (total system or separate systems) of the returned indices in the reaction coordinates varies between different implementations!

bimolecular_reactions(structure_list, with_exact_settings_check=False)[source]

Creates reactive complex calculations corresponding to the bimolecular reactions between the structures if there is not already a calculation to search for a reaction of the same structures with the same job order.

Parameters:
structure_listList[db.Structure]

List of the two structures to be considered. The Structures have to be linked to a database.

with_exact_settings_checkbool

If True, more expensive queries are carried out to check if the settings of the calculations are exactly the same as the settings of the trial generator. This allows to add more inclusive additional reaction trials but the queries are less efficient, therefore this option should be only toggled if necessary.

clear_cache()[source]
estimate_n_bimolecular_trials(structure_file1, structure_file2, attack_points_per_site=3, n_inter_reactive_pairs=None, n_reactive_bound_pairs1=None, n_reactive_unbound_pairs1=None, n_reactive_bound_pairs2=None, n_reactive_unbound_pairs2=None)[source]

Estimates the number of bimolecular reactive coordinate trials expected to arise directly (i.e. as single step elementary reaction trials) from the given structures without taking reactive site filters into account. If the number of reactive pairs shall be limited for this estimate, specify n_inter_reactive_pairs, n_reactive_bound_pairs and/or n_reactive_unbound_pairs. Note that this method only estimates the number of trials but is not necessarily resulting in the exact number that would be generated by the trial generator: The structures connectivities are perceived from interatomic distances. Multiple attack points are not calculated from the structure’s geometry but only included based on a fixed input value (attack_points_per_site). The number of rotamers is not accounted for correctly for intermolecular coordinates involving two reactive pairs with one monoatomic fragment.

Note: The number of trials increases quickly with the number of allowed

bond modifications. Be aware!

Parameters:
structure_file1str

An xyz or mol file with the structure of interest.

structure_file2str

An xyz or mol file with the structure of interest.

attack_points_per_siteint

The number of attack points per intermolecular reactive site to consider if multiple attack points are enabled in the reactive complex generator. Note that these will not be calculated from the structures’ geometries in this estimator. By default 3.

n_inter_reactive_pairsint, optional

The number of intermolecular reactive pairs to consider. If None, all interstructural atom pairs are included.

n_reactive_bound_pairs1int, optional

The number of bound reactive pairs in the first structure to consider. If None, all bound atom pairs of structure 1 are included.

n_reactive_bound_pairs2int, optional

The number of bound reactive pairs in the second structure to consider. If None, all bound atom pairs of structure 2 are included.

n_reactive_unbound_pairs1int, optional

The number of unbound reactive pairs in the first structure to consider. If None, all unbound atom pairs are included.

n_reactive_unbound_pairs2int, optional

The number of unbound reactive pairs in the second structure to consider. If None, all unbound atom pairs are included.

Returns:
int

The number of reactive trial coordinates expected to arise from this structure.

estimate_n_unimolecular_trials(structure_file, n_reactive_bound_pairs=None, n_reactive_unbound_pairs=None)[source]

Estimates the number of unimolecular reactive coordinate trials expected to arise directly (i.e. as single step elementary reaction trials) from the given structure without taking reactive site filters into account. If the number of reactive pairs shall be limited for this estimate, specify n_reactive_bound_pairs and/or n_reactive_unbound_pairs. The structure’s connectivity is perceived from interatomic distances.

Note: The number of trials increases quickly with the number of allowed

bond modifications. Be aware!

Parameters:
structure_filestr

An xyz or mol file with the structure of interest.

n_reactive_bound_pairsint, optional

The number of bound reactive pairs to consider. If None, all bound atom pairs are included.

n_reactive_unbound_pairsint, optional

The number of unbound reactive pairs to consider. If None, all unbound atom pairs are included.

Returns:
int

The number of reactive trial coordinates expected to arise from this structure.

get_bimolecular_job_order()[source]
Return type:

str

get_unimolecular_job_order()[source]
Return type:

str

initialize_collections(manager)
Return type:

None

options: Options
static possible_attributes()
Return type:

List[str]

unimolecular_coordinates(structure, with_exact_settings_check=False)[source]

Returns the reaction coordinates allowed for unimolecular reactions for the given structure based on the set options and filters. This method does not set up new calculations. The returned object is a list of tuple. The first argument in the tuple is a list of reaction coordinates. The second argument in the tuple is the number of dissociations.

Return type:

List[Tuple[List[List[Tuple[int, int]]], int]]

Parameters:
structuredb.Structure

The structure to be considered. The Structure has to be linked to a database.

with_exact_settings_checkbool

If True, more expensive queries are carried out to check if the settings of the calculations are exactly the same as the settings of the trial generator. This allows to add more inclusive additional reaction trials but the queries are less efficient, therefore this option should be only toggled if necessary.

unimolecular_reactions(structure, with_exact_settings_check=False)[source]

Creates reactive complex calculations corresponding to the unimolecular reactions of the structure if there is not already a calculation to search for a reaction of the same structure with the same job order.

Parameters:
structuredb.Structure

The structure to be considered. The Structure has to be linked to a database.

with_exact_settings_checkbool

If True, more expensive queries are carried out to check if the settings of the calculations are exactly the same as the settings of the trial generator. This allows to add more inclusive additional reaction trials but the queries are less efficient, therefore this option should be only toggled if necessary.

unset_collections()
Return type:

None