Ignore:
Timestamp:
Sep 24, 2018 9:33:52 AM (3 years ago)
Author:
vondreele
Message:

fix mag space group counts
fix k-SUBGROUPSMAG k-vec input
fix lattice constraints between parent & mag phase

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3596 r3617  
    250250   
    251251    '''
    252     return np.inner(Mat,np.inner(G,Mat).T)
     252    return np.inner(np.inner(Mat,G),Mat)        #right
     253#    return np.inner(Mat,np.inner(Mat,G))       #right
     254#    return np.inner(np.inner(G,Mat).T,Mat)      #right
     255#    return np.inner(Mat,np.inner(G,Mat).T)     #right
    253256   
    254257def TransformCell(cell,Trans):
     
    277280    '''Transform atoms from oldPhase to newPhase
    278281    M' is inv(M)
    279     does X' = (X-U)M'+V transformation for coordinates and U' = MUM/det(M)
     282    does X' = M(X-U)+V transformation for coordinates and U' = MUM/det(M)
    280283    for anisotropic thermal parameters
    281284   
     
    300303    invTrans = nl.inv(Trans)
    301304    newAtoms,atCodes = FillUnitCell(oldPhase)
    302     Unit =[abs(int(max(unit))-1) for unit in Trans]
     305    Unit =[abs(int(max(unit))-1) for unit in Trans.T]
    303306    for i,unit in enumerate(Unit):
    304307        if unit > 0:
     
    334337        newPhase['Draw Atoms'] = []
    335338    for atom in newAtoms:
    336         atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]+Uvec,invTrans.T,Vvec)%1.
     339        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3]+Uvec,invTrans,Vvec)%1.
    337340        if atom[cia] == 'A':
    338341            atom[cia+2:cia+8] = TransformU6(atom[cia+2:cia+8],Trans)
     
    354357   
    355358def FindNonstandard(Phase):
     359    'This makes occasional mistakes!'
    356360    abc = np.eye(3)
    357361    cba = np.rot90(np.eye(3))
    358     cba[1,1] *= -1      #makes -cba
     362    cba[1,1] *= -1      #makes c-ba
    359363    Mats = {'abc':abc,'cab':np.roll(abc,1,1),'bca':np.roll(abc,2,1),
    360364            'acb':np.roll(cba,1,1),'bac':np.roll(cba,2,1),'cba':cba}        #ok
Note: See TracChangeset for help on using the changeset viewer.