# Generate a large planar connected graph with particular properties

I am trying to do some Monte Carlo modeling of the properties of particles based on molecules on their surface. There may be from 1,000 to 100,000 surface molecules for a given particle. I need to be able to determine some molecular properties based on adjacency, and then total those properties over all of these surface molecules. It strikes me that to model this, I need a graph that corresponds to the adjacencies of all of the molecules. I am, unfortunately, new to graph theory.

So it seems to me that I need a planar connected graph of size n (where n ranges from 1,000 to 100,000). I think it should be a sextic graph (put a coin on a table and surround it with six coins of the same size to get a close-packed arrangement) to represent the six nearest-neighbors. Although to curve into a sphere we need 12 pentagons, so I again suppose that 12 of the vertices should be pentic. And each face should be of size 3 to model this close packing. Naturally, there will be many such graphs, so to maximize how close the particle is to spherical, I would want to maximize the distance apart the 12 pentagons are.

It strikes me as well from the reading I have done that this graph I am looking for should be the dual of the graph of a fullerene (a triptic planar graph with twelve pentagonal faces and the rest of the faces hexagonal, where the desired n would be the number of faces rather than the number of vertices).

But... I don't know how to generate either graph, or how to find the dual of the fullerene graph if that's the easier route to take. Any suggestions?

If you discretize a sphere surface with Mathematica, you will get a mesh with such a connectivity structure.

Then you can convert it to a graph if you like, or leave it as a region. IGraph/M has convenience tools to convert it to a graph.

reg = BoundaryDiscretizeRegion[
Ball[], PrecisionGoal -> 1,
MaxCellMeasure -> 1/2 (* decrease this to get bigger graphs *)
]


Convert to a graph:

g = IGMeshGraph[reg]


We do have 12 nodes with degree 5 and some more with degree 6, as you wanted.

VertexDegree[g] // Counts
(* <|5 -> 12, 6 -> 30|> *)


Should you want the dual graph, you can do

IGMeshCellAdjacencyGraph[reg, 2, VertexCoordinates -> Automatic]


Here's a dual pair from a bigger mesh:

The soon-to-be-released next version of IGraph/M will come with several new functions to work with planar graphs, including finding faces and finding the dual graph. Stay tuned! Update: This version is released now.

• This looks like exactly what I need! And it only takes a handful of lines of code! Thank you so much! Jun 6 '18 at 20:56
• So I now have all of my code working, but am running into efficiency issues. The topic of my question is therefore different and I will be posting a separate question about it, but since you were so helpful so far, I thought I would give you a heads-up about the new question. Thanks again! Jun 7 '18 at 0:47

GraphData["TruncatedIcosahedralGraph", "DualGraph"]


Now we can make sure that this is in fact what we want by

IsomorphicGraphQ[
GraphData["TruncatedIcosahedralGraph"],
Graph@PolyhedronData["TruncatedIcosahedron", "Edges"]
]

True


Since I can tell you that the latter definitely looks like a buckyball:

(* This leverages custom code. It won't work without the package installed. *)
bucky =
CreateGeometricAtomset[
"TruncatedIcosahedron",
ConstantArray["C", 60]
];
bucky["View"]["AtomicRadius" -> .05, Method -> {"ShrinkWrap" -> True}]