Changeset 3703 for trunk/GSASIIspc.py
 Timestamp:
 Oct 24, 2018 4:30:34 PM (3 years ago)
 File:

 1 edited
Legend:
 Unmodified
 Added
 Removed

trunk/GSASIIspc.py
r3681 r3703 2557 2557 2558 2558 def DoFrac(): 2559 dF = None 2560 dFTP = None 2559 delt2 = np.eye(2)*0.001 2560 dF = fracFourier(tau,nH,delt2[:1],delt2[1:]).squeeze() 2561 dFTP = [] 2561 2562 if siteSym == '1': 2562 2563 CSI = [[1,0],[2,0]],2*[[1.,0.],] … … 2564 2565 CSI = [[1,0],[0,0]],2*[[1.,0.],] 2565 2566 else: 2566 delt2 = np.eye(2)*0.0012567 2567 FSC = np.ones(2,dtype='i') 2568 2568 CSI = [np.zeros((2),dtype='i'),np.zeros(2)] … … 2615 2615 2616 2616 def DoXYZ(): 2617 dX,dXTP = None,None 2617 delt4 = np.ones(4)*0.001 2618 delt5 = np.ones(5)*0.001 2619 delt6 = np.eye(6)*0.001 2620 if 'Fourier' in waveType: 2621 dX = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,nxs,nxs] 2622 #3x6x12 modulated position array (X,Spos,tau)& force positive 2623 elif waveType == 'Sawtooth': 2624 dX = posSawtooth(tau,delt4[0],delt4[1:]) 2625 elif waveType in ['ZigZag','Block']: 2626 if waveType == 'ZigZag': 2627 dX = posZigZag(tau,delt5[:2],delt5[2:]) 2628 else: 2629 dX = posBlock(tau,delt5[:2],delt5[2:]) 2630 dXTP = [] 2618 2631 if siteSym == '1': 2619 2632 CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],] … … 2621 2634 CSI = [[1,0,0],[2,0,0],[3,0,0], [0,0,0],[0,0,0],[0,0,0]],3*[[1.,0.,0.],]+3*[[0.,0.,0.],] 2622 2635 else: 2623 delt4 = np.ones(4)*0.0012624 delt5 = np.ones(5)*0.0012625 delt6 = np.eye(6)*0.0012626 2636 if 'Fourier' in waveType: 2627 dX = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(XYZ)[:,nxs,nxs]2628 #3x6x12 modulated position array (X,Spos,tau)& force positive2629 2637 CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))] 2630 2638 elif waveType == 'Sawtooth': 2631 dX = posSawtooth(tau,delt4[0],delt4[1:])2632 2639 CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0]]), 2633 2640 np.array([[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0]])] 2634 2641 elif waveType in ['ZigZag','Block']: 2635 if waveType == 'ZigZag':2636 dX = posZigZag(tau,delt5[:2],delt5[2:])2637 else:2638 dX = posBlock(tau,delt5[:2],delt5[2:])2639 2642 CSI = [np.array([[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0]]), 2640 2643 np.array([[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0],[1.0,.0,.0]])] … … 2717 2720 2718 2721 def DoUij(): 2719 dU,dUTP = None,None 2722 delt12 = np.eye(12)*0.0001 2723 dU = posFourier(tau,nH,delt12[:6],delt12[6:]) #Uij modulations  6x12x12 array 2724 dUTP = [] 2720 2725 if siteSym == '1': 2721 2726 CSI = [[1,0,0],[2,0,0],[3,0,0],[4,0,0],[5,0,0],[6,0,0], … … 2725 2730 6*[[0.,0.,0.],]+[[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.],[1.,0.,0.]] 2726 2731 else: 2727 tau = np.linspace(0,1,49,True)2728 delt12 = np.eye(12)*0.00012729 dU = posFourier(tau,nH,delt12[:6],delt12[6:]) #Uij modulations  6x12x12 array2730 2732 CSI = [np.zeros((12,3),dtype='i'),np.zeros((12,3))] 2731 2733 USC = np.ones(12,dtype='i') … … 2830 2832 2831 2833 def DoMag(): 2832 dM = [] 2834 delt6 = np.eye(6)*0.001 2835 dM = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(Mxyz)[:,nxs,nxs] 2833 2836 dMTP = [] 2834 2837 CSI = [[1,0,0],[2,0,0],[3,0,0], [4,0,0],[5,0,0],[6,0,0]],6*[[1.,0.,0.],] … … 2838 2841 CSI = 3*[[0,0,0],]+[[1,0,0],[2,0,0],[3,0,0]],3*[[0.,0.,0.],]+3*[[1.,0.,0.],] 2839 2842 else: 2840 tau = np.linspace(0,1,49,True)2841 delt6 = np.eye(6)*0.0012842 dM = posFourier(tau,nH,delt6[:3],delt6[3:]) #+np.array(Mxyz)[:,nxs,nxs]2843 2843 #3x6x12 modulated moment array (M,Spos,tau)& force positive 2844 2844 CSI = [np.zeros((6,3),dtype='i'),np.zeros((6,3))] … … 2955 2955 return CSI,dF,dFTP 2956 2956 else: 2957 return CSI 2957 return CSI,[],[] 2958 2958 2959 2959 def MustrainNames(SGData):
Note: See TracChangeset
for help on using the changeset viewer.