Ignore:
Timestamp:
Aug 30, 2018 4:49:24 PM (3 years ago)
Author:
vondreele
Message:

delete MAXMAGN - not using it any more
fix (maybe) mag constraints; works for orthogonal axes
fix bug in ReadPowerInstprm?
spelling of Levenberg!
fixes to mag structure from Bilbao stuff
set dmin to be min 1A for UnitCell? show reflections
fix Latt2text to show '-' & Trans2text
fix ext test in GetHistogramPhaseData? for mag structures

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIconstrGUI.py

    r3567 r3577  
    12891289    detTrans = np.abs(nl.det(Trans))
    12901290    invTrans = nl.inv(Trans)
    1291 #    print 'invTrans',invTrans
    12921291    nAcof = G2lat.cell2A(newPhase['General']['Cell'][1:7])
    12931292   
     
    13231322        if Nop < 0:         #inversion
    13241323            Opr *= -1
    1325         XOpr = np.inner(Opr,invTrans)
    1326 #        for ix,name in enumerate(xnames):
     1324        XOpr = np.inner(Opr,Trans)
    13271325        for ix in list(set(CSX[0])):
    13281326            if not ix:
     
    13351333                    DepCons.append([opval,G2obj.G2VarObj('%d::%s:%s'%(opId,xnames[iop],iat))])
    13361334            if len(DepCons) == 1:
    1337                 constraints['Phase'].append([IndpCon,DepCons[0],None,None,'e'])
     1335                constraints['Phase'].append([DepCons[0],IndpCon,None,None,'e'])
    13381336            elif len(DepCons) > 1:
    13391337                for Dep in DepCons:
     
    13431341            IndpCon = [1.0,G2obj.G2VarObj('%d::%s:%d'%(npId,name,ia))]
    13441342            DepCons = [1.0,G2obj.G2VarObj('%d::%s:%s'%(opId,name,iat))]
    1345             constraints['Phase'].append([IndpCon,DepCons,None,None,'e'])
     1343            constraints['Phase'].append([DepCons,IndpCon,None,None,'e'])
    13461344#        for iu,Uid in enumerate(Uids):
    13471345        for iu in list(set(CSU[0])):
     
    13591357                        DepCons.append([Trans[ibu,iau]/detTrans,G2obj.G2VarObj(parm)])
    13601358            if len(DepCons) == 1:
    1361                 constraints['Phase'].append([IndpCon,DepCons[0],None,None,'e'])
     1359                constraints['Phase'].append([DepCons[0],IndpCon,None,None,'e'])
    13621360            elif len(DepCons) > 1:       
    13631361                for Dep in DepCons:
     
    13791377        for iat in range(3):
    13801378            if nSGData['SGLaue'] in ['-1','2/m']:       #set holds
    1381                 if (abs(nAcof[iA]) < 1.e-8) and (abs(Trans[Aid[0],Aid[1]]) < 1.e-8):
     1379                if (abs(nAcof[iA]) < 1.e-8) and (abs(invTrans[Aid[0],Aid[1]]) < 1.e-8):
    13821380                    if Axes[iat] != nSGData['SGUniq'] and nSGData['SGLaue'] != oSGData['SGLaue']:
    13831381                        HoldObj = G2obj.G2VarObj('%d::%s'%(npId,Aid[2]))
     
    13871385                            continue
    13881386            for ibt in range(3):
    1389                 if abs(Trans[Aid[0],iat]) > 1.e-4 and abs(Trans[Aid[1],ibt]) > 1.e-4 and abs(oAcof[iA]) > 1.e-8:
     1387                if abs(Trans[Aid[0],iat]) > 1.e-4 and abs(invTrans[Aid[1],ibt]) > 1.e-4 and abs(oAcof[iA]) > 1.e-8:
    13901388                    parm = SetUniqAj(opId,Anames[ibt][iat],nSGData['SGLaue'])
    13911389                    parmDict[parm] = oAcof[As.index(Anames[ibt][iat])]
    13921390                    if not parm in varyList:
    13931391                        varyList.append(parm)
    1394                     DepCons.append([Trans[ibt,iat],G2obj.G2VarObj(parm)])
     1392                    DepCons.append([invTrans[ibt,iat]*invTrans[iat,ibt],G2obj.G2VarObj(parm)])
    13951393        if len(DepCons) == 1:
    13961394            constraints['Phase'].append([IndpCon,DepCons[0],None,None,'e'])
     
    14101408        IndpCon = [1.0,G2obj.G2VarObj(ohapkey+'Scale')]
    14111409        DepCons = [detTrans,G2obj.G2VarObj(nhapkey+'Scale')]
    1412         constraints['HAP'].append([IndpCon,DepCons,None,None,'e'])
     1410        constraints['HAP'].append([DepCons,IndpCon,None,None,'e'])
    14131411        for name in ['Size;i','Mustrain;i']:
    14141412            IndpCon = [1.0,G2obj.G2VarObj(ohapkey+name)]
Note: See TracChangeset for help on using the changeset viewer.