def loadBonds(): global gui, BondBox, IDandTypeOfBondNote, BondDetailNote BondFrame=LabelFrame(gui,text='Bond list') BondFrame.grid(row=2,column=0,columnspan=1) list_base=Frame(BondFrame) list_base.grid(row=0,column=0,columnspan=2) BondBox=toolbox.InfoList(list_base, correspondToBondList, bondDataFormat, initialInfo=[[0,[-1,-1,-1],[0,0,(1,0,0)]],[1,[-1,-1,-1],[0,0,(0,1,0)]]], width=45,height=5) addBondFrameBase=Frame(BondFrame) addBondFrameBase.grid(row=1,column=0) id_base=Frame(addBondFrameBase) id_base.grid(row=0,column=0,sticky=(W,E)) IDandTypeOfBondNote=toolbox.NoteFrm(id_base, init_notes=['ID:','Jx','Jy','Jz'],init_data=[1,-1,-1,-1],row=True,entryWidth=5) IDandTypeOfBondNote.entry_list[0].config(state='disabled') detail_base=Frame(addBondFrameBase) detail_base.grid(row=1,column=0,sticky=(W,E)) BondDetailNote=toolbox.NoteFrm(detail_base, init_notes=['s','t','over lat.','',''],init_data=[0,0,1,0,0],row=True,entryWidth=3) unitLabel=Label(BondFrame,text='Note all energy units are in Kelvin (1meV=11.58875K)') unitLabel.grid(row=2,column=0,sticky=(W,E)) addBtn=Button(addBondFrameBase,text='add',command=addBond) addBtn.grid(row=0,column=1,rowspan=2,sticky='E') resetBtn=Button(addBondFrameBase,text='reset',command=resetBond) resetBtn.grid(row=0,column=2,rowspan=2,sticky='E') delBtn=Button(addBondFrameBase,text='delet',command=deletBond) delBtn.grid(row=0,column=3,rowspan=2,sticky='E')
def loadOrbitals(): global gui, OrbListBox, IDandTypeNote, PosNote, AnisotropyNote OrbFrame=LabelFrame(gui,text='Orbital list') OrbFrame.grid(row=1,column=0,columnspan=1) list_base=Frame(OrbFrame) list_base.grid(row=0,column=0,columnspan=2) OrbListBox=toolbox.InfoList(list_base, correspondToOrbList, orbitalDataFormat, initialInfo=[[0,0,1,(0.,0.,0.),(0.,0.,0.)]],width=45,height=5) addOrbFrameBase=Frame(OrbFrame) addOrbFrameBase.grid(row=1,column=0) id_base=Frame(addOrbFrameBase) id_base.grid(row=0,column=0) IDandTypeNote=toolbox.NoteFrm(id_base, init_notes=['ID:','Type:','Init spin:'],init_data=[0,0,1],row=True,entryWidth=5) IDandTypeNote.entry_list[0].config(state='disabled') pos_base=Frame(addOrbFrameBase) pos_base.grid(row=1,column=0,sticky='W') PosNote=toolbox.NoteFrm(pos_base, init_notes=['pos','',''],init_data=[0.,0.,0.],row=True,entryWidth=6) anis_base=Frame(addOrbFrameBase) anis_base.grid(row=2,column=0,sticky=(W,E)) AnisotropyNote=toolbox.NoteFrm(anis_base, init_notes=['Ani: Dx','Dy','Dz'],init_data=[0,0,0],row=True,entryWidth=6) addBtn=Button(addOrbFrameBase,text='add',command=addOrb) addBtn.grid(row=0,column=1,rowspan=3) resetBtn=Button(addOrbFrameBase,text='reset',command=resetOrb) resetBtn.grid(row=0,column=2,rowspan=3) delBtn=Button(addOrbFrameBase,text='delet',command=deletOrb) delBtn.grid(row=0,column=3,rowspan=3)