hdiff output

r31340/countatoms.f90 2016-10-18 17:30:11.588781284 +0100 r31339/countatoms.f90 2016-10-18 17:30:12.348791339 +0100
231:     LUNIT=GETUNIT()231:     LUNIT=GETUNIT()
232:     J=1232:     J=1
233:     !233:     !
234:     !ds656> Avoiding GOTO...234:     !ds656> Avoiding GOTO...
235:     OPEN(UNIT=LUNIT,FILE='data',STATUS='OLD')235:     OPEN(UNIT=LUNIT,FILE='data',STATUS='OLD')
236:     DATALOOP: DO ! Loop through lines in data file236:     DATALOOP: DO ! Loop through lines in data file
237:        CALL INPUT(END,LUNIT)237:        CALL INPUT(END,LUNIT)
238:        IF(END) EXIT DATALOOP238:        IF(END) EXIT DATALOOP
239:        CALL READU(WORD)239:        CALL READU(WORD)
240:        IF(WORD.EQ.'STOP') EXIT DATALOOP240:        IF(WORD.EQ.'STOP') EXIT DATALOOP
241:        IF(WORD.EQ.'BLJCLUSTER_NOCUT'.OR.WORD.EQ.'BGUPTAT'.OR.&241:        IF(WORD.EQ.'BLJCLUSTER_NOCUT'.OR.WORD.EQ.'BGUPTAT') THEN
242:             WORD.EQ.'GTHOMSONBIN') THEN 
243:           J=2242:           J=2
244:           EXIT DATALOOP243:           EXIT DATALOOP
245:        ELSEIF(WORD.EQ.'MLJ'.OR.WORD.EQ.'MGUPTA'.OR.&244:        ELSEIF(WORD.EQ.'MLJ'.OR.WORD.EQ.'MGUPTA'.OR.&
246:             WORD.EQ.'MSC') THEN245:             WORD.EQ.'MSC') THEN
247:           CALL READI(J)246:           CALL READI(J)
248:           EXIT DATALOOP247:           EXIT DATALOOP
249:        ELSEIF(WORD.EQ.'GLJ') THEN248:        ELSEIF(WORD.EQ.'GLJ') THEN
250:           J=NITEMS-1249:           J=NITEMS-1
251:           EXIT DATALOOP250:           EXIT DATALOOP
252:        ENDIF251:        ENDIF


r31340/keywords.f 2016-10-18 17:30:11.844784668 +0100 r31339/keywords.f 2016-10-18 17:30:12.616794883 +0100
3809: ! hk286 > Generalised Thomson    !3809: ! hk286 > Generalised Thomson    !
3810: !--------------------------------!3810: !--------------------------------!
3811: 3811: 
3812:       ELSE IF (WORD .EQ. 'GTHOMSONBIN') THEN3812:       ELSE IF (WORD .EQ. 'GTHOMSONBIN') THEN
3813:          GTHOMSONT = .TRUE.3813:          GTHOMSONT = .TRUE.
3814:          THOMSONT=.TRUE.3814:          THOMSONT=.TRUE.
3815:          RIGID = .TRUE.3815:          RIGID = .TRUE.
3816:          GTHOMPOT=73816:          GTHOMPOT=7
3817:          CALL READI(GTHOMSONBINN)3817:          CALL READI(GTHOMSONBINN)
3818:          NTYPEA = GTHOMSONBINN3818:          NTYPEA = GTHOMSONBINN
3819:          NSPECIES(1) = NTYPEA 
3820:          NSPECIES(2) = NATOMS - NTYPEA 
3821:          CALL READF(GTHOMSONBIND)3819:          CALL READF(GTHOMSONBIND)
3822:       ELSE IF (WORD .EQ. 'GTHOMSON') THEN3820:       ELSE IF (WORD .EQ. 'GTHOMSON') THEN
3823:          GTHOMSONT = .TRUE.3821:          GTHOMSONT = .TRUE.
3824:          THOMSONT=.TRUE.3822:          THOMSONT=.TRUE.
3825:          RIGID = .TRUE.3823:          RIGID = .TRUE.
3826:          CALL READI(GTHOMMET)3824:          CALL READI(GTHOMMET)
3827:          CALL READF(GTHOMSONZ)3825:          CALL READF(GTHOMSONZ)
3828:          IF (NITEMS.GT.3) THEN3826:          IF (NITEMS.GT.3) THEN
3829:             CALL READF(GTHOMSONC)3827:             CALL READF(GTHOMSONC)
3830:          ENDIF3828:          ENDIF


