# -- mode: PYTHON --
killall()

g=G[1]
ret=g.read("bandweight",'+bweights_bwdef')[0]
gr=ret.group
for s in ret.sets:
    s.z[0]+=s.z[1]
    s.z[2]+=s.z[3]
gr.setWeightsStyle(style='connected',factor=1,min=0.2,max=12)

gr.W[1].on().color=0xcc0000
gr.W[1].name='p$_z$. $~s'
gr.W[3].on().color=0xff
gr.W[3].name='p$_z$. $~s*'
g.title.text='P$_1$.-P$_2$. p$_Z$.-bond weights'
g.world.y=[-8,8]

printto('bwei.png',dpi=150)