Ignore:
Timestamp:
Sep 28, 2016 12:16:00 PM (5 years ago)
Author:
vondreele
Message:

add make magnetic phase to General/Transform? option
trap missing rigid bodies to define torsion seq option
fix lighting issues for polygons
fix xye importer to stop on trailing blank lines rather than crashing
fix error in powder structure factor calc
add magnetic structure factor calc. (some error still & no derivatives yet)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r2476 r2480  
    229229    return UijtoU6(Uij)
    230230   
    231 def TransformPhase(oldPhase,newPhase,Trans,Vec):
     231def TransformPhase(oldPhase,newPhase,Trans,Vec,ifMag):
    232232    '''Transform atoms from oldPhase to newPhase by Trans & Vec
    233233    NB: doesnt transform moments correctly - TBD
     
    238238    :param Trans: array transformation matrix
    239239    :param Vec: array transformation vector
     240    :param ifMag: bool True if convert to magnetic phase
    240241    '''
    241242   
     
    252253                    atom[cx+i] += 1.
    253254                newAtoms += moreAtoms
     255    if ifMag:
     256        cia += 3
     257        cs += 3
     258        newPhase['General']['Type'] = 'magnetic'
     259        newPhase['General']['AtomPtrs'] = [cx,ct,cs,cia]
     260        magAtoms = []
     261        for atom in newAtoms:
     262            magAtoms.append(atom[:cx+4]+[0.,0.,0.]+atom[cx+4:])
     263        newAtoms = magAtoms
     264        newPhase['Draw Atoms'] = []
    254265    for atom in newAtoms:
    255266        atom[cx:cx+3] = TransformXYZ(atom[cx:cx+3],invTrans.T,Vec)%1.
Note: See TracChangeset for help on using the changeset viewer.