Ignore:
Timestamp:
May 28, 2018 11:03:32 AM (3 years ago)
Author:
vondreele
Message:

fix Transform to create correct(?) constraints between lattices, atom positions & anisotropic thermal parameters.
Checked for axes permutations in orthorhombic.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r3403 r3406  
    271271   
    272272def TransformU6(U6,Trans):
    273     Uij = np.inner(Trans,np.inner(U6toUij(U6),Trans).T)
     273    Uij = np.inner(Trans,np.inner(U6toUij(U6),Trans).T)/nl.det(Trans)
    274274    return UijtoU6(Uij)
    275275   
    276276def TransformPhase(oldPhase,newPhase,Trans,Uvec,Vvec,ifMag):
    277     '''Transform atoms from oldPhase to newPhase by Trans & Vec
     277    '''Transform atoms from oldPhase to newPhase
     278    M' is inv(M)
     279    does X' = (X-U)M'+V transformation for coordinates and U' = MUM/det(M)
     280    for anisotropic thermal parameters
    278281   
    279282    :param oldPhase: dict G2 phase info for old phase
    280283    :param newPhase: dict G2 phase info for new phase; with new cell & space group
    281284            atoms are from oldPhase & will be transformed
    282     :param Trans: array transformation matrix
    283     :param Vec: array transformation vector
     285    :param Trans: lattice transformation matrix M
     286    :param Uvec: array parent coordinates transformation vector U
     287    :param Vvec: array child coordinate transformation vector V
    284288    :param ifMag: bool True if convert to magnetic phase;
    285289        if True all nonmagnetic atoms will be removed
Note: See TracChangeset for help on using the changeset viewer.