r31340/QALCSearch.f90 2016-10-18 17:30:11.340778001 +0100 r31339/QALCSearch.f90 2016-10-18 17:30:12.096788032 +0100
698:   ENDDO698:   ENDDO
699:   !699:   !
700:   !STOP ! TESTING!700:   !STOP ! TESTING!
701:   !701:   !
702:   RETURN702:   RETURN
703:   !703:   !
704: END SUBROUTINE CALC_FLIPS704: END SUBROUTINE CALC_FLIPS
705: !705: !
706: !=============================================================706: !=============================================================
707: !707: !
708: SUBROUTINE SWAP_COORDS(I,J,NP) 
709:   ! 
710:   USE COMMONS, ONLY : NATOMS, COORDS 
711:   ! 
712:   IMPLICIT NONE 
713:   ! 
714:   INTEGER, INTENT(IN) :: I,J, NP 
715:   INTEGER :: K,L,M 
716:   DOUBLE PRECISION :: DUMMY 
717:   ! 
718:   K = 3*(I-1) 
719:   L = 3*(J-1) 
720:   DO M = 1,3 
721:      DUMMY = COORDS(K+M,NP) 
722:      COORDS(K+M,NP) = COORDS(L+M,NP) 
723:      COORDS(L+M,NP) = DUMMY 
724:   ENDDO 
725:   ! 
726:   RETURN 
727:   ! 
728: END SUBROUTINE SWAP_COORDS 
729: ! 
730: !============================================================= 
731: ! 
732: SUBROUTINE SWAP_LABELS(I,J,NP)708: SUBROUTINE SWAP_LABELS(I,J,NP)
733:   !709:   !
734:   ! Swap the labels/types of two particles identified by their710:   ! Swap the labels/types of two particles identified by their
735:   ! permanent indices I and J.711:   ! permanent indices I and J.
736:   !712:   !
737:   ! USE COMMONS, ONLY : ATOMLISTS, INVATOMLISTS, MYUNIT, ATMASS, READMASST713:   ! USE COMMONS, ONLY : ATOMLISTS, INVATOMLISTS, MYUNIT, ATMASS, READMASST
738:   USE COMMONS, ONLY : ATOMLISTS, INVATOMLISTS, ATMASS, &714:   USE COMMONS, ONLY : ATOMLISTS, INVATOMLISTS, ATMASS, &
739:        READMASST, SPECMASST, LABELS715:        READMASST, SPECMASST, LABELS
740:   !716:   !
741:   IMPLICIT NONE717:   IMPLICIT NONE
1202:   !1178:   !
1203:   RETURN1179:   RETURN
1204:   !1180:   !
1205: END SUBROUTINE CALC_HAMMING_DISTANCE1181: END SUBROUTINE CALC_HAMMING_DISTANCE
1206: !1182: !
1207: SUBROUTINE SCAN_SWAP_NBRHD(NP,ITER,TIME,BRUN,QDONE,SCREENC,STEP)1183: SUBROUTINE SCAN_SWAP_NBRHD(NP,ITER,TIME,BRUN,QDONE,SCREENC,STEP)
1208:   !1184:   !
1209:   USE PORFUNCS1185:   USE PORFUNCS
1210:   USE COMMONS, ONLY : NATOMS, COORDS, QALCSV, NQ, ECONV, &1186:   USE COMMONS, ONLY : NATOMS, COORDS, QALCSV, NQ, ECONV, &
1211:        MYUNIT, QALCSMODE, SEQLENGTH, ATOMLISTS, &1187:        MYUNIT, QALCSMODE, SEQLENGTH, ATOMLISTS, &
1212:        NSPECIES, QALCS_NBRHD, QALCS_PARAM, FIXLABELS1188:        NSPECIES, QALCS_NBRHD, QALCS_PARAM
1213:   !1189:   !
1214:   IMPLICIT NONE1190:   IMPLICIT NONE
1215:   !1191:   !
1216:   ! Parsed variables1192:   ! Parsed variables
1217:   INTEGER, INTENT(IN) :: NP1193:   INTEGER, INTENT(IN) :: NP
1218:   INTEGER, INTENT(INOUT) :: ITER, BRUN, QDONE ! for QUENCH1194:   INTEGER, INTENT(INOUT) :: ITER, BRUN, QDONE ! for QUENCH
1219:   DOUBLE PRECISION, INTENT(INOUT) :: TIME, SCREENC(3*NATOMS) ! for QUENCH1195:   DOUBLE PRECISION, INTENT(INOUT) :: TIME, SCREENC(3*NATOMS) ! for QUENCH
1220:   LOGICAL, INTENT(OUT) :: STEP1196:   LOGICAL, INTENT(OUT) :: STEP
1221:   !1197:   !
1222:   INTEGER :: NQTOT, N, NTOT, SWAPS(QALCS_NBRHD,2), I, J, K, &1198:   INTEGER :: NQTOT, N, NTOT, SWAPS(QALCS_NBRHD,2), I, J, K, &
1244:                  I=ATOMLISTS(TA,GA,IA)1220:                  I=ATOMLISTS(TA,GA,IA)
1245:                  DO IB=1,ATOMLISTS(TB,GB,0)1221:                  DO IB=1,ATOMLISTS(TB,GB,0)
1246:                     J=ATOMLISTS(TB,GB,IB)1222:                     J=ATOMLISTS(TB,GB,IB)
1247:                     !1223:                     !
1248:                     N = N + 11224:                     N = N + 1
1249:                     SWAPS(N,1) = I1225:                     SWAPS(N,1) = I
1250:                     SWAPS(N,2) = J1226:                     SWAPS(N,2) = J
1251:                     !1227:                     !
1252:                     IF(QALCSMODE == 5) THEN1228:                     IF(QALCSMODE == 5) THEN
1253:                        !1229:                        !
1254:                        IF(FIXLABELS) THEN1230:                        CALL SWAP_LABELS(I,J,NP)
1255:                           CALL SWAP_COORDS(I,J,NP) 
1256:                        ELSE 
1257:                           CALL SWAP_LABELS(I,J,NP) 
1258:                        ENDIF 
1259:                        CALL POTENTIAL(COORDS(:,NP),X0(:),EST(N),.FALSE.,.FALSE.)1231:                        CALL POTENTIAL(COORDS(:,NP),X0(:),EST(N),.FALSE.,.FALSE.)
1260:                        IF(FIXLABELS) THEN1232:                        CALL SWAP_LABELS(I,J,NP)
1261:                           CALL SWAP_COORDS(I,J,NP) 
1262:                        ELSE 
1263:                           CALL SWAP_LABELS(I,J,NP) 
1264:                        ENDIF 
1265:                        !1233:                        !
1266:                        SORT_EST2: DO K=N,2,-11234:                        SORT_EST2: DO K=N,2,-1
1267:                           IF(EST(K) < EST(K-1)) THEN1235:                           IF(EST(K) < EST(K-1)) THEN
1268:                              E0=EST(K); EST(K)=EST(K-1); EST(K-1)=E01236:                              E0=EST(K); EST(K)=EST(K-1); EST(K-1)=E0
1269:                              I_AB(1:2) = SWAPS(K,1:2)1237:                              I_AB(1:2) = SWAPS(K,1:2)
1270:                              SWAPS(K,1:2) = SWAPS(K-1,1:2)1238:                              SWAPS(K,1:2) = SWAPS(K-1,1:2)
1271:                              SWAPS(K-1,1:2) = I_AB(1:2)1239:                              SWAPS(K-1,1:2) = I_AB(1:2)
1272:                           ELSE1240:                           ELSE
1273:                              EXIT SORT_EST21241:                              EXIT SORT_EST2
1274:                           ENDIF1242:                           ENDIF
1302:   ENDIF1270:   ENDIF
1303:   !1271:   !
1304:   DO I=1,NTOT1272:   DO I=1,NTOT
1305:      !1273:      !
1306:      IF(QALCSMODE==4) THEN    1274:      IF(QALCSMODE==4) THEN    
1307:         J = INT(DPRAND()*DBLE(N)) + 11275:         J = INT(DPRAND()*DBLE(N)) + 1
1308:      ELSEIF(QALCSMODE==5) THEN1276:      ELSEIF(QALCSMODE==5) THEN
1309:         J=I1277:         J=I
1310:      ENDIF1278:      ENDIF
1311:      !1279:      !
1312:      IF(FIXLABELS) THEN1280:      CALL SWAP_LABELS(SWAPS(J,1),SWAPS(J,2),NP)
1313:         CALL SWAP_COORDS(SWAPS(J,1),SWAPS(J,2),NP) 
1314:      ELSE 
1315:         CALL SWAP_LABELS(SWAPS(J,1),SWAPS(J,2),NP) 
1316:      ENDIF 
1317:      !                                                            1281:      !                                                            
1318:      NQTOT = NQTOT + 11282:      NQTOT = NQTOT + 1
1319:      NQ(NP) = NQ(NP) + 11283:      NQ(NP) = NQ(NP) + 1
1320:      CALL QUENCH(.FALSE.,NP,ITER,TIME,BRUN,QDONE,SCREENC)1284:      CALL QUENCH(.FALSE.,NP,ITER,TIME,BRUN,QDONE,SCREENC)
1321:      IF(QALCSV) THEN1285:      IF(QALCSV) THEN
1322:         CALL PRINT_QUENCH(NP, ITER, '  ')1286:         CALL PRINT_QUENCH(NP, ITER, '  ')
1323:         IF(QALCSMODE==5) THEN1287:         IF(QALCSMODE==5) THEN
1324:            WRITE(MYUNIT,'(2(A,F15.10))') &1288:            WRITE(MYUNIT,'(2(A,F15.10))') &
1325:                 'scan_nbrhd> dE*= ',EST(J)-E0,' dE= ',POTEL-E0 1289:                 'scan_nbrhd> dE*= ',EST(J)-E0,' dE= ',POTEL-E0 
1326:         ENDIF1290:         ENDIF
1329:      IF(POTEL < E0 - ECONV) THEN1293:      IF(POTEL < E0 - ECONV) THEN
1330:         SEQLENGTH = SEQLENGTH + 11294:         SEQLENGTH = SEQLENGTH + 1
1331:         WRITE(MYUNIT,'(A,I4,A,I4,A,I4,A,F15.10)') &1295:         WRITE(MYUNIT,'(A,I4,A,I4,A,I4,A,F15.10)') &
1332:              'scan_nbrhd> Try ',I,' : ',&1296:              'scan_nbrhd> Try ',I,' : ',&
1333:              SWAPS(J,1),' <-> ',SWAPS(J,2),&1297:              SWAPS(J,1),' <-> ',SWAPS(J,2),&
1334:              ' => dE= ', POTEL-E01298:              ' => dE= ', POTEL-E0
1335:         STEP = .TRUE.1299:         STEP = .TRUE.
1336:         RETURN1300:         RETURN
1337:      ELSE 1301:      ELSE 
1338:         ! Undo the swap and restore the configuration1302:         ! Undo the swap and restore the configuration
1339:         IF(FIXLABELS) THEN1303:         CALL SWAP_LABELS(SWAPS(J,1),SWAPS(J,2),NP)
1340:            CALL SWAP_COORDS(SWAPS(J,1),SWAPS(J,2),NP) 
1341:         ELSE 
1342:            CALL SWAP_LABELS(SWAPS(J,1),SWAPS(J,2),NP) 
1343:         ENDIF 
1344:         COORDS(1:3*NATOMS, NP) = X0(1:3*NATOMS)1304:         COORDS(1:3*NATOMS, NP) = X0(1:3*NATOMS)
1345:         POTEL = E01305:         POTEL = E0
1346:         !1306:         !
1347:         IF(QALCSMODE==4) THEN1307:         IF(QALCSMODE==4) THEN
1348:            ! Remove the rejected swap from list1308:            ! Remove the rejected swap from list
1349:            SWAPS(J,1:2) = SWAPS(N,1:2)1309:            SWAPS(J,1:2) = SWAPS(N,1:2)
1350:            SWAPS(N,1:2) = 01310:            SWAPS(N,1:2) = 0
1351:            N = N - 11311:            N = N - 1
1352:         ENDIF1312:         ENDIF
1353:         !1313:         !


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0