BenzAI


Project maintained by benzAI-team Hosted on GitHub Pages — Theme by mattgraham

The graph file format

The graph format aims to represent each benzenoid structure as a graph whose vertices correspond to its carbon atoms and an edge links two vertices if there is a bond between the two associated carbon atoms. It is a text format inspired from the DIMACS format used to express graphs. We enrich the DIMACS format to deal with the hexagons formed by the carbon atoms, but also handle the coordinates of each carbon atom. We can note that the hydrogen atoms are not represented in such graphs because they can be easily deduced from the existing bonds. More precisely, each carbon that establishes only bonds with two carbon atoms shares a bond with a hydrogen atom.

Format description

Each line starts with a letter (in lower case) which specifies the kind of this line.

For example, here is the graph describing anthracene:

Anthracene

and the corresponding file:

  p DIMACS 14 16 3
  e 0_0 1_1
  e 0_0 -1_1
  e 1_1 1_2
  e 1_1 2_0
  e -1_1 -1_2
  e 1_2 0_3
  e 1_2 2_3
  e 2_0 3_1
  e 0_3 -1_2
  e 2_3 3_2
  e 3_1 3_2
  e 3_1 4_0
  e 3_2 4_3
  e 4_0 5_1
  e 4_3 5_2
  e 5_1 5_2
  h 0_0 1_1 1_2 0_3 -1_2 -1_1 
  h 2_0 3_1 3_2 2_3 1_2 1_1 
  h 4_0 5_1 5_2 4_3 3_2 3_1