Changeset 4175


Ignore:
Timestamp:
Oct 10, 2019 9:57:28 AM (4 years ago)
Author:
vondreele
Message:

fix transform for abc* matrix transposed; fix rounding issue fro transformed atoms
fix mag ss symmetry issues

Location:
trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3888 r4175  
    344344        newPhase['Draw Atoms'] = []
    345345    for atom in newAtoms:
    346         atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]+Uvec,invTrans.T,Vvec)%1.
     346        xyz = TransformXYZ(atom[cx:cx+3]+Uvec,invTrans.T,Vvec)%1.
     347        atom[cx:cx+3] = np.around(xyz,6)%1.
    347348        if atom[cia] == 'A':
    348349            atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],Trans)
  • trunk/GSASIIphsGUI.py

    r4173 r4175  
    327327                self.newCell[2:5] = [A[2,2],90.,90.]
    328328                a,b = G2lat.cell2AB(self.newCell[:6])
    329                 self.Trans = np.inner(a.T,B).T    #correct!
     329                self.Trans = np.inner(B,a).T    #correct!
    330330                self.ifConstr = False
    331331                self.newSpGrp = 'P 1'
  • trunk/GSASIIspc.py

    r4174 r4175  
    13091309    Ncv = len(SGData['SGCen'])
    13101310    sgOp = [M for M,T in SGData['SGOps']]
     1311    detM = [nl.det(M) for M in sgOp]
    13111312    oprName = [GetOprPtrName(str(irtx)) for irtx in PackRot(SGData['SGOps'])]
    13121313    if SGData['SGInv'] and not SGData['SGFixed']:
    13131314        Nsym *= 2
     1315        detM += [nl.det(-M) for M in sgOp]
    13141316        sgOp += [-M for M,T in SGData['SGOps']]
    13151317        oprName += [GetOprPtrName(str(-irtx)) for irtx in PackRot(SGData['SGOps'])]
     
    13171319    sgOps = []
    13181320    OprNames = []
     1321    detMs = []
    13191322    for incv in range(Ncv):
    13201323        Nsyms += Nsym
    13211324        sgOps += sgOp
     1325        detMs += detM
    13221326        OprNames += oprName
    13231327    if SGData['SGFixed']:
     
    13381342                except IndexError:
    13391343                    FlpSpn = [1,]+FlpSpn
    1340                     SpnFlp = np.concatenate((SpnFlp,SpnFlp[:Nsym]*FlpSpn[Nfl+incv-1]))                   
    1341     detM = [nl.det(M) for M in sgOp]
    1342     MagMom = SpnFlp*np.array(Ncv*detM)      #duplicate for no. centerings
     1344                    SpnFlp = np.concatenate((SpnFlp,SpnFlp[:Nsym]*FlpSpn[Nfl+incv-1]))
     1345        if SGData['SGGray']:
     1346           SpnFlp = np.concatenate((SpnFlp,-SpnFlp))
     1347           detMs =2*detMs                   
     1348    MagMom = SpnFlp*np.array(detMs)      #duplicate for no. centerings
    13431349    SGData['MagMom'] = MagMom
    13441350    return OprNames,SpnFlp
  • trunk/GSASIIstrMath.py

    r4169 r4175  
    14871487    SGInv = SGData['SGInv']
    14881488    SGMT = np.array([ops[0].T for ops in SGData['SGOps']])
    1489 #    Ncen = len(SGData['SGCen'])
     1489    Ncen = len(SGData['SGCen'])
    14901490    Nops = len(SGMT)*(1+SGData['SGInv'])
    14911491    SSGMT = np.array([ops[0].T for ops in SSGData['SSGOps']])
     
    16201620                fams += fam0[:,nxs,:,:,:]
    16211621                fbms += fbm0[:,nxs,:,:,:]
     1622            else:
     1623                fams *= Ncen
     1624                fbms *= Ncen
    16221625               
    16231626# do sum on ops, atms 1st                       
Note: See TracChangeset for help on using the changeset viewer.