Changeset 857


Ignore:
Timestamp:
Feb 24, 2013 9:31:41 AM (10 years ago)
Author:
vondreele
Message:

fix Uiso & Uij atom editing for atoms in rigid bodies

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIphsGUI.py

    r856 r857  
    756756            exclList = ['X' for i in range(len(rbObj['Ids']))]
    757757            rbAtmDict.update(dict(zip(rbObj['Ids'],exclList)))
    758         # for vector one exclList will be 'x' or 'xu' if TLS used in RB
     758            if rbObj['ThermalMotion'][0] != 'None':
     759                for id in rbObj['Ids']:
     760                    rbAtmDict[id] += 'U'           
     761        # exclList will be 'x' or 'xu' if TLS used in RB
    759762        Items = [G2gd.wxID_ATOMSEDITINSERT,G2gd.wxID_ATOMSEDITDELETE,G2gd.wxID_ATOMSREFINE,
    760763            G2gd.wxID_ATOMSMODIFY,G2gd.wxID_ATOMSTRANSFORM,G2gd.wxID_ATOMVIEWINSERT,G2gd.wxID_ATOMMOVE]
     
    912915                        if not Atoms.IsReadOnly(r,c):
    913916                            if Atoms.GetColLabelValue(c) == 'refine':
    914                                 atomData[r][c] = parms.replace(rbAtmDict.get(atomData[r][-1],''),'')
     917                                rbExcl = rbAtmDict.get(atomData[r][-1],'')
     918                                for excl in rbExcl:
     919                                    atomData[r][c] = parms.replace(excl,'')
    915920                            else:
    916921                                atomData[r][c] = parms
     
    10931098            for row in range(Atoms.GetNumberRows()):
    10941099                atId = atomData[row][-1]
    1095                 if 'X' in rbAtmDict.get(atId,''):
     1100                rbExcl = rbAtmDict.get(atId,'')
     1101                if 'X' in rbExcl:
    10961102                    for c in range(0,colX+3):
    10971103                        if c != colR:
     
    11081114                        Atoms.SetCellTextColour(row,ci,BLACK)
    11091115                        Atoms.SetCellStyle(row,ci,VERY_LIGHT_GREY,True)
    1110                         if CSI[2][i]:
     1116                        if CSI[2][i] and 'U' not in rbExcl:
    11111117                            Atoms.SetCellStyle(row,ci,WHITE,False)
    11121118                else:
    11131119                    Atoms.SetCellStyle(row,colUiso,WHITE,False)
    11141120                    Atoms.SetCellTextColour(row,colUiso,BLACK)
     1121                    if 'U' in rbExcl:
     1122                        Atoms.SetCellStyle(row,colUiso,VERY_LIGHT_GREY,True)
    11151123                    for i in range(6):
    11161124                        ci = colU11+i
Note: See TracChangeset for help on using the changeset viewer.