Changeset 4881


Ignore:
Timestamp:
Apr 11, 2021 2:48:38 PM (6 months ago)
Author:
vondreele
Message:

color nonpositive definita thermal parameters in red in Atom list

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r4880 r4881  
    724724   
    725725def Uij2Ueqv(Uij,GS,Amat):
    726     ''' returns 1/3 trace of diagonalized U matrix'''
     726    ''' returns 1/3 trace of diagonalized U matrix
     727    :param Uij: numpy array [Uij]
     728    :param GS: Uij too betaij conversion matrix
     729    :param Amat: crystal to Cartesian transformation matrix
     730    :returns: 1/3 trace of diagonalized U matrix
     731    :returns: True if nonpositive-definate; False otherwise
     732    '''
    727733    U = np.multiply(U6toUij(Uij),GS)
    728734    U = np.inner(Amat,np.inner(U,Amat).T)
    729735    E,R = nl.eigh(U)
    730     return np.sum(E)/3.
     736    return np.sum(E)/3.,E[0] < 0.
    731737       
    732738def CosAngle(U,V,G):
  • trunk/GSASIIphsGUI.py

    r4855 r4881  
    7979WHITE = wx.Colour(255,255,255)
    8080BLACK = wx.Colour(0,0,0)
     81RED = wx.Colour(255,0,0)
    8182WACV = wx.ALIGN_CENTER_VERTICAL
    8283mapDefault = G2elem.mapDefault
     
    34703471                        cj = colU11+i
    34713472                        Atoms.SetCellTextColour(row,cj,BLACK)
     3473                        if G2lat.Uij2Ueqv(atomData[row][colU11:colU11+6],GS,Amat)[1]:
     3474                            Atoms.SetCellTextColour(row,cj,RED)
    34723475                        Atoms.SetCellStyle(row,cj,VERY_LIGHT_GREY,True)
    34733476                        if CSI[2][i] and 'U' not in rbExcl:
     
    34763479                    Atoms.SetCellStyle(row,colUiso,WHITE,False)
    34773480                    Atoms.SetCellTextColour(row,colUiso,BLACK)
     3481                    if atomData[row][colUiso] < 0.:
     3482                        Atoms.SetCellTextColour(row,colUiso,RED)
    34783483                    if 'U' in rbExcl:
    34793484                        Atoms.SetCellStyle(row,colUiso,VERY_LIGHT_GREY,True)
     
    35113516            SetupDrawingData()
    35123517        generalData = data['General']
     3518        cell = generalData['Cell'][1:7]
     3519        Amat = G2lat.cell2AB(cell)[0]
     3520        GS = G2lat.cell2GS(cell)
    35133521        SpnFlp = generalData['SGData'].get('SpnFlp',[])
    35143522        atomData = data['Atoms']
Note: See TracChangeset for help on using the changeset viewer.