Changeset 5163


Ignore:
Timestamp:
Jan 27, 2022 2:58:15 PM (6 months ago)
Author:
vondreele
Message:

implement structure drawing that follows changes from sequential PDFfits

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIctrlGUI.py

    r5161 r5163  
    25292529            txtSizer.Add(st,pos=(i,col),flag=wx.EXPAND)
    25302530        txtSizer.AddGrowableRow(i)
    2531     txtSizer.AddGrowableCol(0)
     2531    txtSizer.AddGrowableCol(0)  #to fill screen
    25322532    spanel.SetSizer(txtSizer)
    25332533    btnsizer = wx.BoxSizer(wx.HORIZONTAL)
  • trunk/GSASIImath.py

    r5161 r5163  
    859859    parmDict = copy.deepcopy(seqData['parmDict'])
    860860    if PF2:
    861         print(parmDict)
    862         SGData = data['RMC']['PDFfit']['SGData']
     861        PDFData = data['RMC']['PDFfit']
     862        SGData = data['General']['SGData']
     863        AtmConstr = PDFData['AtomConstr']
     864        for ia,atom in enumerate(atoms):
     865            atxyz = atom[cx:cx+3]
     866            for ix in [0,1,2]:
     867                item =  AtmConstr[ia][ix+2]
     868                if '@' in item:
     869                    Ids = [itm[:2] for itm in item.split('@')[1:]]
     870                    for Id in Ids:
     871                        item = item.replace('@'+Id,str(parmDict[Id][0]))
     872                    atxyz[ix] = eval(item)
     873            if '@' in AtmConstr[ia][6]:
     874                itm = AtmConstr[ia][6].split('@')[:2][1]
     875                atuij = np.array([parmDict[itm][0],parmDict[itm][0],parmDict[itm][0],0.0,0.0,0.0])
     876            indx = FindAtomIndexByIDs(drawAtoms,dci,[atom[cia+8],],True)
     877            for ind in indx:
     878                drawatom = drawAtoms[ind]
     879                opr = drawatom[dcs-1]
     880                #how do I handle Sfrac? - fade the atoms?
     881                X,U = G2spc.ApplyStringOps(opr,SGData,atxyz,atuij)
     882                drawatom[dcx:dcx+3] = X
     883                drawatom[dci-6:dci] = U
    863884    else:
    864885        SGData = data['General']['SGData']
  • trunk/GSASIIphsGUI.py

    r5162 r5163  
    64196419            G2frame.GPXtree.SelectItem(Id)
    64206420
    6421         else:
     6421        else: #normal
    64226422            if sys.platform.lower().startswith('win'):
    64236423                Proc = subp.Popen('pdffit2.bat',creationflags=subp.CREATE_NEW_CONSOLE)
     
    72497249            mainSizer.Add((-1,10))
    72507250            slideSizer = wx.FlexGridSizer(0,4,0,0)
    7251             #slideSizer.AddGrowableCol(3,1)
    72527251            modeDisp = ISOdata['modeDispl']
    72537252            idsp = 0
Note: See TracChangeset for help on using the changeset viewer.