hdiff output

r30497/keywords.f 2016-07-06 15:36:27.191922763 +0100 r30496/keywords.f 2016-07-06 15:36:27.875932010 +0100
4936:          IF (NITEMS.GT.1) CALL READF(ORBITTOL)4936:          IF (NITEMS.GT.1) CALL READF(ORBITTOL)
4937:          WRITE(MYUNIT,'(A,F15.5)') ' keyword> Distance tolerance for distinguising atoms in the same orbit=',ORBITTOL4937:          WRITE(MYUNIT,'(A,F15.5)') ' keyword> Distance tolerance for distinguising atoms in the same orbit=',ORBITTOL
4938: 4938: 
4939:       ELSE IF (((WORD.EQ.'PERMDIST').OR.(WORD.EQ.'LOCALPERMDIST').OR.(WORD.EQ.'LPERMDIST')).AND.(.NOT.PERMOPT)) THEN4939:       ELSE IF (((WORD.EQ.'PERMDIST').OR.(WORD.EQ.'LOCALPERMDIST').OR.(WORD.EQ.'LPERMDIST')).AND.(.NOT.PERMOPT)) THEN
4940:          PERMDIST=.TRUE.4940:          PERMDIST=.TRUE.
4941:          IF (WORD.EQ.'LPERMDIST') THEN4941:          IF (WORD.EQ.'LPERMDIST') THEN
4942:             LPERMDIST=.TRUE.4942:             LPERMDIST=.TRUE.
4943:             IF (NITEMS.GT.1) CALL READI(LOCALPERMNEIGH)4943:             IF (NITEMS.GT.1) CALL READI(LOCALPERMNEIGH)
4944:             IF (NITEMS.GT.2) CALL READF(LOCALPERMCUT)4944:             IF (NITEMS.GT.2) CALL READF(LOCALPERMCUT)
4945:             IF (NITEMS.GT.3) CALL READF(LOCALPERMCUT2)4945:             IF (NITEMS.GT.3) CALL READF(LOCALPERMCUT2)
4946:             IF (NITEMS.GT.4) CALL READF(ORBITTOL) 
4947:             ! IF (NITEMS.GT.3) CALL READI(LOCALPERMMAXSEP)4946:             ! IF (NITEMS.GT.3) CALL READI(LOCALPERMMAXSEP)
4948:             WRITE(MYUNIT,'(A,F15.5)') ' keyword> Local permutational alignment: alignment threshold=',LOCALPERMCUT4947:             WRITE(MYUNIT,'(A,F15.5)') ' keyword> Local permutational alignment: alignment threshold=',LOCALPERMCUT
4949:             WRITE(MYUNIT,'(A,F15.5)') ' keyword> Local permutational alignment: alignment cutoff=   ',LOCALPERMCUT24948:             WRITE(MYUNIT,'(A,F15.5)') ' keyword> Local permutational alignment: alignment cutoff=   ',LOCALPERMCUT2
4950:             WRITE(MYUNIT,'(A,F15.5)') ' keyword> Distance tolerance for distinguishing atoms in the same orbit=',ORBITTOL 
4951:          ELSEIF (WORD.EQ.'PERMDIST') THEN4949:          ELSEIF (WORD.EQ.'PERMDIST') THEN
4952:             IF (NITEMS.GT.1) CALL READF(ORBITTOL)4950:             IF (NITEMS.GT.1) CALL READF(ORBITTOL)
4953:             IF (NITEMS.GT.2) CALL READI(MAXNSETS)4951:             IF (NITEMS.GT.2) CALL READI(MAXNSETS)
4954:             WRITE(MYUNIT, '(A,F15.5)') ' keyword> Distance tolerance for distinguising atoms in the same orbit=',ORBITTOL4952:             WRITE(MYUNIT, '(A,F15.5)') ' keyword> Distance tolerance for distinguising atoms in the same orbit=',ORBITTOL
4955:             WRITE(MYUNIT, '(A,I3)') ' keyword> Maximum number of secondary sets in perm.allow file=', MAXNSETS4953:             WRITE(MYUNIT, '(A,I3)') ' keyword> Maximum number of secondary sets in perm.allow file=', MAXNSETS
4956:          ENDIF4954:          ENDIF
4957: 4955: 
4958:          INQUIRE(FILE='perm.allow',EXIST=PERMFILE)4956:          INQUIRE(FILE='perm.allow',EXIST=PERMFILE)
4959:          IF (.NOT.ALLOCATED(NPERMSIZE)) THEN4957:          IF (.NOT.ALLOCATED(NPERMSIZE)) THEN
4960:             ALLOCATE(NPERMSIZE(NATOMSALLOC),PERMGROUP(NATOMSALLOC),NSETS(NATOMSALLOC),SETS(NATOMSALLOC,MAXNSETS))4958:             ALLOCATE(NPERMSIZE(NATOMSALLOC),PERMGROUP(NATOMSALLOC),NSETS(NATOMSALLOC),SETS(NATOMSALLOC,MAXNSETS))


