Generating planar graph of amino acids based

Hi everyone

I'm trying to generate a planar graph of amino acids, based on their
properties, something like this:
http://www.russelllab.org/aas/other_images/lb3.gif

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

Thank you

Csongor

attachment.html (3.49 KB)

Amino_acid_graph.py (6.15 KB)

I'm not sure I fully understand what you want, but if you just want to
reverse the behavior of the algorithm, you need simply to construct the
complementary graph, by replacing the edges with non-edges, and the
non-edges with edges.

(But I doubt this will give you a readable layout...)