I'm trying to generate a planar graph of amino acids, based on their
properties, something like this:
I want them to be something like this (I know there is a solution already,
but this is just an example at the moment, if I can't solve this problem, I
can't move forward).
Some amino acids should be close to each other, because they are in the
same group. The problem is, that they can belong to multiple groups, so
just grouping doesn't work. I've seen the fruchterman_reingold_layout and
it's two parameters:
Attracting force between adjacent vertices.
*r* : float (optional, default: 1.0)
Repulsive force between vertices.
The problem is, that I think I would need the opposite. Repulsive force
between the connected vertices, and attractive force between the vertices
in general. The question is, can I do that somehow? Or is there another way?
This is something I've done to play with until now, attached
attachment.html (3.49 KB)
Amino_acid_graph.py (6.15 KB)