r30497/lopermdist.f90 2016-07-06 15:36:27.535927412 +0100 r30496/lopermdist.f90 2016-07-06 15:36:28.207936498 +0100
 80: !  and is evaluated as a sum of local distances squared for permutable groups. 80: !  and is evaluated as a sum of local distances squared for permutable groups.
 81: !  We return to label 10 after every round of permutational/orientational alignment 81: !  We return to label 10 after every round of permutational/orientational alignment
 82: !  unless we have converged to the identity permutation. 82: !  unless we have converged to the identity permutation.
 83: ! 83: !
 84: !  The maximum number of pair exchanges associated with a group is two. 84: !  The maximum number of pair exchanges associated with a group is two.
 85: !  85: ! 
 86: DO J1=1,NATOMS 86: DO J1=1,NATOMS
 87:    NEWPERM(J1)=J1 87:    NEWPERM(J1)=J1
 88: ENDDO 88: ENDDO
 89: DSUM=0.0D0 89: DSUM=0.0D0
 90: LOCALPERMNEIGH=MIN(LOCALPERMNEIGH,NATOMS) 
 91:  90: 
 92: NDUMMY=1 91: NDUMMY=1
 93: DO J1=1,NPERMGROUP 92: DO J1=1,NPERMGROUP
 94:    PATOMS=NPERMSIZE(J1) 93:    PATOMS=NPERMSIZE(J1)
 95: !  PRINT '(A,I6,A,I6)','group ',J1,' size=',NPERMSIZE(J1) 
 96: !  PRINT '(A)','members:' 
 97: !  DO J2=1,PATOMS 
 98: !     PRINT '(20I6)',NEWPERM(PERMGROUP(NDUMMY+J2-1)) 
 99: !  ENDDO 
