!**************************************************************************************** ! This program generates random damage configurations for 10 cells exposed to 1 Gy of ! low-LET radiation (electrons). The program requires module 'damageConfigurations'. ! Lesion length and number of elementary damages for each lesion are printed to a file ! 'output.txt', which is created in the project directory. PROGRAM generateDamageConfigurations USE damageConfigurations IMPLICIT NONE INTEGER :: i, j, & lesionBeg, & ! initial position of a lesion lesionEnd, & ! final position of a lesion nEds, & ! number of EDs in a lesion nCells = 10 ! number of cells LOGICAL :: lesionsLeft ! test for the end of a segment ! CALL RANDOM_SEED() OPEN ( UNIT=1, FILE='output.txt' ) DO i = 1, nCells segment = nd CALL distributeEDs lesionsLeft = .TRUE. DO WHILE ( lesionsLeft ) CALL detectLesions( lesionBeg, lesionEnd, lesionsLeft ) ! count EDs in the lesion nEds = 0 DO j = lesionBeg, lesionEnd IF ( segment(j,fstStrand) /= nd ) nEds = nEds + 1 IF ( segment(j,sndStrand) /= nd ) nEds = nEds + 1 END DO ! print lesion length and number of EDs WRITE (1,*) lesionEnd - lesionBeg + 1, nEds END DO END DO CLOSE ( UNIT=1 ) END PROGRAM generateDamageConfigurations