Get["https://raw.githubusercontent.com/szhorvat/IGraphM/master/IGInstaller.m"]

<<IGraphM`

Function to convert some representation of a graph to mathematica’s representation. You can give it the option `format->graph6` if in graph6 format

Clear[format,edgeList,graph6];
Options[graphFromPlantri]={format->edgeList};
graphFromPlantri[data_,OptionsPattern[]]:=If[format===edgeList,PlanarGraph[Graph[Partition[ToExpression[StringCases[data,DigitCharacter..]],2]/.{x_,y_}->(x\[UndirectedEdge]y)],VertexLabels->"Name"],
PlanarGraph[ImportString[data,"Graph6"],VertexLabels->"Name"]]

Function to tell if a polyhedron is prime. About O(2^n) and not likely able to improve. There are about O(2^n) cycles (it’s been rigorously proven to be P-hard to count the number of cycles), and I don’t see a way of getting around that.

primePolyhedronQ[graph_]:=Block[{cycles,valid,faceDecomposable,vertexDecomposable,dualGraph},
cycles=FindCycle[graph,Infinity,All]/.(x_\[UndirectedEdge]y_)->x;
valid=Select[cycles,Not[IGConnectedQ[VertexDelete[graph,#]]]&];
faceDecomposable=AnyTrue[valid,With[{components=ConnectedComponents[VertexDelete[graph,#]]},
KVertexConnectedGraphQ[Subgraph[graph,Join[components[[1]],#]],3]&&KVertexConnectedGraphQ[Subgraph[graph,Join[components[[2]],#]],3]]&];
If[faceDecomposable,Return[False]];
dualGraph=IGDualGraph[graph];
cycles=FindCycle[dualGraph,Infinity,All]/.(x_\[UndirectedEdge]y_)->x;
valid=Select[cycles,Not[IGConnectedQ[VertexDelete[dualGraph,#]]]&];
Not[AnyTrue[valid,With[{components=ConnectedComponents[VertexDelete[dualGraph,#]]},
KVertexConnectedGraphQ[Subgraph[dualGraph,Join[components[[1]],#]],3]&&KVertexConnectedGraphQ[Subgraph[dualGraph,Join[components[[2]],#]],3]]&]]
]

Function to find the possible decompositions of a graph. Returns a list where the first element of the list is the number of possible face decompositions and the second is the number of possible vertex decompositions. Should be easy to modify to actually return the decompositions. I wonder if we could extend this recursively to “prime factorize” polyhedra?

decomposable[graph_]:=Block[{cycles,valid,faceDecomposable,vertexDecomposable,dualGraph},
cycles=FindCycle[graph,Infinity,All]/.(x_\[UndirectedEdge]y_)->x;
valid=Select[cycles,Not[IGConnectedQ[VertexDelete[graph,#]]]&];
faceDecomposable=Length[Select[valid,With[{components=ConnectedComponents[VertexDelete[graph,#]]},
KVertexConnectedGraphQ[Subgraph[graph,Join[components[[1]],#]],3]&&KVertexConnectedGraphQ[Subgraph[graph,Join[components[[2]],#]],3]]&]];
dualGraph=IGDualGraph[graph];
cycles=FindCycle[dualGraph,Infinity,All]/.(x_\[UndirectedEdge]y_)->x;
valid=Select[cycles,Not[IGConnectedQ[VertexDelete[dualGraph,#]]]&];
vertexDecomposable=Length[Select[valid,With[{components=ConnectedComponents[VertexDelete[dualGraph,#]]},
KVertexConnectedGraphQ[Subgraph[dualGraph,Join[components[[1]],#]],3]&&KVertexConnectedGraphQ[Subgraph[dualGraph,Join[components[[2]],#]],3]]&]];
{faceDecomposable,vertexDecomposable}
]

Function to read data from a file and convert it into a list of graphs. The easiest way to use this is to download a massive list from plantri (in graph6 format if it is very large, to keep the file small), and give that filename here. I highly recommend you put a semicolon at the end of that line to suppress the output; it tends to be pretty massive.

readData[filename_]:=graphFromPlantri[#,format->graph6]&/@Flatten[StringSplit[ReadList[FileNameJoin[{NotebookDirectory[],filename}],String],": "]][[2;;-1;;2]]

seven=readData["seven.txt"];

Select[seven,primePolyhedronQ]

tenWithOnlyTriangularFaces=readData["ten_triangles.txt"];

Select[tenWithOnlyTriangularFaces,primePolyhedronQ]

GraphData["IcosahedralGraph"]

decomposable[%13]

GraphData["DodecahedralGraph"]

decomposable[%]