Changeset 4440
- Timestamp:
- May 26, 2020 10:44:15 AM (3 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIlattice.py
r4434 r4440 501 501 XYZ = np.array(atom[cx:cx+3]) 502 502 xyz = XYZ 503 cellj = np.zeros(3,dtype=np.int32) 503 504 if Force: 504 xyz %= 1.505 xyz,cellj = G2spc.MoveToUnitCell(xyz) 505 506 if atom[cia] == 'A': 506 507 Uij = atom[cia+2:cia+8] 507 result = G2spc.GenAtom(xyz,SGData,False,Uij, True)508 result = G2spc.GenAtom(xyz,SGData,False,Uij,Force) 508 509 for item in result: 510 item = list(item) 511 item[2] += cellj 509 512 # if item[0][2] >= .95: item[0][2] -= 1. 510 513 atom[cx:cx+3] = item[0] … … 519 522 atomData.append(atom[:cia+9]) #not SS stuff 520 523 else: 521 result = G2spc.GenAtom(xyz,SGData,False,Move= True)524 result = G2spc.GenAtom(xyz,SGData,False,Move=Force) 522 525 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. 524 529 atom[cx:cx+3] = item[0] 525 530 if cm: -
trunk/GSASIIpwd.py
r4435 r4440 2241 2241 GB = G2lat.cell2Gmat( newPhase['General']['Cell'][1:7])[0] 2242 2242 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) 2244 2244 Natm = np.core.defchararray.count(np.array(Atcodes),'+') #no. atoms in original unit cell 2245 2245 Natm = np.count_nonzero(Natm-1) … … 2787 2787 newPhase['General']['SGData'] = G2spc.SpcGroup('P 1')[1] 2788 2788 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) 2790 2790 Atoms = newPhase['Atoms'] 2791 2791 -
trunk/GSASIIspc.py
r4253 r4440 2026 2026 :returns: XYZ - numpy array of new coordinates now 0 or greater and less than 1 2027 2027 ''' 2028 XYZ = (np.array(xyz)+10.)%1.2028 XYZ = np.array(xyz)%1. 2029 2029 cell = np.asarray(np.rint(XYZ-xyz),dtype=np.int32) 2030 2030 return XYZ,cell … … 2084 2084 mj = 0 2085 2085 cell0 = np.zeros(3,dtype=np.int32) 2086 if Move:2087 X,cell0 = MoveToUnitCell(X)2088 2086 for ic,cen in enumerate(icen): 2089 2087 C = np.array(cen)
Note: See TracChangeset
for help on using the changeset viewer.