Changeset 1935 for trunk/GSASIIphsGUI.py
- Timestamp:
- Jul 20, 2015 9:25:46 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r1933 r1935 157 157 generalData['4DmapData'] = mapDefault.copy() 158 158 generalData['4DmapData'].update({'MapType':'Fobs'}) 159 if 'HydIds' not in generalData: 160 generalData['HydIds'] = {} 159 161 # end of patches 160 162 cx,ct,cs,cia = generalData['AtomPtrs'] … … 1188 1190 else: #'A' --> 'I' 1189 1191 Uij = atomData[r][ui:ui+6] 1190 Uiso = (Uij[0]+Uij[1]+Uij[2])/3.0 1192 Uiso = (Uij[0]+Uij[1]+Uij[2])/3.0 1191 1193 atomData[r][us] = Uiso 1192 1194 Atoms.SetCellStyle(r,us,WHITE,False) … … 1600 1602 mapError = True 1601 1603 continue 1602 Hxyz = G2mth.AddHydrogens(AtLookUp,generalData,atomData,AddHydIds[ineigh])1604 Hxyz,HU = G2mth.AddHydrogens(AtLookUp,generalData,atomData,AddHydIds[ineigh]) 1603 1605 for iX,X in enumerate(Hxyz): 1604 1606 Nat += 1 1605 1607 AtomAdd(X[0],X[1],X[2],'H','H(%d)'%(Nat)) 1608 data['Atoms'][-1][cia+1] = HU[iX] 1606 1609 Id = data['Atoms'][-1][cia+8] 1607 1610 HydIds[Id] = [iX,AddHydIds[ineigh]] … … 1609 1612 G2frame.ErrorDialog('Add H atom error','Adding O-H atoms requires delt-F map') 1610 1613 SetupGeneral() 1611 data['General']['HydIds'] = HydIds1614 data['General']['HydIds'].update(HydIds) 1612 1615 G2frame.dataFrame.AtomEdit.Enable(G2gd.wxID_UPDATEHATOM,True) 1613 1616 FillAtomsGrid(Atoms) … … 1624 1627 AtLookUp = G2mth.FillAtomLookUp(atomData,cia+8) 1625 1628 HydIds = data['General']['HydIds'] 1629 delList = [] 1626 1630 for HId in HydIds: 1627 1631 hydIds = HydIds[HId] 1628 1632 num = hydIds[0] 1629 Hxyz = G2mth.AddHydrogens(AtLookUp,generalData,atomData,hydIds[1])1633 Hxyz,HU = G2mth.AddHydrogens(AtLookUp,generalData,atomData,hydIds[1]) 1630 1634 try: 1631 1635 data['Atoms'][AtLookUp[HId]][cx:cx+3] = Hxyz[num] 1636 data['Atoms'][-1][cia+1] = HU[num] 1632 1637 except KeyError: 1633 Error += 'Hydrogen atom not in atom list - ignored\n'1638 delList.append(HId) 1634 1639 continue 1640 for HId in delList: #clear out deleted H-atoms 1641 del HydIds[HId] 1635 1642 data['Drawing']['Atoms'] = [] 1636 1643 UpdateDrawAtoms() 1637 1644 FillAtomsGrid(Atoms) 1638 1645 G2plt.PlotStructure(G2frame,data) 1639 if Error:1640 wx.MessageBox(Error,caption=' H atom update Error',style=wx.ICON_EXCLAMATION)1641 1646 1642 1647 def OnAtomMove(event):
Note: See TracChangeset
for help on using the changeset viewer.