Changeset 862


Ignore:
Timestamp:
Mar 2, 2013 9:19:42 AM (9 years ago)
Author:
vondreele
Message:

start on a reload of atom coordinates
small fix to rb stuff - redraw uses ball & sticks or sticks for macromolecules

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r859 r862  
    6060[ wxID_ATOMSEDITADD, wxID_ATOMSEDITINSERT, wxID_ATOMSEDITDELETE, wxID_ATOMSREFINE,
    6161    wxID_ATOMSMODIFY, wxID_ATOMSTRANSFORM, wxID_ATOMSVIEWADD, wxID_ATOMVIEWINSERT,
    62     wxID_RELOADDRAWATOMS,wxID_ATOMSDISAGL,wxID_ATOMMOVE,wxID_RBAPPEND,
     62    wxID_RELOADDRAWATOMS,wxID_ATOMSDISAGL,wxID_ATOMMOVE,wxID_RBAPPEND,wxID_ATOMSREIMPORT,
    6363    wxID_ASSIGNATMS2RB
    64 ] = [wx.NewId() for item in range(13)]
     64] = [wx.NewId() for item in range(14)]
    6565
    6666[ wxID_DRAWATOMSTYLE, wxID_DRAWATOMLABEL, wxID_DRAWATOMCOLOR, wxID_DRAWATOMRESETCOLOR,
     
    11421142        self.AtomEdit.Append(id=wxID_RELOADDRAWATOMS, kind=wx.ITEM_NORMAL,text='Reload draw atoms',
    11431143            help='Reload atom drawing list')
     1144        self.AtomEdit.Append(id=wxID_ATOMSREIMPORT, kind=wx.ITEM_NORMAL,text='Reimport atoms',
     1145            help='Reimport atoms from file; sequence must match')
    11441146        self.AtomCompute.Append(id=wxID_ATOMSDISAGL, kind=wx.ITEM_NORMAL,text='Distances && Angles',
    11451147            help='Compute distances & angles for selected atoms')
  • trunk/GSASIIphsGUI.py

    r861 r862  
    15071507            except KeyError:        # inside DistAngle for missing atom types in DisAglCtls
    15081508                print '**** ERROR - try again but do "Reset" to fill in missing atom types ****'
     1509               
     1510    def OnReImport(event):
     1511# sort of the right idea but don't want new tree entry!
     1512#        G2frame._Add_ImportMenu_Phase(G2frame.dataFrame.AtomEdit)
     1513        print 'reimport atoms from file to be developed'
    15091514                       
    15101515################################################################################
     
    30623067            G2gd.GetPatternTreeItemId(G2frame,G2frame.root,'Rigid bodies'))
    30633068        Indx = {}
     3069        atomStyle = 'balls & sticks'
     3070        if 'macro' in general['Type']:
     3071            atomStyle = 'sticks'
    30643072       
    30653073        def OnThermSel(event):       #needs to be seen by VecRbSizer!
     
    31403148                        data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i]
    31413149                    data['Drawing']['Atoms'] = []
    3142                     UpdateDrawAtoms('balls & sticks')
     3150                    UpdateDrawAtoms(atomStyle)
    31433151                    G2plt.PlotStructure(G2frame,data)
    31443152                except ValueError:
     
    31663174                        data['Atoms'][AtLookUp[id]][cx:cx+3] = newXYZ[i]
    31673175                    data['Drawing']['Atoms'] = []
    3168                     UpdateDrawAtoms('balls & sticks')
     3176                    UpdateDrawAtoms(atomStyle)
    31693177                    G2plt.PlotStructure(G2frame,data)
    31703178                except ValueError:
     
    32243232                Obj.SetValue("%10.3f"%(RBObj['Torsions'][item][0]))               
    32253233                data['Drawing']['Atoms'] = []
    3226                 UpdateDrawAtoms('balls & sticks')
     3234                UpdateDrawAtoms(atomStyle)
    32273235                drawAtoms.ClearSelection()
    32283236                G2plt.PlotStructure(G2frame,data)
     
    42934301            G2frame.dataFrame.Bind(wx.EVT_MENU, OnReloadDrawAtoms, id=G2gd.wxID_RELOADDRAWATOMS)
    42944302            G2frame.dataFrame.Bind(wx.EVT_MENU, OnDistAngle, id=G2gd.wxID_ATOMSDISAGL)
     4303            G2frame.dataFrame.Bind(wx.EVT_MENU, OnReImport, id=G2gd.wxID_ATOMSREIMPORT)
    42954304            FillAtomsGrid(Atoms)
    42964305        elif text == 'General':
Note: See TracChangeset for help on using the changeset viewer.