Reflection files format: Difference between revisions

(→‎LCF: get ncol from header)
Line 202: Line 202:
<pre>
<pre>
! reads cell, column labels, comment, and reflection data from LCF file - Kay Diederichs 7/2019 .  
! reads cell, column labels, comment, and reflection data from LCF file - Kay Diederichs 7/2019 .  
! TODO - determine ncol, offset from data in file  
! TODO - determine offset from data in file  
! Nota bene - symmetry i.e. space group seemingly not stored in LCF file  
! Nota bene - symmetry i.e. space group seemingly not stored in LCF file  
! reading VAX format is easy with the ifort compiler since it understands VAX REAL format:
! reading VAX format is easy with the ifort compiler since it understands VAX REAL format:
Line 229: Line 229:
CALL GET_COMMAND_ARGUMENT(2,string)  ! expects OFFSET
CALL GET_COMMAND_ARGUMENT(2,string)  ! expects OFFSET
READ(string,*) offset
READ(string,*) offset
WRITE(*,*) 'ncol, offset:',ncol,offset
WRITE(*,*) 'offset:',offset


! read header and cell
! read header and cell
Line 235: Line 235:
WRITE(*,'(a,8(i0,1x))') ' header: ',header
WRITE(*,'(a,8(i0,1x))') ' header: ',header


! the following code determines ncol according to lcflib.f line 1534ff:
IF (header(1) /= -32768) STOP 'error - first header item is not -32768'
IF (header(1) /= -32768) STOP 'error - first header item is not -32768'
IF (header(5) == -12) THEN
IF (header(5) == -12) THEN
Line 244: Line 245:
   IF (ncol<0 .OR. ncol>100) STOP 'error - could not determine ncol'
   IF (ncol<0 .OR. ncol>100) STOP 'error - could not determine ncol'
END IF
END IF
WRITE(*,'(a,i0))') ' ncol: ',ncol
WRITE(*,'(a,i0)') ' ncol: ',ncol
ALLOCATE(refdat(ncol))
ALLOCATE(refdat(ncol))


1,328

edits