tqchem.functional_groups¶
Functions¶
|
Determine if a node in the molecule matches a node in the subgraph |
|
Determine if the bond order of the molecule is inside a range defined for the subgraph |
|
Converts bonds defined on the subgraph to bonds on the graph |
|
Get set of bonds matching an atom being bonded to a methyl group |
|
Get set of bonds matching R-O-R or R-S-R bonds |
|
Returns Dictionary mapping chalcogen single bonds to their grid |
|
Get set of bonds matching the C-N bond in amide groups |
|
Returns Dictionary mapping amide bonds to their dihedral grid |
|
Get set of bonds matching an atom being bonded to a amino group |
|
Returns Dictionary mapping bonds to amino groups to their dihedral grid |
|
Get set of bonds matching the R-C bond in t-butyl groups |
|
Returns Dictionary mapping bonds to t-butyl groups to their dihedral grid |
|
Get set of bonds matching the R-C bond in isopropyl groups |
|
Returns Dictionary mapping bonds to iso-propyl groups to their dihedral grid |
|
Get set of bonds matching the simple C-C bond |
|
Returns Dictionary mapping alkane bonds to iso-propyl groups to their dihedral grid |
Module Contents¶
- tqchem.functional_groups.match_atomic_numbers(molecule_node: dict[str, int], subgraph_node: dict[str, int | collections.abc.Iterable[int]])¶
Determine if a node in the molecule matches a node in the subgraph
Required for checking isomorphisms of graphs. We check the atomic numbers and assume that an atomic number of -1 means an unspecified residue. The subgraph node can also have a list of atomic numbers and the graphs match the molecule_node’s atomic number is in the list.
- tqchem.functional_groups.match_bond_order_range(molecule_edge: dict[str, int], subgraph_edge: dict[str, int | collections.abc.Iterable[int]])¶
Determine if the bond order of the molecule is inside a range defined for the subgraph
Required for checking isomorphisms of graphs.
- tqchem.functional_groups.bonds_from_isomorphism_mappings(mappings: collections.abc.Iterable[dict[int, int]], subgraph_bonds: list[tuple[int, int]]) set[tuple[int, int]] ¶
Converts bonds defined on the subgraph to bonds on the graph
- Parameters:
mapping (list[dict[int, int]]) – Mappings for nodes on the graph to nodes on the subgraph
subgraph_bonds (list[tuple[int, int]]) – list of bonds defined for the subgraph nodes
- Returns:
bonds – set of bonds defined on the graph
- Return type:
set[tuple[int, int]]
- tqchem.functional_groups.find_methyl_groups(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching an atom being bonded to a methyl group
- tqchem.functional_groups.find_single_bonded_chalcogen(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching R-O-R or R-S-R bonds
- tqchem.functional_groups.single_bonded_chalcogens_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping chalcogen single bonds to their grid
- tqchem.functional_groups.find_amide_groups(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching the C-N bond in amide groups
- tqchem.functional_groups.amide_bonds_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping amide bonds to their dihedral grid
- tqchem.functional_groups.find_amino_groups(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching an atom being bonded to a amino group
- tqchem.functional_groups.amino_group_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping bonds to amino groups to their dihedral grid
- tqchem.functional_groups.find_t_butyl_groups(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching the R-C bond in t-butyl groups
- tqchem.functional_groups.t_butyl_groups_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping bonds to t-butyl groups to their dihedral grid
- tqchem.functional_groups.find_iso_propyl_groups(graph: networkx.Graph) set[dict[int, int]] ¶
Get set of bonds matching the R-C bond in isopropyl groups
- tqchem.functional_groups.iso_propyl_groups_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping bonds to iso-propyl groups to their dihedral grid
- tqchem.functional_groups.find_alkane_bonds(graph: networkx.Graph) set[tuple[int, int]] ¶
Get set of bonds matching the simple C-C bond
- tqchem.functional_groups.simple_alkanes_grid(graph: networkx.Graph, grid: numpy.ndarray) dict[None] ¶
Returns Dictionary mapping alkane bonds to iso-propyl groups to their dihedral grid