Changeset 2285 for trunk/GSASIIphsGUI.py
- Timestamp:
- May 21, 2016 1:19:32 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIphsGUI.py
r2278 r2285 79 79 mainFrame.setSizePosLeft(Size) 80 80 81 #def FindBondsToo(): #works but slow for large structures - keep as reference82 # cx,ct,cs,ci = data['Drawing']['atomPtrs']83 # atomData = data['Drawing']['Atoms']84 # generalData = data['General']85 # Amat,Bmat = G2lat.cell2AB(generalData['Cell'][1:7])86 # radii = generalData['BondRadii']87 # atomTypes = generalData['AtomTypes']88 # try:89 # indH = atomTypes.index('H')90 # radii[indH] = 0.591 # except:92 # pass93 # for atom in atomData:94 # atom[-1] = []95 # Atoms = []96 # for i,atom in enumerate(atomData):97 # Atoms.append([i,np.array(atom[cx:cx+3]),atom[cs],radii[atomTypes.index(atom[ct])]])98 # for atomA in Atoms:99 # if atomA[2] in ['lines','sticks','ellipsoids','balls & sticks','polyhedra']:100 # for atomB in Atoms:101 # Dx = atomB[1]-atomA[1]102 # DX = np.inner(Amat,Dx)103 # dist = np.sqrt(np.sum(DX**2))104 # sumR = atomA[3]+atomB[3]105 # if 0.5 < dist <= 0.85*sumR:106 # i = atomA[0]107 # if atomA[2] == 'polyhedra':108 # atomData[i][-1].append(DX)109 # elif atomB[1] != 'polyhedra':110 # j = atomB[0]111 # atomData[i][-1].append(Dx*atomA[3]/sumR)112 # atomData[j][-1].append(-Dx*atomB[3]/sumR)113 114 81 def FindBondsDraw(data): 115 82 '''uses numpy & masks - very fast even for proteins! … … 479 446 generalData['SuperSg'] = SetDefaultSSsymbol() 480 447 generalData['SSGData'] = G2spc.SSpcGroup(generalData['SGData'],generalData['SuperSg'])[1] 448 Atoms = data['Atoms'] 449 cx = generalData['AtomPtrs'][0] 450 for atom in Atoms: 451 XYZ = atom[cx:cx+3] 452 Sytsym,Mult = G2spc.SytSym(XYZ,SGData) 453 atom[cx+4] = Sytsym 454 atom[cx+5] = Mult 481 455 wx.CallAfter(UpdateGeneral) 482 456
Note: See TracChangeset
for help on using the changeset viewer.