Skip to content

Commit

Permalink
examples: remove band width reduction (related to #15)
Browse files Browse the repository at this point in the history
  • Loading branch information
brandimarte committed Oct 23, 2018
1 parent 15218f2 commit 9b0117d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 38 deletions.
18 changes: 6 additions & 12 deletions examples/get_all_kekule.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# apply band width reduction
sp2ggr.reduceBandWidth(G, V)

# vertices and adjacency matrix visualization
if nV < 10:
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# calculate all possible Kekule structures (in Kek)
Kek = sp2ggr.allKekules(G, 0)

Expand All @@ -42,9 +34,11 @@
#for i in range(len(Kek)):
# sp2gvi.viewKekule(V, G, Kek[i], sizex=5, sizey=5)

# visualization of the averaged bond order
sp2gvi.viewBondOrderAverage(V, G, Kek, sizex=7, sizey=5, figname='bo.pdf', annotate=True)

# visualization of the Pauling bond order
sp2gvi.viewBondOrderAverage(V, G, Kek, sizex=7, sizey=5,
figname='Pbo.pdf', annotate=True)

# visualization of the Huckel bond order
BO = sp2gtb.tbBondOrder(G)
sp2gvi.viewTBBondOrder(V, BO, sizex=7, sizey=5, figname='bo2.pdf', annotate=True)
sp2gvi.viewTBBondOrder(V, BO, sizex=7, sizey=5,
figname='Hbo.pdf', annotate=True)
18 changes: 5 additions & 13 deletions examples/get_all_kekule_constrained.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,9 @@
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# apply band width reduction
sp2ggr.reduceBandWidth(G, V)

# vertices and adjacency matrix visualization
if nV < 10:
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# calculate all possible Kekule structures that contains
# double bonds between the list of edges (tuples) in `C`
C = ((0, 1), (3, 5), (2, 4))
C = ((0, 1))
Kek = sp2ggr.allKekules(G, 0, C=C)

# visualization of all Kekule structures found
Expand All @@ -43,7 +35,7 @@
#for i in range(len(Kek)):
# sp2gvi.viewKekule(V, G, Kek[i], C=C, sizex=5, sizey=5)

# visualization of the averaged bond order
sp2gvi.viewBondOrderAverage(V, G, Kek, sizex=7, sizey=5)
# show constrained bonds as usual Kekule representation
sp2gvi.viewBondOrderAverage(V, G, Kek, C=C, sizex=7, sizey=5)
# visualization of the Pauling bond order (show constrained
# bonds as usual Kekule representation)
sp2gvi.viewBondOrderAverage(V, G, Kek, C=C, sizex=7, sizey=5,
figname='Pbo_constrain.pdf')
19 changes: 6 additions & 13 deletions examples/get_all_kekule_rad.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,13 @@
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# apply band width reduction
sp2ggr.reduceBandWidth(G, V)

# vertices and adjacency matrix visualization
if nV < 10:
#sp2gvi.viewV(V, sizex=5, sizey=5)
sp2gvi.printAdj(G)

# calculate all possible Kekule structures that contains
# double bonds between the list of edges (tuples) in `C`
C = ((0, 1), (3, 5), (2, 4)) # constrained double bonds
C = ((0, 1)) # constrained double bonds
#C = None
# and radical at vertex list in `rad`
#rad = (8, 22) # list of radicals (e.g. for meta-aryne)
rad = (7, 20) # list of radicals (e.g. for triangulene)
#rad = (25, 4) # list of radicals (e.g. for meta-aryne)
rad = (14, 18) # list of radicals (e.g. for triangulene)

Kek = sp2ggr.allKekules(G, 0, C=C, rad=rad)

Expand All @@ -48,6 +40,7 @@
#for i in range(len(Kek)):
# sp2gvi.viewKekule(V, G, Kek[i], C=C, rad=rad, sizex=5, sizey=5)

# visualization of the averaged bond order
# visualization of the Pauling bond order (show constrained
# bonds as usual Kekule representation and radicals as dots)
sp2gvi.viewBondOrderAverage(V, G, Kek, C=C, rad=rad, sizex=7, sizey=5,
figname='bo_rad.pdf')
figname='Pbo_rad.pdf')

0 comments on commit 9b0117d

Please sign in to comment.