Changeset 1061 for trunk/GSASIImath.py
 Timestamp:
 Sep 20, 2013 11:34:41 AM (8 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIImath.py
r1060 r1061 402 402 for tor,seq in zip(RBObj['Torsions'],RBRes['rbSeq']): 403 403 QuatA = AVdeg2Q(tor[0],Cart[seq[0]]Cart[seq[1]]) 404 Cart[seq[3]] = prodQVQ(Quata,(Cart[seq[3]]Cart[seq[1]]).T).T+Cart[seq[1]] 405 # for ride in seq[3]: 406 # Cart[ride] = prodQVQ(QuatA,Cart[ride]Cart[seq[1]])+Cart[seq[1]] 404 Cart[seq[3]] = prodQVQ(QuatA,(Cart[seq[3]]Cart[seq[1]]))+Cart[seq[1]] 407 405 XYZ = np.zeros_like(Cart) 408 406 for i,xyz in enumerate(Cart): … … 442 440 for itor,seq in enumerate(RBRes['rbSeq']): 443 441 QuatA = AVdeg2Q(model['Tor'][0][itor],Cart[seq[0]]Cart[seq[1]]) 444 for ride in seq[3]: 445 Cart[ride] = prodQVQ(QuatA,Cart[ride]Cart[seq[1]])+Cart[seq[1]] 442 Cart[seq[3]] = prodQVQ(QuatA,(Cart[seq[3]]Cart[seq[1]]))+Cart[seq[1]] 446 443 if model['MolCent'][1]: 447 444 Cart = model['MolCent'][0] … … 2565 2562 for itor,seq in enumerate(RBRes['rbSeq']): 2566 2563 QuatA = AVdeg2Q(parmDict[pfx+'Tor'+str(itor)],Cart[seq[0]]Cart[seq[1]]) 2567 # Cart[seq[3]] = prodQVQ(QuatA,Cart[seq[3]]Cart[seq[1]])+Cart[seq[1]] 2568 for ride in seq[3]: 2569 Cart[ride] = prodQVQ(QuatA,Cart[ride]Cart[seq[1]])+Cart[seq[1]] 2564 Cart[seq[3]] = prodQVQ(QuatA,Cart[seq[3]]Cart[seq[1]])+Cart[seq[1]] 2570 2565 if parmDict[pfx+'MolCent'][1]: 2571 2566 Cart = parmDict[pfx+'MolCent'][0] 2572 2567 Qori = AVdeg2Q(parmDict[pfx+'Qa'],[parmDict[pfx+'Qi'],parmDict[pfx+'Qj'],parmDict[pfx+'Qk']]) 2573 2568 Pos = np.array([parmDict[pfx+'Px'],parmDict[pfx+'Py'],parmDict[pfx+'Pz']]) 2574 for i,x in enumerate(Cart): 2575 X = np.inner(Bmat,prodQVQ(Qori,x))+Pos 2576 for j in range(3): 2577 Xdata[j][iatm] = X[j] 2569 Xdata.T[iatm:iatm+len(Cart)] = np.inner(prodQVQ(Qori,Cart),Bmat)+Pos 2570 for i in range(len(Cart)): 2578 2571 Tdata[iatm] = aTypes.index(RBRes['rbTypes'][i]) 2579 2572 iatm += 1 … … 2851 2844 T10 = Q[3]*Q[3] 2852 2845 M = np.array([[T8+T10,T6T4,T3+T7],[T4+T6,T5+T10,T9T2],[T7T3,T2+T9,T5+T8]]) 2853 VP = 2.*np.inner( M,V)2846 VP = 2.*np.inner(V,M) 2854 2847 return VP+V 2855 2848
Note: See TracChangeset
for help on using the changeset viewer.