100:  
101:    LDBEST(J1)=1.0D100 94:    LDBEST(J1)=1.0D100
102:    TRIED(1:NATOMS)=0 95:    TRIED(1:NATOMS)=0
103:    DO J2=1,PATOMS 96:    DO J2=1,PATOMS
104:       LPERMBEST(J2)=J2 97:       LPERMBEST(J2)=J2
105:    ENDDO 98:    ENDDO
106:    XA=0.0D0; YA=0.0D0; ZA=0.0D0 99:    XA=0.0D0; YA=0.0D0; ZA=0.0D0
107:    XB=0.0D0; YB=0.0D0; ZB=0.0D0100:    XB=0.0D0; YB=0.0D0; ZB=0.0D0
108:    DMEAN(1:LOCALPERMNEIGH)=1.0D100101:    DMEAN(1:LOCALPERMNEIGH)=1.0D100
109:    DO J2=1,PATOMS102:    DO J2=1,PATOMS
110: !     TRIED(NEWPERM(PERMGROUP(NDUMMY+J2-1)))=-1103:       TRIED(NEWPERM(PERMGROUP(NDUMMY+J2-1)))=-1
111:       TRIED(PERMGROUP(NDUMMY+J2-1))=-1 
112:       PDUMMYA(3*(J2-1)+1)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+1)104:       PDUMMYA(3*(J2-1)+1)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+1)
113:       PDUMMYA(3*(J2-1)+2)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+2)105:       PDUMMYA(3*(J2-1)+2)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+2)
114:       PDUMMYA(3*(J2-1)+3)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+3)106:       PDUMMYA(3*(J2-1)+3)=DUMMYA(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+3)
115: !     PDUMMYB(3*(J2-1)+1)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+1)107:       PDUMMYB(3*(J2-1)+1)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+1)
116: !     PDUMMYB(3*(J2-1)+2)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+2)108:       PDUMMYB(3*(J2-1)+2)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+2)
117: !     PDUMMYB(3*(J2-1)+3)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+3)109:       PDUMMYB(3*(J2-1)+3)=DUMMYB(3*(NEWPERM(PERMGROUP(NDUMMY+J2-1))-1)+3)
118:       PDUMMYB(3*(J2-1)+1)=DUMMYB(3*(PERMGROUP(NDUMMY+J2-1)-1)+1) 
119:       PDUMMYB(3*(J2-1)+2)=DUMMYB(3*(PERMGROUP(NDUMMY+J2-1)-1)+2) 
120:       PDUMMYB(3*(J2-1)+3)=DUMMYB(3*(PERMGROUP(NDUMMY+J2-1)-1)+3) 
121:       XA=XA+PDUMMYA(3*(J2-1)+1)110:       XA=XA+PDUMMYA(3*(J2-1)+1)
122:       YA=YA+PDUMMYA(3*(J2-1)+2)111:       YA=YA+PDUMMYA(3*(J2-1)+2)
123:       ZA=ZA+PDUMMYA(3*(J2-1)+3)112:       ZA=ZA+PDUMMYA(3*(J2-1)+3)
124:       XB=XB+PDUMMYB(3*(J2-1)+1)113:       XB=XB+PDUMMYB(3*(J2-1)+1)
125:       YB=YB+PDUMMYB(3*(J2-1)+2)114:       YB=YB+PDUMMYB(3*(J2-1)+2)
126:       ZB=ZB+PDUMMYB(3*(J2-1)+3)115:       ZB=ZB+PDUMMYB(3*(J2-1)+3)
127:    ENDDO116:    ENDDO
128:    XA=XA/PATOMS; YA=YA/PATOMS; ZA=ZA/PATOMS117:    XA=XA/PATOMS; YA=YA/PATOMS; ZA=ZA/PATOMS
129:    XB=XB/PATOMS; YB=YB/PATOMS; ZB=ZB/PATOMS118:    XB=XB/PATOMS; YB=YB/PATOMS; ZB=ZB/PATOMS
130:    SPDUMMYA(1:3*PATOMS)=PDUMMYA(1:3*PATOMS)119:    SPDUMMYA(1:3*PATOMS)=PDUMMYA(1:3*PATOMS)
148: !137: !
149: ! Don't allow members of the same permutational group 138: ! Don't allow members of the same permutational group 
150: ! to appear as reference neighbours.139: ! to appear as reference neighbours.
151: !140: !
152:       IF (TRIED(J2).EQ.-1) THEN141:       IF (TRIED(J2).EQ.-1) THEN
153:          XDUMMY=1.0D9142:          XDUMMY=1.0D9
154:       ELSE143:       ELSE
155:          DA=(XA-DUMMYA(3*(NEWPERM(J2)-1)+1))**2 &144:          DA=(XA-DUMMYA(3*(NEWPERM(J2)-1)+1))**2 &
156:   &        +(YA-DUMMYA(3*(NEWPERM(J2)-1)+2))**2 &145:   &        +(YA-DUMMYA(3*(NEWPERM(J2)-1)+2))**2 &
157:   &        +(ZA-DUMMYA(3*(NEWPERM(J2)-1)+3))**2146:   &        +(ZA-DUMMYA(3*(NEWPERM(J2)-1)+3))**2
158: !        DB=(XB-DUMMYB(3*(NEWPERM(J2)-1)+1))**2 &147:          DB=(XB-DUMMYB(3*(NEWPERM(J2)-1)+1))**2 &
159: ! &        +(YB-DUMMYB(3*(NEWPERM(J2)-1)+2))**2 &148:   &        +(YB-DUMMYB(3*(NEWPERM(J2)-1)+2))**2 &
160: ! &        +(ZB-DUMMYB(3*(NEWPERM(J2)-1)+3))**2149:   &        +(ZB-DUMMYB(3*(NEWPERM(J2)-1)+3))**2
161:          DB=(XB-DUMMYB(3*(J2-1)+1))**2 & 
162:   &        +(YB-DUMMYB(3*(J2-1)+2))**2 & 
163:   &        +(ZB-DUMMYB(3*(J2-1)+3))**2 
164:          XDUMMY=(SQRT(DA)+SQRT(DB))/2.0D0150:          XDUMMY=(SQRT(DA)+SQRT(DB))/2.0D0
165:       ENDIF151:       ENDIF
166:       loop1: DO J3=1,J2152:       loop1: DO J3=1,J2
167:          IF (XDUMMY.LT.DMEAN(J3)) THEN153:          IF (XDUMMY.LT.DMEAN(J3)) THEN
168: !154: !
169: ! Move the rest down.155: ! Move the rest down.
170: !156: !
171:             DO J4=J2,J3+1,-1157:             DO J4=J2,J3+1,-1
172:                DMEAN(J4)=DMEAN(J4-1)158:                DMEAN(J4)=DMEAN(J4-1)
173:                SORTLIST(J4)=SORTLIST(J4-1)159:                SORTLIST(J4)=SORTLIST(J4-1)
174:             ENDDO160:             ENDDO
175:             DMEAN(J3)=XDUMMY161:             DMEAN(J3)=XDUMMY
176:             SORTLIST(J3)=J2162:             SORTLIST(J3)=J2
177:             EXIT loop1163:             EXIT loop1
178:          ENDIF164:          ENDIF
179:       ENDDO loop1165:       ENDDO loop1
180:    ENDDO outer1166:    ENDDO outer1
 167: !  IF (J1.EQ.16) THEN
 168: !     WRITE(MYUNIT,'(A)') 'SORTLIST:'
 169: !     WRITE(MYUNIT,'(20I5)') SORTLIST(1:NATOMS)
 170: !     WRITE(MYUNIT,'(A)') 'DMEAN:'
 171: !     WRITE(MYUNIT,'(10G10.4)') DMEAN(1:NATOMS)
 172: !  ENDIF
