Changeset 2318 for trunk/GSASIIgrid.py


Ignore:
Timestamp:
Jun 13, 2016 9:11:36 PM (7 years ago)
Author:
vondreele
Message:

Add atom-atom distance to seq results table - needs debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIgrid.py

    r2317 r2318  
    14681468            help='Add a new bond distance pseudo-variable')
    14691469        self.SequentialPvars.Append(
    1470             id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Calc Angle',
     1470            id=wxADDSEQANGLE, kind=wx.ITEM_NORMAL,text='Add Angle',
    14711471            help='Add a new bond angle pseudo-variable')
    14721472        self.SequentialPvars.Append(
     
    27772777                Phase = Phases[pName]
    27782778                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])
    27812796                # create an expression object
    27822797                obj = G2obj.ExpressionObj()
    27832798                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]
    27862801        else:
    27872802            dlg.Destroy()
Note: See TracChangeset for help on using the changeset viewer.