The idea is that the nodes themselves are biomolecules, and the
subnodes represent the docking points that the molecules can use to
dock to other molecules. I'm defining a graph representation for a
language we use to define those things.
For example, in the language we would have
molecule1: A(b) #where A is a molecule name, and 'b' a docking site
within that molecule that is uses to connect to the molecule 'B'
molecule2: B(a) #where B is a molecule name, and 'a' the docking site
it used to connect to molecule 'A'
So together they form the complex
A(b!1).B(a!1) #where the syntax '!1' represents the bond between the
two, which would be the edge in the graph.
This example can be extended to complexes with multiple molecules and
multiple dockings sites. (such that in a graph as I visualize it the
molecules would be big nodes, the components should be small nodes
within that big node, and the connections should be lines between the
small nodes). Which would be the best way to represent such a
structure in networkx?