espaloma.graphs.graph.Graph
- class espaloma.graphs.graph.Graph(mol=None, homograph=None, heterograph=None)[source]
Bases:
espaloma.graphs.graph.BaseGraph
A unified graph object that support translation to and from message-passing graphs and MM factor graph.
Note
This object provides access to popular attributes of homograph and heterograph.
This object also provides access to ndata and edata from the heterograph.
Examples
>>> g0 = esp.Graph("C") >>> g1 = esp.Graph(Molecule.from_smiles("C")) >>> assert g0 == g1
Methods
__init__
([mol, homograph, heterograph])get_heterograph_from_graph_and_mol
(graph, mol)get_homograph_from_mol
(mol)load
(path)save
(path)Attributes
edata
ndata
nodes