Changeset 812


Ignore:
Timestamp:
Dec 11, 2012 4:27:56 PM (11 years ago)
Author:
vondreele
Message:

add restraint macro files
fix a triclinic error in genHlaue
continue development of restraints

Location:
trunk
Files:
11 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASII.py

    r804 r812  
    288288        else:
    289289            mode = style=wx.OPEN | wx.CHANGE_DIR
    290         dlg = wx.FileDialog(
    291             self, message="Choose "+label+" input file",
    292             #defaultDir=os.getcwd(),
    293             defaultFile="",
    294             wildcard=choices, style=mode
    295             )
     290        dlg = wx.FileDialog(self, message="Choose "+label+" input file",
     291            defaultFile="",wildcard=choices, style=mode)
    296292        try:
    297293            if dlg.ShowModal() == wx.ID_OK:
  • trunk/GSASIIlattice.py

    r780 r812  
    641641                    H = []
    642642                    if CentCheck(SGLatt,[h,k,l]): H=[h,k,l]
    643                     rdsq = calc_rDsq(H,A)
    644                     if 0 < rdsq <= dminsq:
    645                         HKL.append([h,k,l,1/math.sqrt(rdsq)])
     643                    if H:
     644                        rdsq = calc_rDsq(H,A)
     645                        if 0 < rdsq <= dminsq:
     646                            HKL.append([h,k,l,1/math.sqrt(rdsq)])
    646647    elif SGLaue == '2/m':                #monoclinic
    647648        axisnum = 1 + ['a','b','c'].index(SGUniq)
  • trunk/GSASIIrestrGUI.py

    r811 r812  
    4444    if 'Chiral' not in restrData:
    4545        restrData['Chiral'] = {'wtFactor':1.0,'Volumes':[],'Use':True}
     46    if 'Torsion' not in restrData:
     47        restrData['Torsion'] = {'wtFactor':1.0,'Coeff':{},'Torsions':[],'Use':True}
     48    if 'Rama' not in restrData:
     49        restrData['Rama'] = {'wtFactor':1.0,'Coeff':{},'Ramas':[],'Use':True}
    4650    General = phasedata['General']
    4751    Cell = General['Cell'][1:7]          #skip flag & volume   
     
    5155    Atoms = phasedata['Atoms']
    5256    AtLookUp = G2mth.FillAtomLookUp(Atoms)
    53     Names = ['all '+ name for name in General['AtomTypes']]
    54     iBeg = len(Names)
    55     Types = [name for name in General['AtomTypes']]
    56     Coords = [ [] for type in Types]
    57     Ids = [ 0 for type in Types]
    58     Names += [atom[ct-1] for atom in Atoms]
     57    if 'macro' in General['Type']:
     58        Names = [atom[0]+atom[1]+atom[2]+' '+atom[3] for atom in Atoms]
     59        Ids = []
     60        Coords = []
     61        Types = []
     62    else:   
     63        Names = ['all '+ name for name in General['AtomTypes']]
     64        iBeg = len(Names)
     65        Types = [name for name in General['AtomTypes']]
     66        Coords = [ [] for type in Types]
     67        Ids = [ 0 for type in Types]
     68        Names += [atom[ct-1] for atom in Atoms]
    5969    Types += [atom[ct] for atom in Atoms]
    6070    Coords += [atom[cx:cx+3] for atom in Atoms]
     
    7080            dlg.Destroy()
    7181   
     82    def getMacroFile(macName):
     83        defDir = os.path.join(os.path.split(__file__)[0],'GSASIImacros')
     84        dlg = wx.FileDialog(G2frame,message='Choose '+macName+' restraint macro file',
     85            defaultDir=defDir,defaultFile="",wildcard="GSAS-II macro file (*.mac)|*.mac",
     86            style=wx.OPEN | wx.CHANGE_DIR)
     87        try:
     88            if dlg.ShowModal() == wx.ID_OK:
     89                macfile = dlg.GetPath()
     90                macro = open(macfile,'Ur')
     91                head = macro.readline()
     92                if macName not in head:
     93                    print head
     94                    print '**** ERROR - wrong restraint macro file selected, try again ****'
     95                    macro = []
     96            else: # cancel was pressed
     97                macxro = []
     98        finally:
     99            dlg.Destroy()
     100        return macro        #advanced past 1st line
     101       
    72102    def OnAddRestraint(event):
    73103        page = G2frame.dataDisplay.GetSelection()
     
    82112        elif 'Chiral' in G2frame.dataDisplay.GetPageText(page):
    83113            AddChiralRestraint()
     114        elif 'Torsion' in G2frame.dataDisplay.GetPageText(page):
     115            AddTorsionRestraint()
     116        elif 'Rama' in G2frame.dataDisplay.GetPageText(page):
     117            AddRamaRestraint()
    84118           
    85119    def OnAddAARestraint(event):
     
    95129        elif 'Chiral' in G2frame.dataDisplay.GetPageText(page):
    96130            AddAAChiralRestraint()
     131        elif 'Torsion' in G2frame.dataDisplay.GetPageText(page):
     132            AddAATorsionRestraint()
     133        elif 'Rama' in G2frame.dataDisplay.GetPageText(page):
     134            AddAARamaRestraint()
    97135           
    98136    def AddBondRestraint(bondRestData):
     
    149187        UpdateBondRestr(bondRestData)               
    150188
     189    def AddAABondRestraint(bondRestData):
     190        Radii = dict(zip(General['AtomTypes'],General['BondRadii']))
     191        macro = getMacroFile('bond')
     192        if not macro:
     193            return
     194        macStr = macro.readline()
     195        atoms = zip(Names,Types,Coords,Ids)
     196       
     197        Factor = .85
     198        while macStr:
     199            items = macStr.split()
     200            if 'F' in items[0]:
     201                restrData['Bond']['wtFactor'] = float(items[1])
     202            elif 'S' in items[0]:
     203                oIds = []
     204                oTypes = []
     205                oCoords = []
     206                tIds = []
     207                tTypes = []
     208                tCoords = []
     209                res = items[1]
     210                dist = float(items[2])
     211                esd = float(items[3])
     212                oAtm,tAtm = items[4:6]
     213                for Name,Type,coords,Id in atoms:
     214                    names = Name.split()
     215                    if res == '*' or res in names[0]:
     216                        if oAtm == names[2]:
     217                            oIds.append(Id)
     218                            oTypes.append(Type)
     219                            oCoords.append(np.array(coords))
     220                        if tAtm == names[2]:
     221                            tIds.append(Id)
     222                            tTypes.append(Type)
     223                            tCoords.append(np.array(coords))
     224                for oId,oType,oCoord in zip(oIds,oTypes,oCoords):
     225                    for tId,tType,tCoord in zip(tIds,tTypes,tCoords):
     226                        BsumR = (Radii[oType]+Radii[tType])*Factor
     227                        obsd = np.sqrt(np.sum(np.inner(Amat,tCoord-oCoord)**2))
     228                        if 0.2 < obsd <= BsumR:
     229                            bondRestData['Bonds'].append([[oId,tId],['1','1'],obsd,dist,esd])                         
     230            macStr = macro.readline()
     231        macro.close()
     232        UpdateBondRestr(bondRestData)               
     233           
    151234    def AddAngleRestraint(angleRestData):
    152235        Radii = dict(zip(General['AtomTypes'],zip(General['BondRadii'],General['AngleRadii'])))
     
    209292        UpdateAngleRestr(angleRestData)               
    210293
     294    def AddAAAngleRestraint(angleRestData):
     295        macro = getMacroFile('angle')
     296        if not macro:
     297            return
     298        macStr = macro.readline()
     299        while macStr:
     300            items = macStr.split()
     301            print items
     302            if 'F' in items[0]:
     303                restrData['Angle']['wtFactor'] = float(items[1])
     304            elif 'S' in items[0]:
     305                List = []
     306                res = items[1]
     307                dist = items[2]
     308                esd = items[3]
     309                oAtm = items[4]
     310                tAtm = items[5]
     311                for name,Type,coords,id in zip(Names,Types,Coords,Ids):
     312                    if res == '*' or res in name:
     313                        if oAtm in name:
     314                            oCoord = coords
     315                            oId = id
     316                            oName = name
     317                        elif tAtm in name:
     318                            tCoord = coords
     319                            tId = id
     320                            tName = name
     321               
     322            macStr = macro.readline()
     323        macro.close()
     324        UpdateAngleRestr(angleRestData)               
     325       
    211326    def AddPlaneRestraint():
    212327        origAtoms = []
     
    224339                    origAtoms.append([Ids[x],Types[x],Coords[x]])
    225340
     341    def AddAAPlaneRestraint():
     342        macro = getMacroFile('plane')
     343        if not macro:
     344            return
     345        macStr = macro.readline()
     346        while macStr:
     347            items = macStr.split()
     348            print items
     349            if 'F' in items[0]:
     350                restrData['Plane']['wtFactor'] = float(items[1])
     351            elif 'S' in items[0]:
     352                List = []
     353                res = items[1]
     354                dist = items[2]
     355                esd = items[3]
     356                oAtm = items[4]
     357                tAtm = items[5]
     358                for name,Type,coords,id in zip(Names,Types,Coords,Ids):
     359                    if res == '*' or res in name:
     360                        if oAtm in name:
     361                            oCoord = coords
     362                            oId = id
     363                            oName = name
     364                        elif tAtm in name:
     365                            tCoord = coords
     366                            tId = id
     367                            tName = name
     368               
     369            macStr = macro.readline()
     370        macro.close()
     371
    226372    def AddChiralRestraint():
    227373        print 'Chiral restraint'
    228374       
    229     def AddAABondRestraint(bondRestData):
    230         print 'Amino acid Bond restraint'
    231 
    232     def AddAAAngleRestraint(angleRestData):
    233         print 'Amino acid Angle restraint'
    234        
    235     def AddAAPlaneRestraint():
    236         print 'Amino acid Plane restraint'
    237 
    238375    def AddAAChiralRestraint():
    239         print 'Amino acid Chiral restraint'
    240        
     376        macro = getMacroFile('chiral')
     377        if not macro:
     378            return
     379        macStr = macro.readline()
     380        while macStr:
     381            items = macStr.split()
     382            print items
     383            if 'F' in items[0]:
     384                restrData['Chiral']['wtFactor'] = float(items[1])
     385            elif 'S' in items[0]:
     386                List = []
     387                res = items[1]
     388                dist = items[2]
     389                esd = items[3]
     390                oAtm = items[4]
     391                tAtm = items[5]
     392                for name,Type,coords,id in zip(Names,Types,Coords,Ids):
     393                    if res == '*' or res in name:
     394                        if oAtm in name:
     395                            oCoord = coords
     396                            oId = id
     397                            oName = name
     398                        elif tAtm in name:
     399                            tCoord = coords
     400                            tId = id
     401                            tName = name
     402               
     403            macStr = macro.readline()
     404        macro.close()
     405       
     406    def AddTorsionRestraint():
     407        print 'Torsion restraint'
     408       
     409    def AddAATorsionRestraint():
     410        print 'Add AA Torsion'
     411       
     412    def AddRamaRestraint():
     413        print 'Ramachandran restraint'
     414               
     415    def AddAARamaRestraint():
     416        print 'Add AA Ramachandran'
     417       
    241418    def WtBox(wind,restData):
    242419       
     
    282459                return
    283460            Bonds.ClearSelection()
    284             val = bondList[rows[0]][4]
     461            val = bondList[rows[0]][3]
    285462            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new value for bond',val,[0.,5.],'%.4f')
    286463            if dlg.ShowModal() == wx.ID_OK:
    287464                parm = dlg.GetValue()
    288465                for r in rows:
    289                     bondList[r][4] = parm
     466                    bondList[r][3] = parm
    290467            dlg.Destroy()
    291468            UpdateBondRestr(bondRestData)               
     
    296473                return
    297474            Bonds.ClearSelection()
    298             val = bondList[rows[0]][5]
     475            val = bondList[rows[0]][4]
    299476            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new esd for bond',val,[0.,1.],'%.4f')
    300477            if dlg.ShowModal() == wx.ID_OK:
    301478                parm = dlg.GetValue()
    302479                for r in rows:
    303                     bondList[r][5] = parm
     480                    bondList[r][4] = parm
    304481            dlg.Destroy()
    305482            UpdateBondRestr(bondRestData)               
     
    386563                return
    387564            Angles.ClearSelection()
    388             val = angleList[rows[0]][4]
     565            val = angleList[rows[0]][3]
    389566            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new value for angle',val,[0.,360.],'%.2f')
    390567            if dlg.ShowModal() == wx.ID_OK:
    391568                parm = dlg.GetValue()
    392569                for r in rows:
    393                     angleList[r][4] = parm
     570                    angleList[r][3] = parm
    394571            dlg.Destroy()
    395572            UpdateAngleRestr(angleRestData)               
     
    400577                return
    401578            Angles.ClearSelection()
    402             val = angleList[rows[0]][5]
     579            val = angleList[rows[0]][4]
    403580            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new esd for angle',val,[0.,5.],'%.2f')
    404581            if dlg.ShowModal() == wx.ID_OK:
    405582                parm = dlg.GetValue()
    406583                for r in rows:
    407                     angleList[r][5] = parm
     584                    angleList[r][4] = parm
    408585            dlg.Destroy()
    409586            UpdateAngleRestr(angleRestData)               
     
    477654                item.Enable(False)
    478655
     656        def OnChangeEsd(event):
     657            rows = Planes.GetSelectedRows()
     658            if not rows:
     659                return
     660            Planes.ClearSelection()
     661            val = planeList[rows[0]][4]
     662            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new esd for plane',val,[0.,5.],'%.2f')
     663            if dlg.ShowModal() == wx.ID_OK:
     664                parm = dlg.GetValue()
     665                for r in rows:
     666                    planeList[r][4] = parm
     667            dlg.Destroy()
     668            UpdatePlaneRestr(planeRestData)               
     669                                           
    479670        def OnDeleteRestraint(event):
    480671            rows = Planes.GetSelectedRows()
     
    530721                    Planes.SetCellStyle(r,c,VERY_LIGHT_GREY,True)
    531722            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     723            G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    532724            mainSizer.Add(Planes,0,)
    533725        else:
     
    554746            UpdateChiralRestr(chiralRestData)               
    555747           
     748        def OnChangeValue(event):
     749            rows = Volumes.GetSelectedRows()
     750            if not rows:
     751                return
     752            Volumes.ClearSelection()
     753            val = volumeList[rows[0]][3]
     754            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new value for chiral volume',val,[0.,360.],'%.2f')
     755            if dlg.ShowModal() == wx.ID_OK:
     756                parm = dlg.GetValue()
     757                for r in rows:
     758                    volumeList[r][3] = parm
     759            dlg.Destroy()
     760            UpdateChiralRestr(chiralRestData)               
     761
     762        def OnChangeEsd(event):
     763            rows = Volumes.GetSelectedRows()
     764            if not rows:
     765                return
     766            Volumes.ClearSelection()
     767            val = volumeList[rows[0]][4]
     768            dlg = G2phG.SingleFloatDialog(G2frame,'New value','Enter new esd for chiral volume',val,[0.,5.],'%.2f')
     769            if dlg.ShowModal() == wx.ID_OK:
     770                parm = dlg.GetValue()
     771                for r in rows:
     772                    volumeList[r][4] = parm
     773            dlg.Destroy()
     774            UpdateChiralRestr(chiralRestData)               
     775                                           
    556776        ChiralRestr.DestroyChildren()
    557777        dataDisplay = wx.Panel(ChiralRestr)
     
    572792                    for atom in atoms:
    573793                        name += '('+atom[1]+atom[0].strip()+atom[2]+') '+atom[3]+' '
    574                     table.append([name[:-3],dcalc,dobs,esd])
     794                    table.append([name,dcalc,dobs,esd])
    575795                    rowLabels.append(str(i))
    576796            else:
     
    590810                    Volumes.SetCellStyle(r,c,VERY_LIGHT_GREY,True)
    591811            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     812            G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeValue, id=G2gd.wxID_RESRCHANGEVAL)
     813            G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
    592814            mainSizer.Add(Volumes,0,)
    593815        else:
     
    602824        G2frame.dataFrame.setSizePosLeft(Size)
    603825   
     826    def UpdateTorsionRestr(torsionRestData):
     827
     828        def OnDeleteRestraint(event):
     829            rows = Torsions.GetSelectedRows()
     830            if not rows:
     831                return
     832            rows.sort()
     833            rows.reverse()
     834            for row in rows:
     835                torsionList.remove(torsionList[row])
     836            UpdateTorsionRestr(torsionRestData)               
     837           
     838        TorsionRestr.DestroyChildren()
     839        dataDisplay = wx.Panel(TorsionRestr)
     840        mainSizer = wx.BoxSizer(wx.VERTICAL)
     841        mainSizer.Add((5,5),0)
     842        mainSizer.Add(WtBox(TorsionRestr,torsionRestData),0,wx.ALIGN_CENTER_VERTICAL)
     843
     844        torsionList = torsionRestData['Torsions']
     845        if len(torsionList):
     846            table = []
     847            rowLabels = []
     848            Types = 2*[wg.GRID_VALUE_STRING,]+3*[wg.GRID_VALUE_FLOAT+':10,2',]
     849            if 'macro' in General['Type']:
     850                colLabels = ['(res) A (res) B (res) C (res) D','coef name','calc','obs','esd']
     851                for i,[indx,ops,cofName,dcalc,dobs,esd] in enumerate(torsionList):
     852                    atoms = G2mth.GetAtomItemsById(Atoms,AtLookUp,indx,0,4)
     853                    name = ''
     854                    for atom in atoms:
     855                        name += '('+atom[1]+atom[0].strip()+atom[2]+') '+atom[3]+' '
     856                    table.append([name,cofName,dcalc,dobs,esd])
     857                    rowLabels.append(str(i))
     858            else:
     859                colLabels = ['A+SymOp  B+SymOp  C+SymOp  D+SymOp)','coef name','calc','obs','esd']
     860                for i,[indx,ops,cofName,dcalc,dobs,esd] in enumerate(torsionList):
     861                    atoms = G2mth.GetAtomItemsById(Atoms,AtLookUp,indx,ct-1)
     862                    table.append([atoms[0]+'+('+ops[0]+') '+atoms[1]+'+('+ops[1]+') '+atoms[2]+ \
     863                    '+('+ops[2]+') '+atoms[3]+'+('+ops[3]+')',cofName,dcalc,dobs,esd])
     864                    rowLabels.append(str(i))
     865            torsionTable = G2gd.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     866            Torsions = G2gd.GSGrid(TorsionRestr)
     867            Torsions.SetTable(torsionTable, True)
     868            Torsions.AutoSizeColumns(False)
     869            for r in range(len(torsionList)):
     870                for c in range(2):
     871                    Torsions.SetReadOnly(r,c,True)
     872                    Torsions.SetCellStyle(r,c,VERY_LIGHT_GREY,True)
     873            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     874            G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     875            mainSizer.Add(Torsions,0,)
     876        else:
     877            mainSizer.Add(wx.StaticText(TorsionRestr,-1,'No torsion restraints for this phase'),0,)
     878
     879        TorsionRestr.SetSizer(mainSizer)
     880        Size = mainSizer.Fit(G2frame.dataFrame)
     881        Size[0] += 5
     882        Size[1] += 50       #make room for tab
     883        TorsionRestr.SetSize(Size)
     884        TorsionRestr.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
     885        G2frame.dataFrame.setSizePosLeft(Size)
     886
     887    def UpdateRamaRestr(ramaRestData):
     888
     889        def OnDeleteRestraint(event):
     890            rows = Volumes.GetSelectedRows()
     891            if not rows:
     892                return
     893            rows.sort()
     894            rows.reverse()
     895            for row in rows:
     896                ramaList.remove(ramaList[row])
     897            UpdateRamaRestr(ramaRestData)               
     898           
     899        RamaRestr.DestroyChildren()
     900        dataDisplay = wx.Panel(RamaRestr)
     901        mainSizer = wx.BoxSizer(wx.VERTICAL)
     902        mainSizer.Add((5,5),0)
     903        mainSizer.Add(WtBox(RamaRestr,ramaRestData),0,wx.ALIGN_CENTER_VERTICAL)
     904
     905        ramaList = ramaRestData['Ramas']
     906        if len(ramaList):
     907            table = []
     908            rowLabels = []
     909            Types = 2*[wg.GRID_VALUE_STRING,]+3*[wg.GRID_VALUE_FLOAT+':10,2',]
     910            if 'macro' in General['Type']:
     911                colLabels = ['(res) A (res) B (res) C (res) D (res) E','coef name','calc','obs','esd']
     912                for i,[indx,ops,cofName,dcalc,dobs,esd] in enumerate(ramaList):
     913                    atoms = G2mth.GetAtomItemsById(Atoms,AtLookUp,indx,0,4)
     914                    name = ''
     915                    for atom in atoms:
     916                        name += '('+atom[1]+atom[0].strip()+atom[2]+') '+atom[3]+' '
     917                    table.append([name,cofName,dcalc,dobs,esd])
     918                    rowLabels.append(str(i))
     919            else:
     920                colLabels = ['A+SymOp  B+SymOp  C+SymOp  D+SymOp  E+SymOp)','coef name','calc','obs','esd']
     921                for i,[indx,ops,cofName,dcalc,dobs,esd] in enumerate(ramaList):
     922                    atoms = G2mth.GetAtomItemsById(Atoms,AtLookUp,indx,ct-1)
     923                    table.append([atoms[0]+'+('+ops[0]+') '+atoms[1]+'+('+ops[1]+') '+atoms[2]+ \
     924                    '+('+ops[2]+') '+atoms[3]+'+('+ops[3]+')',cofName,dcalc,dobs,esd])
     925                    rowLabels.append(str(i))
     926            ramaTable = G2gd.Table(table,rowLabels=rowLabels,colLabels=colLabels,types=Types)
     927            Ramas = G2gd.GSGrid(RamaRestr)
     928            Ramas.SetTable(ramaTable, True)
     929            Ramas.AutoSizeColumns(False)
     930            for r in range(len(ramaList)):
     931                for c in range(2):
     932                    Ramas.SetReadOnly(r,c,True)
     933                    Ramas.SetCellStyle(r,c,VERY_LIGHT_GREY,True)
     934            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDeleteRestraint, id=G2gd.wxID_RESTDELETE)
     935            G2frame.dataFrame.Bind(wx.EVT_MENU, OnChangeEsd, id=G2gd.wxID_RESTCHANGEESD)
     936            mainSizer.Add(Ramas,0,)
     937        else:
     938            mainSizer.Add(wx.StaticText(RamaRestr,-1,'No Ramachandran restraints for this phase'),0,)
     939
     940        RamaRestr.SetSizer(mainSizer)
     941        Size = mainSizer.Fit(G2frame.dataFrame)
     942        Size[0] += 5
     943        Size[1] += 50       #make room for tab
     944        RamaRestr.SetSize(Size)
     945        RamaRestr.SetScrollbars(10,10,Size[0]/10-4,Size[1]/10-1)
     946        G2frame.dataFrame.setSizePosLeft(Size)
     947
    604948    def OnPageChanged(event):
    605949        page = event.GetSelection()
     
    621965            chiralRestData = restrData['Chiral']
    622966            UpdateChiralRestr(chiralRestData)
     967        elif text == 'Torsion restraints':
     968            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.RestraintMenu)
     969            torsionRestData = restrData['Torsion']
     970            UpdateTorsionRestr(torsionRestData)
     971        elif text == 'Ramachandran restraints':
     972            G2gd.SetDataMenuBar(G2frame,G2frame.dataFrame.RestraintMenu)
     973            ramaRestData = restrData['Rama']
     974            UpdateRamaRestr(ramaRestData)
    623975        event.Skip()
    624976
     
    6531005    ChiralRestr = wx.ScrolledWindow(G2frame.dataDisplay)
    6541006    G2frame.dataDisplay.AddPage(ChiralRestr,'Chiral restraints')
     1007    TorsionRestr = wx.ScrolledWindow(G2frame.dataDisplay)
     1008    G2frame.dataDisplay.AddPage(TorsionRestr,'Torsion restraints')
     1009    RamaRestr = wx.ScrolledWindow(G2frame.dataDisplay)
     1010    G2frame.dataDisplay.AddPage(RamaRestr,'Ramachandran restraints')
     1011   
    6551012    UpdateBondRestr(restrData['Bond'])
    6561013
Note: See TracChangeset for help on using the changeset viewer.