molfoundry.Graph#
- class molfoundry.Graph#
- static fromGMLString(gml, name=None, graphType=GraphType.Default, add=True)#
- static fromSMILES(smiles, name=None, graphType=GraphType.Default, add=True)#
- static fromDFS(dfs, name=None, graphType=GraphType.Default, add=True)#
Build a
Graphfrom a GraphDFS line-notation string.Bare organic-subset atoms (
C,N,O, …) are given implicit hydrogens as in SMILES; a bracketed[...]vertex is an arbitrary label and gets none. Ring bonds usedefRingId/ back-edge numbers.
- static fromInChI(inchi, name=None, graphType=GraphType.Default, add=True)#
- static fromMolfile(molfile, name=None, graphType=GraphType.Default, add=True)#
- static fromRMG(adjacencyList, name=None, add=True)#
- property vertices: VertexRange#
- print() None#
- print(printer: GraphPrinter | None = None) None
- Parameters:
printer (GraphPrinter | None)
- svg() str#
- svg(printer: GraphPrinter | None = None) str
Render the graph to an SVG string and return it — the same depiction
printshows, without the summary card wrapper.Per-vertex overlay markers (e.g. for atom tracing) come from the printer’s
GraphPrinter.pushVertexOverlay()resolver.- Parameters:
printer (GraphPrinter | None)
- Return type:
- isomorphism(codomain, labelSettings=LabelSettings(LabelType.String, LabelRelation.Isomorphism))#
- Parameters:
codomain (Graph)
labelSettings (LabelSettings)
- Return type:
- monomorphism(codomain, labelSettings=LabelSettings(LabelType.String, LabelRelation.Isomorphism))#
- Parameters:
codomain (Graph)
labelSettings (LabelSettings)
- Return type: