LigandNetwork#
- class openfe.setup.LigandNetwork(edges: Iterable[LigandAtomMapping], nodes: Iterable[SmallMoleculeComponent] | None = None)#
Bases:
GufeTokenizableA directed graph connecting many ligands according to their atom mapping
- Parameters:
edges (Iterable[LigandAtomMapping]) – edges for this network
nodes (Iterable[SmallMoleculeComponent]) – nodes for this network
Methods
Create a new network with the given edges and nodes added
Create
Networkfrom GraphML string.Are all ligands in the network (indirectly) connected to each other
Return the GraphML string representing this
Network.- param protocol:
Attributes
A read-only view of the edges of the Network
NetworkX graph for this network
A read-only view of the nodes of the Network
- property edges: FrozenSet[LigandAtomMapping]#
A read-only view of the edges of the Network
- enlarge_graph(*, edges=None, nodes=None) LigandNetwork#
Create a new network with the given edges and nodes added
- Parameters:
edges (Iterable[
LigandAtomMapping]) – edges to append to this networknodes (Iterable[
SmallMoleculeComponent]) – nodes to append to this network
- Returns:
a new network adding the given edges and nodes to this network
- Return type:
Network
- classmethod from_graphml(graphml_str: str)#
Create
Networkfrom GraphML string. This is the primary deserialization mechanism for this class.- Parameters:
graphml_str (str) – GraphML string representation of a
Network- Returns:
new network from the GraphML
- Return type:
Network
- property graph: MultiDiGraph#
NetworkX graph for this network
- is_connected() bool#
Are all ligands in the network (indirectly) connected to each other
A “False” value indicates that either some ligands have no edges or that there are separate networks that do not link to each other.
- property nodes: FrozenSet[SmallMoleculeComponent]#
A read-only view of the nodes of the Network
- to_graphml() str#
Return the GraphML string representing this
Network.This is the primary serialization mechanism for this class.
- Returns:
string representing this network in GraphML format
- Return type:
- to_rbfe_alchemical_network(solvent: SolventComponent, protein: ProteinComponent, protocol: Protocol, *, autoname: bool = True, autoname_prefix: str = 'easy_rbfe', **other_components)#
- Parameters:
protocol (:class:Protocol) –
autoname (bool) – whether to automatically name objects by the ligand name and state label
autoname_prefix (str) – prefix for the autonaming; only used if autonaming is True
other_components – additional non-alchemical components, keyword will be the string label for the component