Changeset 2318 for trunk/GSASIIgrid.py
- Timestamp:
- Jun 13, 2016 9:11:36 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIgrid.py
r2317 r2318 1468 1468 help='Add a new bond distance pseudo-variable') 1469 1469 self.SequentialPvars.Append( 1470 id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text=' CalcAngle',1470 id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add Angle', 1471 1471 help='Add a new bond angle pseudo-variable') 1472 1472 self.SequentialPvars.Append( … … 2777 2777 Phase = Phases[pName] 2778 2778 General = Phase['General'] 2779 Cell = General['Cell'][1:7] 2780 Amat = G2lat.cell2AB(Cell)[0] 2779 cx,ct = General['AtomPtrs'][:2] 2780 pId = Phase['pId'] 2781 SGData = General['SGData'] 2782 sB = Tatom.find('(')+1 2783 symNo = 0 2784 if sB: 2785 sF = Tatom.find(')') 2786 symNo = int(Tatom[sB:sF]) 2787 cellNo = [0,0,0] 2788 cB = Tatom.find('[') 2789 if cB>0: 2790 cF = Tatom.find(']')+1 2791 cellNo = eval(Tatom[cB:cF]) 2792 Atoms = Phase['Atoms'] 2793 aNames = [atom[ct-1] for atom in Atoms] 2794 oId = aNames.index(Oatom) 2795 tId = aNames.index(Tatom.split(' +')[0]) 2781 2796 # create an expression object 2782 2797 obj = G2obj.ExpressionObj() 2783 2798 obj.expression = 'Dist(%s,%s)'%(Oatom,Tatom.split(' d=')[0].replace(' ','')) 2784 obj.distance_ stuff = {'Amat':Amat,}2785 obj.distance_atoms = [ 1,2]2799 obj.distance_dict = {'pId':pId,'SGData':SGData,'symNo':symNo,'cellNo':cellNo} 2800 obj.distance_atoms = [oId,tId] 2786 2801 else: 2787 2802 dlg.Destroy()
Note: See TracChangeset
for help on using the changeset viewer.