molfoundry.inchi#

molfoundry.inchi(inchi, name=None, graphType=GraphType.Default, add=True)#

Build a Graph from an InChI string.

Parameters:
  • inchi (str) – The InChI string to parse, e.g. "1S/H2O/h1H2" for water. The “InChI=” prefix is optional.

  • name (str | None) – Human-readable name for the resulting graph, or None to leave it unnamed.

  • graphType (GraphType) – How to interpret the input – as a default graph structure or as an electron graph.

  • add (bool) – When True (the default), also register the graph in the global inputGraphs collection.

Returns:

The parsed graph.

Return type:

Graph