Skip to content

Commit c42b451

Browse files
authored
Merge pull request #250 from ChemCryst/David
David
2 parents fec525e + ff4cd6f commit c42b451

File tree

1 file changed

+83
-5
lines changed

1 file changed

+83
-5
lines changed

crystals/punch.F

Lines changed: 83 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1767,6 +1767,8 @@ subroutine snum(coor,esd,nd,np,j,ivet)
17671767
END DO
17681768
ENDIF
17691769
C
1770+
THUSED = 0.
1771+
THMAXL6 = 0.
17701772
NINCL = 0 !Included in the refinement.
17711773
C
17721774
IDREF=0
@@ -1838,13 +1840,17 @@ subroutine snum(coor,esd,nd,np,j,ivet)
18381840
IALW = 1 !Used.
18391841
END IF
18401842
c
1843+
THETAL6=RTD*ASIN(SQRT(STORE(M6+16)*STORE(L13DC)*STORE(L13DC)))
1844+
THMAXL6=MAX(THMAXL6,THETAL6) ! Maximum thata in fcf file
18411845
IF (IALW.EQ.1) THEN
18421846
CUSED='incl'
18431847
NINCL = NINCL + 1
1848+
THUSED = MAX(THUSED,THETAL6) ! maximum theta used
18441849
ELSE
18451850
CUSED='excl'
1846-
ENDIF
1847-
IF ((IALW .EQ. 2) .AND. (FOS .GE. -10.*SIGMA))IALW = 1 !Mark USED for PLATON
1851+
ENDIF
1852+
C REMOVED SO THAT FCF STATUS ACCURATELY REFLECT THE L28 FILTERS
1853+
CPLATON IF ((IALW .EQ. 2) .AND. (FOS .GE. -10.*SIGMA))IALW = 1 !Mark USED for PLATON
18481854
MALW(IALW)=MALW(IALW)+1
18491855
IF (TWINNED) THEN
18501856
IELEMENT = NINT(STORE(M6+11))
@@ -1886,15 +1892,15 @@ subroutine snum(coor,esd,nd,np,j,ivet)
18861892
IF (KFR.EQ. KFOUT) THEN
18871893
WRITE(NCFPU1,1005)I,J,K,FOS,FCS,SIGMA,CALW(IALW),CUSED,WT
18881894
1 ,' # Theta=',
1889-
2 RTD*ASIN(SQRT(STORE(M6+16)*STORE(L13DC)*STORE(L13DC)))
1895+
2 THETAL6
18901896
ELSE
18911897
WRITE(NCFPU1,1005)I,J,K,FOS,FCS,SIGMA,CALW(IALW),CUSED
18921898
ENDIF
18931899
ELSE ! Fo REFINEMENT
18941900
IF (KFR.EQ.KFOUT) THEN
18951901
WRITE(NCFPU1,1005)I, J, K, FO, FC, S,CALW(IALW),CUSED,WT
1896-
1 ,' # Rho=',
1897-
2 RTD*ASIN(SQRT(STORE(M6+16)*STORE(L13DC)*STORE(L13DC)))
1902+
1 ,' # Theta=',
1903+
2 THETAL6
18981904
ELSE
18991905
WRITE(NCFPU1,1005)I, J, K, FO, FC, S,CALW(IALW),CUSED
19001906
ENDIF
@@ -1905,8 +1911,80 @@ subroutine snum(coor,esd,nd,np,j,ivet)
19051911
1850 CONTINUE
19061912
WRITE(NCFPU1,'(''# No of reflections output = '',I6)') IDREF
19071913
WRITE(NCFPU1,'(''# No of reflections in LSQ = '',I6)') NINCL
1914+
WRITE(NCFPU1,'(''# No of reflections excluded = '',I6)') IDREF-NINCL
1915+
WRITE(NCFPU1,'(
1916+
1 ''# Reflections can be excluded for several reasons'')')
1917+
C WRITE(NCFPU1,'(''# Ratio Unique/Expected Reflections ='',F6.3)')
1918+
C 1 FLOAT(IDREF)/NINCL
1919+
WRITE(NCFPU1,'(''# Maximum theta in file='',F6.2,
1920+
1 '' Maximum theta used='',f6.2)') THMAXL6
19081921
WRITE(NCFPU1,'(''# '',5(1X,A,A,I6))')
19091922
1 (CALW(I),' = ',MALW(I),I=1,5)
1923+
djw2=(FLOAT(IDREF)/NINCL)-1.
1924+
djw3=abs(djw2-nint(djw2))
1925+
CALL OUTCOL(9)
1926+
IVRF1=0
1927+
IF(DJW3.GE.0.1) THEN
1928+
IVRF1=1
1929+
WRITE(CMON,'(/
1930+
1 '' You may get a PLATON warning::''/
1931+
2 '' PLAT021_ALERT_4_B Ratio Unique / Expected reflections''/)')
1932+
c 3 '' Ratio = '', f6.3/)') (FLOAT(IDREF)/NINCL)
1933+
CALL XPRVDU(NCVDU, 5,0)
1934+
ENDIF
1935+
IVRF2=0
1936+
IF(THMAXL6.GT. THUSED) THEN
1937+
IVRF2=1
1938+
WRITE(CMON,'(/
1939+
1 '' You may get a PLATON warning::''/
1940+
1 '' PLAT920_ALERT_1_B Theta(Max) in CIF and FCF Differ by''
1941+
1 f6.2,/)') THMAXL6-THUSED
1942+
1
1943+
CALL XPRVDU(NCVDU,3,0)
1944+
ENDIF
1945+
IF(MAX(IVRF1,IVRF2).GE.1) THEN
1946+
WRITE(CMON,'(/
1947+
1 ''See the end of the fcf file for model vrf replies''/)')
1948+
CALL XPRVDU(NCVDU,3,0)
1949+
C
1950+
IF(IVRF1.GE.1) THEN
1951+
WRITE(NCFPU1,'(/
1952+
1 ''# start Validation Reply Form''/
1953+
1 ''_vrf_PLAT021_I''/
1954+
1 '';''/
1955+
1 ''PROBLEM: Ratio Unique / Expected Reflections too High''/
1956+
1 ''RESPONSE: ...''/
1957+
1 ''The fcf file contains all the merged data ('',I7 ,'') ''/
1958+
1 ''but only'',I7,'' of them are marked as "included". ''/
1959+
1 I7,'' are flagged "h" i.e. rejected high angle ''/
1960+
1 ''reflections, also marked "excluded".''
1961+
1 ''This information is embedded as a #comment ''/
1962+
1 '' at the end of the fcf file. ''/
1963+
1 ''See _refine_special_details for the filters used''/
1964+
1 '';''/
1965+
1 ''# end Validation Reply Form''/
1966+
1 /)')IDREF, NINCL, MALW(4)
1967+
ENDIF
1968+
C
1969+
IF(IVRF2.GE.1) THEN
1970+
WRITE(NCFPU1,'(/
1971+
1 ''_vrf_PLAT920_I''/
1972+
1 '';''/
1973+
1 ''PROBLEM: Theta(Max) in CIF and FCF Differ''/
1974+
1 ''RESPONSE: ...''/
1975+
1 ''The fcf file contains all the merged data''
1976+
1 '' (Thetamax='',F6.2,'') ''/
1977+
1 ''but only some of them marked as "included" '',
1978+
1 ''in the refinement (Thetaused='',F6.2,''). ''/
1979+
1 ''This information is also embedded as a #comment''/
1980+
1 ''at the end of the fcf file. ''/
1981+
1 ''See _refine_special_details for the filters used''/
1982+
1 '';''/
1983+
1 ''# end Validation Reply Form''/
1984+
1 /)')THMAXL6, THUSED
1985+
ENDIF
1986+
ENDIF
1987+
CALL OUTCOL(1)
19101988
GOTO 9999
19111989
9900 CONTINUE
19121990
WRITE(NCFPU1,'(''# '',10A4)') (KTITL(I),I=1,10)

0 commit comments

Comments
 (0)