181: 173: 
182: 71 CONTINUE174: 71 CONTINUE
183:    PDUMMYA(1:3*PATOMS)=SPDUMMYA(1:3*PATOMS)175:    PDUMMYA(1:3*PATOMS)=SPDUMMYA(1:3*PATOMS)
184:    PDUMMYB(1:3*PATOMS)=SPDUMMYB(1:3*PATOMS)176:    PDUMMYB(1:3*PATOMS)=SPDUMMYB(1:3*PATOMS)
185: 177: 
186:    LDBESTATOM=1.0D100178:    LDBESTATOM=1.0D100
187:    NOTHER=0179:    NOTHER=0
188:    DO J2=1,NATOMS180:    DO J2=1,NATOMS
189:       IF (TRIED(J2).EQ.1) THEN181:       IF (TRIED(J2).EQ.1) THEN
190:          NOTHER=NOTHER+1182:          NOTHER=NOTHER+1
234:             WRITE(MYUNIT,'(A,I6,A)') ' lopermdist> ERROR *** Partner atom ',DLIST(NOTHER),' has already been tried'226:             WRITE(MYUNIT,'(A,I6,A)') ' lopermdist> ERROR *** Partner atom ',DLIST(NOTHER),' has already been tried'
235:             STOP227:             STOP
236:          ENDIF228:          ENDIF
237:       ENDDO229:       ENDDO
238:    ENDIF230:    ENDIF
239:    231:    
240:    DO J2=1,NOTHER232:    DO J2=1,NOTHER
241:       PDUMMYA(3*(PATOMS+J2-1)+1)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+1)233:       PDUMMYA(3*(PATOMS+J2-1)+1)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+1)
242:       PDUMMYA(3*(PATOMS+J2-1)+2)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+2)234:       PDUMMYA(3*(PATOMS+J2-1)+2)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+2)
243:       PDUMMYA(3*(PATOMS+J2-1)+3)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+3)235:       PDUMMYA(3*(PATOMS+J2-1)+3)=DUMMYA(3*(NEWPERM(DLIST(J2))-1)+3)
244: !     PDUMMYB(3*(PATOMS+J2-1)+1)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+1)236:       PDUMMYB(3*(PATOMS+J2-1)+1)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+1)
245: !     PDUMMYB(3*(PATOMS+J2-1)+2)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+2)237:       PDUMMYB(3*(PATOMS+J2-1)+2)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+2)
246: !     PDUMMYB(3*(PATOMS+J2-1)+3)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+3)238:       PDUMMYB(3*(PATOMS+J2-1)+3)=DUMMYB(3*(NEWPERM(DLIST(J2))-1)+3)
247:       PDUMMYB(3*(PATOMS+J2-1)+1)=DUMMYB(3*(DLIST(J2)-1)+1) 
248:       PDUMMYB(3*(PATOMS+J2-1)+2)=DUMMYB(3*(DLIST(J2)-1)+2) 
249:       PDUMMYB(3*(PATOMS+J2-1)+3)=DUMMYB(3*(DLIST(J2)-1)+3) 
250:    ENDDO239:    ENDDO
 240: !  IF ((J1.EQ.16).OR.(J1.EQ.12)) THEN
 241: !  WRITE(MYUNIT,'(4(A,I6))') ' lopermdist> For group ',J1,' size ',PATOMS,' aligning with ',NOTHER,' other atoms'
 242: !  WRITE(MYUNIT,'(A)') ' DLIST:'
 243: !  WRITE(MYUNIT,'(20I6)') DLIST(1:NOTHER)
 244: !  ENDIF
