espaloma.graphs.utils.read_heterogeneous_graph.from_homogeneous_and_mol

espaloma.graphs.utils.read_heterogeneous_graph.from_homogeneous_and_mol(g, offmol)[source]

Build heterogeneous graph from homogeneous ones.

Note

For now we name single node, two-, three, and four-, hypernodes as n1, n2, n3, and n4. These correspond to atom, bond, angle, and torsion nodes in chemical graphs.

Parameters

g (espaloma.HomogeneousGraph object) – the homogeneous graph to be translated.

Returns

hg – the resulting heterogeneous graph.

Return type

espaloma.HeterogeneousGraph object