Changeset 242 for trunk/GSASIIplot.py
- Timestamp:
- Jan 26, 2011 9:38:41 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
TabularUnified trunk/GSASIIplot.py ¶
r240 r242 1769 1769 for iat,atom in enumerate(drawingData['Atoms']): 1770 1770 x,y,z = atom[cx:cx+3] 1771 Bonds = atom[-1] 1771 Bonds = atom[-2] 1772 Faces = atom[-1] 1772 1773 try: 1773 1774 atNum = generalData['AtomTypes'].index(atom[ct]) … … 1780 1781 radius = 0.5 1781 1782 if atom[cs] != '': 1782 glLoadName(atom[- 2])1783 glLoadName(atom[-3]) 1783 1784 if 'balls' in atom[cs]: 1784 1785 vdwScale = drawingData['vdwScale'] … … 1829 1830 RenderBonds(x,y,z,Bonds,bondR,color) 1830 1831 elif atom[cs] == 'polyhedra': 1831 if len(Bonds) > 2: 1832 FaceGen = G2lat.uniqueCombinations(Bonds,3) #N.B. this is a generator 1833 Faces = [] 1834 for face in FaceGen: 1835 vol = nl.det(face) 1836 if abs(vol) > 1. or len(Bonds) == 3: 1837 if vol < 0.: 1838 face = [face[0],face[2],face[1]] 1839 norm = np.cross(face[1]-face[0],face[2]-face[0]) 1840 norm /= np.sqrt(np.sum(norm**2)) 1841 Faces.append([face,norm]) 1842 RenderPolyhedra(x,y,z,Faces,color) 1832 RenderPolyhedra(x,y,z,Faces,color) 1843 1833 elif atom[cs] == 'backbone': 1844 1834 if atom[ct-1].split()[0] in ['C','N']:
Note: See TracChangeset
for help on using the changeset viewer.