251: !245: !
252: ! Save PDUMMYA and PDUMMYB for cycling over possible orbits in MYORIENT alignment.246: ! Save PDUMMYA and PDUMMYB for cycling over possible orbits in MYORIENT alignment.
253: !247: !
254:    SPDUMMYA(3*PATOMS+1:3*(PATOMS+NOTHER))=PDUMMYA(3*PATOMS+1:3*(PATOMS+NOTHER))248:    SPDUMMYA(3*PATOMS+1:3*(PATOMS+NOTHER))=PDUMMYA(3*PATOMS+1:3*(PATOMS+NOTHER))
255:    SPDUMMYB(3*PATOMS+1:3*(PATOMS+NOTHER))=PDUMMYB(3*PATOMS+1:3*(PATOMS+NOTHER))249:    SPDUMMYB(3*PATOMS+1:3*(PATOMS+NOTHER))=PDUMMYB(3*PATOMS+1:3*(PATOMS+NOTHER))
256:    NCHOOSEB1=0250:    NCHOOSEB1=0
257: 66 NCHOOSEB1=NCHOOSEB1+1251: 66 NCHOOSEB1=NCHOOSEB1+1
258:    NCHOOSEB2=0252:    NCHOOSEB2=0
259: 31 NCHOOSEB2=NCHOOSEB2+1253: 31 NCHOOSEB2=NCHOOSEB2+1
260:    NCHOOSE1=0254:    NCHOOSE1=0


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0