Changeset 2189
- Timestamp:
- Mar 31, 2016 4:12:34 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/GSASIIpwd.py
r2187 r2189 37 37 import GSASIImath as G2mth 38 38 import pypowder as pyd 39 import pydiffax as pyx39 #import pydiffax as pyx 40 40 41 41 # trig functions in degrees -
trunk/fsource/pydiffax.for
r2188 r2189 1 SUBROUTINE PYGETSADP(CNTRLS,NSADP,SADP,HKLIM,INCR) 2 3 Cf2py intent(in) CNTRLS 4 Cf2py intent(in) NSADP 5 Cf2py intent(in/out) SADP 6 Cf2py depend(NSADP) SADP 7 Cf2py intent(out) HKLIM 8 Cf2py intent(out) INCR 9 10 INCLUDE 'DIFFaXsubs/DIFFaX.par' 11 INCLUDE 'DIFFaXsubs/DIFFaX.inc' 12 13 EXTERNAL GET_G,AGLQ16,GET_SYM 14 INTEGER*4 CNTRLS(7),NSADP,GET_SYM,i_plane,hk_lim,i,j,k 15 INTEGER*4 HKLIM 16 REAL*8 SADP(NSADP),AGLQ16,l_upper,INCR 17 LOGICAL ok,GET_G 18 19 20 i_plane = CNTRLS(2) 21 l_upper = CNTRLS(3) 22 C print *,n_actual,(l_n_atoms(i),i=1,n_actual) 23 C do j=1,n_actual 24 C do i=1,l_n_atoms(j) 25 C print *,a_name(i,j),(a_pos(k,i,j),k=1,3) 26 C end do 27 C end do 28 C print *, recrsv,inf_thick,xplcit,rndm,l_cnt,has_l_mirror 29 C do i=1,n_layers 30 C print *,' layer',i 31 C do j=1,n_layers 32 C print *,'layer',j,l_alpha(i,j),(l_r(k,i,j),k=1,3) 33 C end do 34 C end do 35 ok = .TRUE. 36 37 C print *,cell_a,cell_b,cell_c,cell_gamma,pnt_grp,SymGrpNo 38 c DoSymDump = .TRUE. 39 CALL SPHCST() 40 CALL DETUN() 41 ok = GET_G() 42 CALL OPTIMZ('GSAS-II',ok) 43 C print *,lambda,max_angle,h_bnd,k_bnd,l_bnd,no_trials, 44 C 1 rad_type,X_RAY,n_atoms 45 C print *,(l_g(j),j=1,n_layers) 46 C do j=1,n_layers 47 C print *,(hx_ky(i,j),i=1,l_n_atoms(j)) 48 C print *,(mat(i,j),i=1,n_layers) 49 C print *,(mat1(i,j),i=1,n_layers) 50 C print *,(l_phi(i,j),i=1,n_layers) 51 C end do 52 CALL GETSAD(AGLQ16,i_plane,l_upper,hk_lim,'GSAS-II',ok) 53 HKLIM = hk_lim+1 54 INCR = dble(SADSIZE/2)/l_upper 55 if (i_plane.eq.1) then 56 INCR = INCR*sqrt(a0/c0) 57 else if (i_plane.eq.2) then 58 INCR = INCR*sqrt(b0/c0) 59 else if (i_plane.eq.3) then 60 INCR = INCR*sqrt((a0+b0+d0)/c0) 61 else if (i_plane.eq.4) then 62 INCR = INCR*sqrt((a0+b0-d0)/c0) 63 end if 64 do I=1,NSADP 65 SADP(i) = spec(i) 66 end do 67 RETURN 68 END 69 1 70 SUBROUTINE PYLOADSCF(NATP,ATYPES,SFDAT) 2 71 … … 183 252 184 253 185 SUBROUTINE PYGETSADP(CNTRLS,NSADP,SADP,HKLIM,INCR)186 187 Cf2py intent(in) CNTRLS188 Cf2py intent(in) NSADP189 Cf2py intent(in/out) SADP190 Cf2py depend(NSADP) SADP191 Cf2py intent(out) HKLIM192 Cf2py intent(out) INCR193 194 INCLUDE 'DIFFaXsubs/DIFFaX.par'195 INCLUDE 'DIFFaXsubs/DIFFaX.inc'196 197 INTEGER*4 CNTRLS(7),NSADP,GET_SYM,i_plane,hk_lim,i,j,k198 INTEGER*4 HKLIM199 REAL*8 SADP(NSADP),AGLQ16,l_upper,INCR200 LOGICAL ok,GET_G201 202 EXTERNAL AGLQ16,GET_SYM,GET_G203 204 i_plane = CNTRLS(2)205 l_upper = CNTRLS(3)206 C print *,n_actual,(l_n_atoms(i),i=1,n_actual)207 C do j=1,n_actual208 C do i=1,l_n_atoms(j)209 C print *,a_name(i,j),(a_pos(k,i,j),k=1,3)210 C end do211 C end do212 C print *, recrsv,inf_thick,xplcit,rndm,l_cnt,has_l_mirror213 C do i=1,n_layers214 C print *,' layer',i215 C do j=1,n_layers216 C print *,'layer',j,l_alpha(i,j),(l_r(k,i,j),k=1,3)217 C end do218 C end do219 ok = .TRUE.220 221 C print *,cell_a,cell_b,cell_c,cell_gamma,pnt_grp,SymGrpNo222 c DoSymDump = .TRUE.223 CALL SPHCST()224 CALL DETUN()225 ok = GET_G()226 CALL OPTIMZ('GSAS-II',ok)227 C print *,lambda,max_angle,h_bnd,k_bnd,l_bnd,no_trials,228 C 1 rad_type,X_RAY,n_atoms229 C print *,(l_g(j),j=1,n_layers)230 C do j=1,n_layers231 C print *,(hx_ky(i,j),i=1,l_n_atoms(j))232 C print *,(mat(i,j),i=1,n_layers)233 C print *,(mat1(i,j),i=1,n_layers)234 C print *,(l_phi(i,j),i=1,n_layers)235 C end do236 CALL GETSAD(AGLQ16,i_plane,l_upper,hk_lim,'GSAS-II',ok)237 HKLIM = hk_lim+1238 INCR = dble(SADSIZE/2)/l_upper239 if (i_plane.eq.1) then240 INCR = INCR*sqrt(a0/c0)241 else if (i_plane.eq.2) then242 INCR = INCR*sqrt(b0/c0)243 else if (i_plane.eq.3) then244 INCR = INCR*sqrt((a0+b0+d0)/c0)245 else if (i_plane.eq.4) then246 INCR = INCR*sqrt((a0+b0-d0)/c0)247 end if248 do I=1,NSADP249 SADP(i) = spec(i)250 end do251 RETURN252 END
Note: See TracChangeset
for help on using the changeset viewer.