Changeset 4440


Ignore:
Timestamp:
May 26, 2020 10:44:15 AM (16 months ago)
Author:
vondreele
Message:

fix atom draw update problem when atoms not in unit cell2Arelated fixes for RMCProfile & fullrmc big box building routines

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/GSASIIlattice.py

    r4434 r4440  
    501501        XYZ = np.array(atom[cx:cx+3])
    502502        xyz = XYZ
     503        cellj = np.zeros(3,dtype=np.int32)
    503504        if Force:
    504             xyz %= 1.
     505            xyz,cellj = G2spc.MoveToUnitCell(xyz)
    505506        if atom[cia] == 'A':
    506507            Uij = atom[cia+2:cia+8]
    507             result = G2spc.GenAtom(xyz,SGData,False,Uij,True)
     508            result = G2spc.GenAtom(xyz,SGData,False,Uij,Force)
    508509            for item in result:
     510                item = list(item)
     511                item[2] += cellj
    509512#                if item[0][2] >= .95: item[0][2] -= 1.
    510513                atom[cx:cx+3] = item[0]
     
    519522                atomData.append(atom[:cia+9])  #not SS stuff
    520523        else:
    521             result = G2spc.GenAtom(xyz,SGData,False,Move=True)
     524            result = G2spc.GenAtom(xyz,SGData,False,Move=Force)
    522525            for item in result:
    523                 if item[0][2] >= .95: item[0][2] -= 1.
     526                item = list(item)
     527                item[2] += cellj
     528#                if item[0][2] >= .95: item[0][2] -= 1.
    524529                atom[cx:cx+3] = item[0]
    525530                if cm:
  • trunk/GSASIIpwd.py

    r4435 r4440  
    22412241    GB = G2lat.cell2Gmat( newPhase['General']['Cell'][1:7])[0]
    22422242    RMCPdict['Rmax'] = np.min(np.sqrt(np.array([1./G2lat.calc_rDsq2(H,GB) for H in [[1,0,0],[0,1,0],[0,0,1]]])))/2.
    2243     newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False,Force=False)
     2243    newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False,Force=True)
    22442244    Natm = np.core.defchararray.count(np.array(Atcodes),'+')    #no. atoms in original unit cell
    22452245    Natm = np.count_nonzero(Natm-1)
     
    27872787    newPhase['General']['SGData'] = G2spc.SpcGroup('P 1')[1]
    27882788    newPhase['General']['Cell'][1:] = G2lat.TransformCell(Cell,Trans.T)
    2789     newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False,Force=False)
     2789    newPhase,Atcodes = G2lat.TransformPhase(Phase,newPhase,Trans,np.zeros(3),np.zeros(3),ifMag=False,Force=True)
    27902790    Atoms = newPhase['Atoms']
    27912791
  • trunk/GSASIIspc.py

    r4253 r4440  
    20262026    :returns: XYZ - numpy array of new coordinates now 0 or greater and less than 1
    20272027    '''
    2028     XYZ = (np.array(xyz)+10.)%1.
     2028    XYZ = np.array(xyz)%1.
    20292029    cell = np.asarray(np.rint(XYZ-xyz),dtype=np.int32)
    20302030    return XYZ,cell
     
    20842084    mj = 0
    20852085    cell0 = np.zeros(3,dtype=np.int32)
    2086     if Move:
    2087         X,cell0 = MoveToUnitCell(X)
    20882086    for ic,cen in enumerate(icen):
    20892087        C = np.array(cen)
Note: See TracChangeset for help on using the changeset viewer.