Changeset 4818 for trunk/GSASIIlattice.py
- Timestamp:
- Feb 16, 2021 3:17:35 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIlattice.py
r4810 r4818 19 19 The "*A* tensor" terms are defined as 20 20 :math:`A = (\\begin{matrix} G_{11} & G_{22} & G_{33} & 2G_{12} & 2G_{13} & 2G_{23}\\end{matrix})` and *A* can be used in this fashion: 21 :math:`d^* = \ sqrt {A_0 h^2 + A_1 k^2 + A_2 l^2 + A_3 hk + A_4 hl + A_5 kl}`, where21 :math:`d^* = \\sqrt {A_0 h^2 + A_1 k^2 + A_2 l^2 + A_3 hk + A_4 hl + A_5 kl}`, where 22 22 *d* is the d-spacing, and :math:`d^*` is the reciprocal lattice spacing, 23 23 :math:`Q = 2 \\pi d^* = 2 \\pi / d`. … … 1069 1069 else: 1070 1070 return True 1071 1072 def RBsymCheck(Atoms,ct,cx,cs,AtLookUp,Amat,RBObjIds,SGData): 1073 """ Checks members of a rigid body to see if one is a symmetry equivalent of another. 1074 If so the atom site frac is set to zero. 1075 param: Atoms: atom array as defined in GSAS-II; modified here 1076 param: ct: int location of atom type in Atoms item 1077 param: cx: int location of x,y,z,frac in Atoms item 1078 param: AtLookUp: dict: atom lookup by Id table 1079 param: Amat: np .array: crystal-to-Cartesian transformationmatri 1080 param: RBObjIds: list: atom Id belonging to rigid body being tested 1081 param: SGData: Dict: GSAS-II space group info. 1082 :return: Atoms with modified atom frac entries 1083 1084 """ 1085 for i,Id in enumerate(RBObjIds): 1086 XYZo = np.array(Atoms[AtLookUp[Id]][cx:cx+3])%1. 1087 typo = Atoms[AtLookUp[Id]][ct] 1088 for Jd in RBObjIds[i+1:]: 1089 if Atoms[AtLookUp[Jd]][ct] == typo: 1090 XYZt = Atoms[AtLookUp[Jd]][cx:cx+3] 1091 Xeqv = list(G2spc.GenAtom(np.array(XYZt)%1.,SGData,True)) 1092 close = [np.allclose(np.inner(Amat,XYZo),np.inner(Amat,eqv[0]),atol=0.01) for eqv in Xeqv] 1093 if True in close: 1094 Atoms[AtLookUp[Jd]][cx+3] = 0.0 1095 Sytsym,Mult = G2spc.SytSym(Atoms[AtLookUp[Id]][cx:cx+3],SGData)[:2] 1096 Atoms[AtLookUp[Id]][cs] = Sytsym 1097 Atoms[AtLookUp[Id]][cs+1] = Mult 1098 return Atoms 1071 1099 1072 1100 def GetBraviasNum(center,system):
Note: See TracChangeset
for help on using the changeset viewer.