scine_chemoton.reaction_rules.polarization_rules¶
Classes
|
Polarization rule for the Pauli electronegativity scale. |
|
A rule that assigns polarizations (+, -, or +-) to each atom based on given molecules |
|
An array of logically 'and' connected rules. |
|
A dictionary holding elements as keys and a respective PolarizationRule for it. |
- class scine_chemoton.reaction_rules.polarization_rules.PaulingElectronegativityRule(min_difference=0.4)[source]¶
Polarization rule for the Pauli electronegativity scale.
- Attributes:
- min_differencefloat
The minimum difference in electronegativities to assign a polarization. Default: 0.4 (avoids polarization of C–H bonds)
- string_from_rule(molecules, idx_map, elements, atom_index)[source]¶
Return ‘+’ if the atom is electron poor, ‘-’ if it is electron rich, some combination thereof if the atom is neighbouring elements with significantly higher and lower electronegativity, and ‘’ if it is neighbouring neither.
- Return type:
- class scine_chemoton.reaction_rules.polarization_rules.PolarizationBaseRule(*args, **kwargs)[source]¶
A rule that assigns polarizations (+, -, or +-) to each atom based on given molecules
- abstract string_from_rule(molecules, idx_map, elements, atom_index)[source]¶
Method to be implemented for each rule, giving back a polarization character for atom_index in multiple molecules
- Return type:
- Parameters:
- moleculesList[masm.Molecule]
A list of molassembler molecules representing the total system
- idx_mapList[Tuple[int, int]]
An index map generated by molassembler that allows to map the atom_index to the atom in the molecules
- elementsList[str]
A list of all elements
- atom_indexint
The index we want the polarization of
- Returns:
- polarization_charstr
Either ‘+’, ‘-’, or ‘+-’
- class scine_chemoton.reaction_rules.polarization_rules.PolarizationFunctionalGroupRule(polarization_char, distance_rule)[source]¶
-
- string_from_rule(molecules, idx_map, elements, atom_index)[source]¶
Method to be implemented for each rule, giving back a polarization character for atom_index in multiple molecules
- Return type:
- Parameters:
- moleculesList[masm.Molecule]
A list of molassembler molecules representing the total system
- idx_mapList[Tuple[int, int]]
An index map generated by molassembler that allows to map the atom_index to the atom in the molecules
- elementsList[str]
A list of all elements
- atom_indexint
The index we want the polarization of
- Returns:
- polarization_charstr
Either ‘+’, ‘-’, or ‘+-’
- class scine_chemoton.reaction_rules.polarization_rules.PolarizationRuleAndArray(rules=None)[source]¶
An array of logically ‘and’ connected rules.
- Parameters:
- rulesOptional[List[PolarizationBaseRule]]
A list of Polarization rules that all may add a character.
- string_from_rule(*args, **kwargs)[source]¶
Method to be implemented for each rule, giving back a polarization character for atom_index in multiple molecules
- Return type:
- Parameters:
- moleculesList[masm.Molecule]
A list of molassembler molecules representing the total system
- idx_mapList[Tuple[int, int]]
An index map generated by molassembler that allows to map the atom_index to the atom in the molecules
- elementsList[str]
A list of all elements
- atom_indexint
The index we want the polarization of
- Returns:
- polarization_charstr
Either ‘+’, ‘-’, or ‘+-’
- class scine_chemoton.reaction_rules.polarization_rules.PolarizationRuleSet(kwargs)[source]¶
A dictionary holding elements as keys and a respective PolarizationRule for it. All keys are checked for valid element types. Lists as values are automatically transformed to an PolarizationRuleAndArray.
- clear() None. Remove all items from D. ¶
- copy()¶
- classmethod fromkeys(iterable, value=None)¶
- get(k[, d]) D[k] if k in D, else d. d defaults to None. ¶
- items() a set-like object providing a view on D's items ¶
- keys() a set-like object providing a view on D's keys ¶
- pop(k[, d]) v, remove specified key and return the corresponding value. ¶
If key is not found, d is returned if given, otherwise KeyError is raised.
- popitem() (k, v), remove and return some (key, value) pair ¶
as a 2-tuple; but raise KeyError if D is empty.
- setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D ¶
- update([E, ]**F) None. Update D from mapping/iterable E and F. ¶
If E present and has a .keys() method, does: for k in E: D[k] = E[k] If E present and lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k, v in F.items(): D[k] = v
- values() an object providing a view on D's values ¶