Changeset 2806


Ignore:
Timestamp:
Apr 24, 2017 10:49:46 AM (6 years ago)
Author:
toby
Message:

Revise space group entry

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrls.py

    r2802 r2806  
    21032103    :param str value: default input value, if any
    21042104    '''
    2105     def __init__(self,parent,title,prompt,value='',size=(200,-1)):
     2105    def __init__(self,parent,title,prompt,value='',size=(200,-1),help=''):
    21062106        wx.Dialog.__init__(self,parent,wx.ID_ANY,title,
    21072107                           pos=wx.DefaultPosition,
     
    21122112        self.panel = wx.Panel(self)
    21132113        mainSizer = wx.BoxSizer(wx.VERTICAL)
     2114        if help:
     2115            sizer1 = wx.BoxSizer(wx.HORIZONTAL)   
     2116            sizer1.Add((-1,-1),1, wx.EXPAND, 0)
     2117            sizer1.Add(HelpButton(self.panel,help),0,wx.ALIGN_RIGHT|wx.ALL)
     2118            mainSizer.Add(sizer1,0,wx.ALIGN_RIGHT|wx.EXPAND)
    21142119        mainSizer.Add(wx.StaticText(self.panel,-1,self.prompt),0,wx.ALIGN_CENTER)
    21152120        self.valItem = wx.TextCtrl(self.panel,-1,value=self.value,size=size)
  • trunk/GSASIIphsGUI.py

    r2800 r2806  
    435435               
    436436            def OnSpaceGroup(event):
    437                 event.Skip()
    438                 Flds = SGTxt.GetValue().split()
     437                helptext = '''\t\t\tGSAS-II space group information
     438               
     439Space groups are entered here as given in Volume A of the International Tables,
     440except that spaces are placed between operators (e.g. "P 4/m m m" or "P -3 1 m").
     441
     442Where a centrosymmetric space group has alternate origin settings, Origin 2 (with
     443the center of symmetry at the origin, which gives a -x,-y,-z symmetry operator) is
     444always used.
     445
     446For rhombohedral space groups, (R xxx) the hexagonal setting is assumed. Append a
     447final R to the name (R xxx R) to indicate that a rhombohedral cell should be
     448used (not recommended when alpha >> 120, due to correlation.)
     449
     450GSAS-II will accept non-standard settings of space groups. For example, space
     451group "P -1" can be set to include face centering, using symbol "F -1".
     452
     453Review the symmetry operators generated by GSAS-II to confirm that you have
     454entered the right symbol for your structure.
     455'''
     456                dlg = G2G.SingleStringDialog(General,
     457                                          'Get Space Group',
     458                                          'Input the space group with spaces between operators (e.g. P 4/m m m)',
     459                                          value=generalData['SGData']['SpGrp'],help=helptext)
     460                if not dlg.Show():
     461                    dlg.Destroy()
     462                    return
     463                else:
     464                    Flds = dlg.GetValue().split()
     465                    dlg.Destroy()
    439466                #get rid of extra spaces between fields first
    440467                for fld in Flds: fld = fld.strip()
     
    448475                if SGErr:
    449476                    text = [G2spc.SGErrors(SGErr)+'\nSpace Group set to previous']
    450                     SGTxt.SetValue(generalData['SGData']['SpGrp'])
     477                    SGTxt.SetLabel(generalData['SGData']['SpGrp'])
    451478                    msg = 'Space Group Error'
    452479                    Style = wx.ICON_EXCLAMATION
     
    456483                    text,table = G2spc.SGPrint(SGData)
    457484                    generalData['SGData'] = SGData
    458                     SGTxt.SetValue(generalData['SGData']['SpGrp'])
     485                    SGTxt.SetLabel(generalData['SGData']['SpGrp'])
    459486                    msg = 'Space Group Information'
    460487                    G2gd.SGMessageBox(General,msg,text,table).Show()
     
    529556            nameSizer.Add(TypeTxt,0,WACV)
    530557            nameSizer.Add(wx.StaticText(General,-1,'  Space group: '),0,WACV)
    531             SGTxt = wx.TextCtrl(General,-1,value=generalData['SGData']['SpGrp'],style=wx.TE_PROCESS_ENTER)
    532             SGTxt.Bind(wx.EVT_TEXT_ENTER,OnSpaceGroup)
     558            SGTxt = wx.Button(General,wx.ID_ANY,generalData['SGData']['SpGrp'],size=(100,-1))
     559            SGTxt.Bind(wx.EVT_BUTTON,OnSpaceGroup)
    533560            nameSizer.Add(SGTxt,0,WACV)
    534561            if generalData['Type'] in ['nuclear','magnetic']:
Note: See TracChangeset for help on using the changeset viewer.