polymerist.rdutils.bonding.portlib
Specification for representing, defining, and characterizing selective intermolecular bond placeholders (“ports”)
Attributes
Exceptions
Raised when port-related errors as encountered |
Classes
Class for encapsulating the components of a "port" bonding site (linker-bond-bridgehead) |
Functions
|
Indicate whether an atom is a linker (intermonomer "*" type atom) |
|
Count how many wild-type inter-molecule linker atoms are in a Mol |
|
Get the linker and bridgehead indices of all ports found in an RDKit Mol |
|
Get indices of all atoms which are ports |
|
Find and generate all ports in a molecule. Can optioanlly narrow scope to port whose bridegehead is a particular atom and/or whose linker has a particular flavor |
|
Counts the number of port atoms present in a Mol |
|
Get the singular port of a Mol which contains only 1 port |
Module Contents
- polymerist.rdutils.bonding.portlib.PORT_SCHEMA = '[#0D1]~[!#0]'
- polymerist.rdutils.bonding.portlib.PORT_QUERY
- exception polymerist.rdutils.bonding.portlib.MolPortError[source]
Bases:
ExceptionRaised when port-related errors as encountered
- polymerist.rdutils.bonding.portlib.is_linker(rdatom: rdkit.Chem.rdchem.Atom) bool[source]
Indicate whether an atom is a linker (intermonomer “*” type atom)
- polymerist.rdutils.bonding.portlib.get_num_linkers(rdmol: rdkit.Chem.rdchem.Mol) int[source]
Count how many wild-type inter-molecule linker atoms are in a Mol
- class polymerist.rdutils.bonding.portlib.Port[source]
Class for encapsulating the components of a “port” bonding site (linker-bond-bridgehead)
- linker: rdkit.Chem.rdchem.Atom
- bond: rdkit.Chem.rdchem.Bond
- bridgehead: rdkit.Chem.rdchem.Atom
- bondable_flavors: ClassVar[polymerist.genutils.containers.UnorderedRegistry]
- property flavor: int
Return the flavor of the port
- polymerist.rdutils.bonding.portlib.get_port_ids(rdmol: rdkit.Chem.rdchem.Mol) Generator[tuple[int, int], None, None][source]
Get the linker and bridgehead indices of all ports found in an RDKit Mol
- polymerist.rdutils.bonding.portlib.get_linker_ids(rdmol: rdkit.Chem.rdchem.Mol) Generator[int, None, None][source]
Get indices of all atoms which are ports
- polymerist.rdutils.bonding.portlib.get_ports(rdmol: rdkit.Chem.rdchem.Mol, target_atom_id: int | None = None, target_flavor: int | None = None) Generator[Port, None, None][source]
Find and generate all ports in a molecule. Can optioanlly narrow scope to port whose bridegehead is a particular atom and/or whose linker has a particular flavor