scine_chemoton.reaction_rules.reaction_rule_library

Classes

AcetalX(x[, hetero_atoms])

Acetal at a distance of x bonds.

AllylicSp3X(x)

Allylic Sp^3 carbon at a distance of x bonds.

AmidH()

Amid H atom.

AmidX(x)

Amid group at a distance of x bonds.

AminX(x)

Amin group at a distance of x bonds.

AmmoniumX(x)

Ammonium N at a distance of x bonds.

CHOlefinC()

Olefinic carbon atoms with only H and C substituents.

CarbonylX(x[, hetero_atoms])

Carbonyl/imine group at a distance of x bonds.

CarboxylH()

Carboxyl H atom.

CarboxylX(x)

Carboxyl group at a distance of x bonds.

DefaultOrganicChemistry()

This is a collection of reaction rules that should cover most of organic chemistry.

SpNCX(x, n)

Sp^n hybridization of a carbon atom at a distance of x bonds.

class scine_chemoton.reaction_rules.reaction_rule_library.AcetalX(x, hetero_atoms=None)[source]

Acetal at a distance of x bonds. The acetal may have N substituents instead of only O.

Construct with a given distance and optional hetero atoms

Parameters:
xint

Distance in bonds.

hetero_atomsOptional[List[str]]

A list of hetero atoms that define the acetal carbon. Default [‘O’, ‘N’]

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.AllylicSp3X(x)[source]

Allylic Sp^3 carbon at a distance of x bonds. Note that this rule should only be used with x = 1 for H or x = 0 for C, because otherwise it may lead to unintended results since the rule does not ensure that the sp^2 and sp^3 carbon atoms are neighbours.

Construct with the given distance

Parameters:
xint

Distance in bonds.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.AmidH[source]

Amid H atom.

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules that have all to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.AmidX(x)[source]

Amid group at a distance of x bonds.

Construct with the given distance

Parameters:
xint

Distance in bonds.

filter_by_rule(molecules, idx_map, elements, atom_index)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.AminX(x)[source]

Amin group at a distance of x bonds.

Construct with the given distance

Parameters:
xint

Distance in bonds.

filter_by_rule(molecules, idx_map, elements, atom_index)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.AmmoniumX(x)[source]

Ammonium N at a distance of x bonds.

Construct with the given distance

Parameters:
xint

Distance in bonds.

filter_by_rule(molecules, idx_map, elements, atom_index)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.CHOlefinC[source]

Olefinic carbon atoms with only H and C substituents.

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules of which at least one has to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.CarbonylX(x, hetero_atoms=None)[source]

Carbonyl/imine group at a distance of x bonds.

Parameters:
xint

Distance in bonds.

hetero_atomsList[str]

A list of hetero atoms that define the carbonyl/imine carbon. Default [‘O’, ‘N’]

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules of which at least one has to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.CarboxylH[source]

Carboxyl H atom.

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules that have all to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.CarboxylX(x)[source]

Carboxyl group at a distance of x bonds.

Parameters:
xint

Distance in bonds.

Parameters:
distanceint

The bond distance to the functional group that must be matched.

central_atomstr

The central atom element symbol.

n_bondsTuple[int, int]

The minimum and maximum number of bonds to the central atom.

specified_bond_partnersDict[str, int]

An optional dictionary specifying the elements that further specify the reactive group by being directly bonded to the central atom together with how often they are bonded to the central atom. E.g. a carbonyl can be specified with the central atom O that has exactly 1 bond partner being C, while an ether group can be specified with the central atom O that has exactly 2 bond partner being C. In general, the choice of the central atom is arbitrary, i.e. both groups could also be specified with C being the central atom, see class description.

strict_countsbool

A flag specifying whether the specified bond partner counts must hold strictly (True) or constitute a minimum number (False). Default: False.

filter_by_rule(molecules, idx_map, elements, atom_index)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class scine_chemoton.reaction_rules.reaction_rule_library.DefaultOrganicChemistry[source]

This is a collection of reaction rules that should cover most of organic chemistry.

class C[source]

Collection of organic chemistry reaction rules for carbon atoms.

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules of which at least one has to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
class H[source]

Collection of organic chemistry reaction rules for hydrogen atoms.

Parameters:
rulesOptional[List[DistanceBaseRule]]

A list of bond distance based rules of which at least one has to be fulfilled.

filter_by_rule(*args, **kwargs)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str
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
class scine_chemoton.reaction_rules.reaction_rule_library.SpNCX(x, n)[source]

Sp^n hybridization of a carbon atom at a distance of x bonds.

Parameters:
xint

Distance in bonds.

nint

Carbon hybridization.

Parameters:
distanceint

The bond distance to the functional group that must be matched.

central_atomstr

The central atom element symbol.

n_bondsTuple[int, int]

The minimum and maximum number of bonds to the central atom.

specified_bond_partnersDict[str, int]

An optional dictionary specifying the elements that further specify the reactive group by being directly bonded to the central atom together with how often they are bonded to the central atom. E.g. a carbonyl can be specified with the central atom O that has exactly 1 bond partner being C, while an ether group can be specified with the central atom O that has exactly 2 bond partner being C. In general, the choice of the central atom is arbitrary, i.e. both groups could also be specified with C being the central atom, see class description.

strict_countsbool

A flag specifying whether the specified bond partner counts must hold strictly (True) or constitute a minimum number (False). Default: False.

filter_by_rule(molecules, idx_map, elements, atom_index)

Method to be implemented for each rule, giving back whether atom_index is reactive or not.

Return type:

bool

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 rule out or not

Returns:
reactivebool
property name: str