hdiff output

r32777/key.f90 2017-06-12 15:30:09.726301111 +0100 r32776/key.f90 2017-06-12 15:30:11.522324700 +0100
 51:      &        NONEBMAX, READMASST, ONEDAPBCT, ONEDPBCT, INVTONEDPBCT, INVTTWODPBCT, TWODAPBCT, TWODPBCT, THREEDAPBCT, & 51:      &        NONEBMAX, READMASST, ONEDAPBCT, ONEDPBCT, INVTONEDPBCT, INVTTWODPBCT, TWODAPBCT, TWODPBCT, THREEDAPBCT, &
 52:      &        THREEDPBCT, FOURDAPBCT, FOURDPBCT, MODEDOWNT, CHEMSHIFT, TTM3T, & 52:      &        THREEDPBCT, FOURDAPBCT, FOURDPBCT, MODEDOWNT, CHEMSHIFT, TTM3T, &
 53:      &        NOINVERSION, INVERTPT, KNOWVECS, PMPATHT, AAORIENTT, MULTIJOBT, QUIPARGSTRT, QUIPPARAMST, HESSDUMPT, & 53:      &        NOINVERSION, INVERTPT, KNOWVECS, PMPATHT, AAORIENTT, MULTIJOBT, QUIPARGSTRT, QUIPPARAMST, HESSDUMPT, &
 54:      &        CLASSICALRATEST, TSPLITTINGT, HESSREADT, INSTANTONOPTT,INSTANTONSTARTDUMPT,VARSTEPOPTT, MOLPRO, REAXFFT, & 54:      &        CLASSICALRATEST, TSPLITTINGT, HESSREADT, INSTANTONOPTT,INSTANTONSTARTDUMPT,VARSTEPOPTT, MOLPRO, REAXFFT, &
 55:      &        EIGENONLY,OVERCONV, GLJT,CLSTRINGT,CLSTRINGTST, PHI4MODT, EX1DT, MCPATHT, MCBIAST, RPHT, TWISTT, MCPATH2T, & 55:      &        EIGENONLY,OVERCONV, GLJT,CLSTRINGT,CLSTRINGTST, PHI4MODT, EX1DT, MCPATHT, MCBIAST, RPHT, TWISTT, MCPATH2T, &
 56:      &        PBST, SSHT, GAUSSIAN03, CPPNEBT, CUDAT, CUDATIMET, TRUSTMODET,MODELOST, METRICTENSOR, INTSPRINGACTIVET, & 56:      &        PBST, SSHT, GAUSSIAN03, CPPNEBT, CUDAT, CUDATIMET, TRUSTMODET,MODELOST, METRICTENSOR, INTSPRINGACTIVET, &
 57:      &        PERMGUESS, QCIPERMCHECK, DUMPFRQST, MULTIPOTT, MLP3T, MLPB3T, DUMPBESTPATH, ALIGNRBST, AVOID_COLLISIONS, MLPPROB, & 57:      &        PERMGUESS, QCIPERMCHECK, DUMPFRQST, MULTIPOTT, MLP3T, MLPB3T, DUMPBESTPATH, ALIGNRBST, AVOID_COLLISIONS, MLPPROB, &
 58:      &        MALONALDEHYDE, SIO2PT, MLPNEWREG, DJWRBT, STEALTHYT, STEALTV, LJADDT, MLPB3NEWT, MLPVB3T, & 58:      &        MALONALDEHYDE, SIO2PT, MLPNEWREG, DJWRBT, STEALTHYT, STEALTV, LJADDT, MLPB3NEWT, MLPVB3T, &
 59:      &        QCIPOTT, QCIPOT2T, QCIRADSHIFTT, QCINOREPINT, QCIAMBERT, SLERPT, NOTRANSROTT, MAXGAPT, BULKBOXT, GDSQT, FLATTESTT, & 59:      &        QCIPOTT, QCIPOT2T, QCIRADSHIFTT, QCINOREPINT, QCIAMBERT, SLERPT, NOTRANSROTT, MAXGAPT, BULKBOXT, GDSQT, FLATTESTT, &
 60:      &        MLQT, MLQPROB, LJADD2T, MACROIONT, NOREGBIAS, PYADDT, PYADD2T, SANDBOXT, LJADD3T, LJADD4T, & 60:      &        MLQT, MLQPROB, LJADD2T, MACROIONT, NOREGBIAS, PYADDT, PYADD2T, SANDBOXT, LJADD3T, LJADD4T, &
 61:      &        MBPOLT, MULTIJOB_MACHINET, DUMPDATA_MACHINET, PLUSSIDET, MINUSSIDET 61:      &        MBPOLT, MULTIJOB_MACHINET, DUMPDATA_MACHINET
 62:  62: 
 63: ! sy349 > for testing the flatpath after dneb 63: ! sy349 > for testing the flatpath after dneb
 64:       !LOGICAL, ALLOCATABLE :: FLATPATHT(:) 64:       !LOGICAL, ALLOCATABLE :: FLATPATHT(:)
 65:       LOGICAL FLATPATHT 65:       LOGICAL FLATPATHT
 66:  66: 
 67: ! bf269 > polymer in a pore (non-bonding (LJ) energy from neighbours is not subtracted) 67: ! bf269 > polymer in a pore (non-bonding (LJ) energy from neighbours is not subtracted)
 68:       LOGICAL :: PORE8T = .FALSE. ! add 8th power cylindrical pore to the potential? 68:       LOGICAL :: PORE8T = .FALSE. ! add 8th power cylindrical pore to the potential?
 69:       INTEGER :: PORE8_AXIS = 3 ! principal axis of the cylindric pore (1:x, 2:y, 3:z) 69:       INTEGER :: PORE8_AXIS = 3 ! principal axis of the cylindric pore (1:x, 2:y, 3:z)
 70:       DOUBLE PRECISION :: PORE8_ENERGY = 1.0d1 ! energy of the pore when radius = 1 70:       DOUBLE PRECISION :: PORE8_ENERGY = 1.0d1 ! energy of the pore when radius = 1
 71:       LOGICAL :: HARMPOLYT = .FALSE. ! add harmonic bonds between the beads 71:       LOGICAL :: HARMPOLYT = .FALSE. ! add harmonic bonds between the beads


r32777/keywords.f 2017-06-12 15:30:09.954304107 +0100 r32776/keywords.f 2017-06-12 15:30:11.746327641 +0100
6074: ! sf344> read in coordinates from path.xyz files for rigid bodies, and6074: ! sf344> read in coordinates from path.xyz files for rigid bodies, and
6075: ! bring the frames in the best alignment6075: ! bring the frames in the best alignment
6076: ! 6076: ! 
6077:          ELSE IF (WORD.EQ.'REALIGNXYZ') THEN6077:          ELSE IF (WORD.EQ.'REALIGNXYZ') THEN
6078:             REALIGNXYZ=.TRUE.6078:             REALIGNXYZ=.TRUE.
6079: ! 6079: ! 
6080: ! Whether to use a redopoints file if it exists.6080: ! Whether to use a redopoints file if it exists.
6081: ! 6081: ! 
6082:          ELSE IF (WORD.EQ.'REDOPATH') THEN6082:          ELSE IF (WORD.EQ.'REDOPATH') THEN
6083:             REDOPATH=.TRUE.6083:             REDOPATH=.TRUE.
6084:             IF (NITEMS.GT.1) THEN6084:             IF (NITEMS.GT.1) CALL READF(REDOK)
6085:                CALL READF(REDOK) 
6086:                REDOKADD=.TRUE. 
6087:             ENDIF 
6088:             IF (NITEMS.GT.2) CALL READF(REDOFRAC)6085:             IF (NITEMS.GT.2) CALL READF(REDOFRAC)
6089: ! 6086: ! 
6090: ! Whether to use a redopoints file if it exists.6087: ! Whether to use a redopoints file if it exists.
6091: ! 6088: ! 
6092:          ELSE IF (WORD.EQ.'REDOPATHNEB') THEN6089:          ELSE IF (WORD.EQ.'REDOPATHNEB') THEN
6093:             REDOPATHNEB=.TRUE.6090:             REDOPATHNEB=.TRUE.
6094:             REDOPATH=.TRUE.6091:             REDOPATH=.TRUE.
6095:             FREEZENODEST=.TRUE.6092:             FREEZENODEST=.TRUE.
6096:             FREEZETOL=-1.0D06093:             FREEZETOL=-1.0D0
6097:             IF (NITEMS.GT.1) CALL READI(REDOBFGSSTEPS)6094:             IF (NITEMS.GT.1) CALL READI(REDOBFGSSTEPS)


r32777/minpermdist.f90 2017-06-12 15:30:10.174306995 +0100 r32776/minpermdist.f90 2017-06-12 15:30:12.530337940 +0100
820:   &                    +(DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2))**2 &820:   &                    +(DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2))**2 &
821:   &                    +(DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3))**2821:   &                    +(DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3))**2
822:    ELSE822:    ELSE
823:       DISTANCE=DISTANCE + (DUMMYA(3*(J3-1)+1)-DUMMYB(3*(J3-1)+1)- BOXLX*NINT((DUMMYA(3*(J3-1)+1)-DUMMYB(3*(J3-1)+1))/BOXLX))**2 &823:       DISTANCE=DISTANCE + (DUMMYA(3*(J3-1)+1)-DUMMYB(3*(J3-1)+1)- BOXLX*NINT((DUMMYA(3*(J3-1)+1)-DUMMYB(3*(J3-1)+1))/BOXLX))**2 &
824:   &                     + (DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2)- BOXLY*NINT((DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2))/BOXLY))**2 824:   &                     + (DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2)- BOXLY*NINT((DUMMYA(3*(J3-1)+2)-DUMMYB(3*(J3-1)+2))/BOXLY))**2 
825:       IF (.NOT.TWOD) DISTANCE=DISTANCE+(DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3) -  &825:       IF (.NOT.TWOD) DISTANCE=DISTANCE+(DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3) -  &
826:   &                                                               BOXLZ*NINT((DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3))/BOXLZ))**2826:   &                                                               BOXLZ*NINT((DUMMYA(3*(J3-1)+3)-DUMMYB(3*(J3-1)+3))/BOXLZ))**2
827:    ENDIF827:    ENDIF
828: ENDDO828: ENDDO
829: 829: 
830: ! IF (LDB.OR.DEBUG) WRITE(*,'(A,I6,A,G20.10)') ' minpermdist> distance after moving ',NPERM,' atoms=',SQRT(DISTANCE)830:   IF (LDB.OR.DEBUG) WRITE(*,'(A,I6,A,G20.10)') ' minpermdist> distance after moving ',NPERM,' atoms=',SQRT(DISTANCE)
831: 831: 
832: ! CALL OCHARMM(DUMMYA,VNEW,ENERGY,.FALSE.,.FALSE.)832: ! CALL OCHARMM(DUMMYA,VNEW,ENERGY,.FALSE.,.FALSE.)
833: ! PRINT '(A,F25.15,A)',' Energy=',ENERGY,' kcal/mol'833: ! PRINT '(A,F25.15,A)',' Energy=',ENERGY,' kcal/mol'
834: ! IF (CHRMMT) CALL UPDATENBONDS(DUMMYA)834: ! IF (CHRMMT) CALL UPDATENBONDS(DUMMYA)
835: ! PRINT '(A,F25.15,A)',' Energy=',ENERGY,' kcal/mol after update'835: ! PRINT '(A,F25.15,A)',' Energy=',ENERGY,' kcal/mol after update'
836: ! WRITE(*,'(A,I6,A,G20.10)') ' minpermdist> distance after permuting ',NPERM,' pairs of atoms=',SQRT(DISTANCE)836: ! WRITE(*,'(A,I6,A,G20.10)') ' minpermdist> distance after permuting ',NPERM,' pairs of atoms=',SQRT(DISTANCE)
837: !837: !
838: !  Optimal alignment. Coordinates in DUMMYA are reset by NEWMINDIST (second argument).838: !  Optimal alignment. Coordinates in DUMMYA are reset by NEWMINDIST (second argument).
839: !  Must allow at least one call to NEWMINDIST in case the MYORIENT result is terrible839: !  Must allow at least one call to NEWMINDIST in case the MYORIENT result is terrible
840: !  but gives zero permutations!840: !  but gives zero permutations!


r32777/MLPVB3.f90 2017-06-12 15:30:09.066292446 +0100 r32776/MLPVB3.f90 2017-06-12 15:30:10.850315874 +0100
 78:       Y(J4)=Y(J4)-DMAX 78:       Y(J4)=Y(J4)-DMAX
 79:       DUMMY3=DUMMY3+EXP(Y(J4)) 79:       DUMMY3=DUMMY3+EXP(Y(J4))
 80:    ENDDO 80:    ENDDO
 81:    DO J4=1,MLPOUT 81:    DO J4=1,MLPOUT
 82:       PROB(J4)=EXP(Y(J4))/DUMMY3 82:       PROB(J4)=EXP(Y(J4))/DUMMY3
 83:    ENDDO 83:    ENDDO
 84:    PMLPOUTJ1=PROB(MLPOUTJ1) 84:    PMLPOUTJ1=PROB(MLPOUTJ1)
 85:    IF (MLPPROB) THEN 85:    IF (MLPPROB) THEN
 86: !     WRITE(*,'(A,I8,A)') 'MLP3> data point ',J1,' outputs and probabilities:' 86: !     WRITE(*,'(A,I8,A)') 'MLP3> data point ',J1,' outputs and probabilities:'
 87: !     WRITE(LUNIT,'(8G15.5)') Y(1:MLPOUT),PROB(1:MLPOUT), MLPOUTJ1 87: !     WRITE(LUNIT,'(8G15.5)') Y(1:MLPOUT),PROB(1:MLPOUT), MLPOUTJ1
 88:       WRITE(*,'(A,100G20.10)') 'probabilities ',PROB(1:MLPOUT), MLPOUTJ1*1.0D0 88: !     WRITE(*,'(100G20.10)') PROB(1:MLPOUT), MLPOUTJ1*1.0D0
 89:       PSAVE(J1,1:MLPOUT)=PROB(1:MLPOUT) 89:       PSAVE(J1,1:MLPOUT)=PROB(1:MLPOUT)
 90:    ENDIF 90:    ENDIF
 91:    ENERGY=ENERGY-LOG(PMLPOUTJ1) 91:    ENERGY=ENERGY-LOG(PMLPOUTJ1)
 92:    IF (GTEST) THEN 92:    IF (GTEST) THEN
 93: ! 93: !
 94: ! We only need the probability derivative for the probability corresponding to the correct outcome for this data point 94: ! We only need the probability derivative for the probability corresponding to the correct outcome for this data point
 95: ! 95: !
 96:       DPCW1BG(1:MLPOUT,1:MLPHIDDEN)=0.0D0 96:       DPCW1BG(1:MLPOUT,1:MLPHIDDEN)=0.0D0
 97:       DO J2=1,MLPHIDDEN 97:       DO J2=1,MLPHIDDEN
 98:          DO J4=1,MLPOUT 98:          DO J4=1,MLPOUT


r32777/mylbfgs.f 2017-06-12 15:30:10.394309885 +0100 r32776/mylbfgs.f 2017-06-12 15:30:12.750340826 +0100
539:                   DO I1=1,nres539:                   DO I1=1,nres
540:                      X(6*(I1-1)+1)=c(1,I1)540:                      X(6*(I1-1)+1)=c(1,I1)
541:                      X(6*(I1-1)+2)=c(2,I1)541:                      X(6*(I1-1)+2)=c(2,I1)
542:                      X(6*(I1-1)+3)=c(3,I1)542:                      X(6*(I1-1)+3)=c(3,I1)
543:                      X(6*(I1-1)+4)=c(1,I1+nres)543:                      X(6*(I1-1)+4)=c(1,I1+nres)
544:                      X(6*(I1-1)+5)=c(2,I1+nres)544:                      X(6*(I1-1)+5)=c(2,I1+nres)
545:                      X(6*(I1-1)+6)=c(3,I1+nres)545:                      X(6*(I1-1)+6)=c(3,I1+nres)
546:                   ENDDO546:                   ENDDO
547:                ENDIF547:                ENDIF
548:             ENDIF548:             ENDIF
549:             WRITE(*,'(A,F20.10)') ' mylbfgs> Diagonal inverse Hessian elements are now ',DIAG(1)549: !           WRITE(*,'(A,F20.10)') ' mylbfgs> Diagonal inverse Hessian elements are now ',DIAG(1)
550: C           DGUESS=DIAG(1) ! saved for subsequent calls - should be OK for the same system?550: C           DGUESS=DIAG(1) ! saved for subsequent calls - should be OK for the same system?
551: C                          ! May make redopath runs unreproducible?551: C                          ! May make redopath runs unreproducible?
552:             IF (PTEST) WRITE(*,'(A,G25.17)') ' mylbfgs> Final energy is ',ENERGY552:             IF (PTEST) WRITE(*,'(A,G25.17)') ' mylbfgs> Final energy is ',ENERGY
553:             RETURN553:             RETURN
554:          ENDIF554:          ENDIF
555:       ENDIF555:       ENDIF
556: 556: 
557:       IF (ITDONE.EQ.ITMAX) THEN557:       IF (ITDONE.EQ.ITMAX) THEN
558:          FIXIMAGE=.FALSE.558:          FIXIMAGE=.FALSE.
559:          IF (INTMINT) THEN559:          IF (INTMINT) THEN


r32777/newneb.f90 2017-06-12 15:30:09.282295281 +0100 r32776/newneb.f90 2017-06-12 15:30:11.070318763 +0100
249:                                     ! behaviour in this case.249:                                     ! behaviour in this case.
250:                     CALL GENRIGID_IMAGE_CTORIGID(NIMAGE, XYZ)250:                     CALL GENRIGID_IMAGE_CTORIGID(NIMAGE, XYZ)
251:                     DEBUG = LDEBUG251:                     DEBUG = LDEBUG
252:                 ENDIF 252:                 ENDIF 
253:              ELSE253:              ELSE
254:                 IF (UNRST) THEN ! JMC254:                 IF (UNRST) THEN ! JMC
255:                    CALL UNRESDIHENEB(QQ,FINFIN,MYPTS)255:                    CALL UNRESDIHENEB(QQ,FINFIN,MYPTS)
256:                    XYZ(NOPT+1:NOPT*(NIMAGE+1))=MYPTS(1:NOPT*NIMAGE)256:                    XYZ(NOPT+1:NOPT*(NIMAGE+1))=MYPTS(1:NOPT*NIMAGE)
257:                 ELSEIF (REDOPATHNEB) THEN257:                 ELSEIF (REDOPATHNEB) THEN
258:                    ! sn402: There's probably no rigid body support with this option.258:                    ! sn402: There's probably no rigid body support with this option.
259: !                  REDOKADD=.TRUE.259:                    REDOKADD=.TRUE.
260:                    REDOPATH1=.TRUE.260:                    REDOPATH1=.TRUE.
261:                    REDOTSIM=NIMAGE*D1INIT/(D1INIT+D2INIT)+1261:                    REDOTSIM=NIMAGE*D1INIT/(D1INIT+D2INIT)+1
262:                    XYZ(NOPT*REDOTSIM+1:NOPT*(REDOTSIM+1))=TSREDO(1:NOPT)262:                    XYZ(NOPT*REDOTSIM+1:NOPT*(REDOTSIM+1))=TSREDO(1:NOPT)
263:                    ALLOCATE(DELTAX(NOPT))263:                    ALLOCATE(DELTAX(NOPT))
264:                    IF (BULKT) THEN264:                    IF (BULKT) THEN
265:                       DO K=1,NATOMS265:                       DO K=1,NATOMS
266:                          DELTAX(3*(K-1)+1)=XYZ(NOPT*REDOTSIM+3*(K-1)+1) - XYZ(3*(K-1)+1) &266:                          DELTAX(3*(K-1)+1)=XYZ(NOPT*REDOTSIM+3*(K-1)+1) - XYZ(3*(K-1)+1) &
267:   &                          -PARAM1*NINT((XYZ(NOPT*REDOTSIM+3*(K-1)+1) - XYZ(3*(K-1)+1))/PARAM1)267:   &                          -PARAM1*NINT((XYZ(NOPT*REDOTSIM+3*(K-1)+1) - XYZ(3*(K-1)+1))/PARAM1)
268:                          DELTAX(3*(K-1)+2)=XYZ(NOPT*REDOTSIM+3*(K-1)+2) - XYZ(3*(K-1)+2) &268:                          DELTAX(3*(K-1)+2)=XYZ(NOPT*REDOTSIM+3*(K-1)+2) - XYZ(3*(K-1)+2) &
269:   &                          -PARAM2*NINT((XYZ(NOPT*REDOTSIM+3*(K-1)+2) - XYZ(3*(K-1)+2))/PARAM2)269:   &                          -PARAM2*NINT((XYZ(NOPT*REDOTSIM+3*(K-1)+2) - XYZ(3*(K-1)+2))/PARAM2)
316:                    LRESET=.TRUE.316:                    LRESET=.TRUE.
317:                    DO I=REDOTSIM+2,NIMAGE+1317:                    DO I=REDOTSIM+2,NIMAGE+1
318:                       CALL MYLBFGS(NOPT,MUPDATE,LCOORDS,.FALSE.,MFLAG,ENERGY,RMS2,EREAL,RMS,REDOBFGSSTEPS,LRESET, &318:                       CALL MYLBFGS(NOPT,MUPDATE,LCOORDS,.FALSE.,MFLAG,ENERGY,RMS2,EREAL,RMS,REDOBFGSSTEPS,LRESET, &
319:   &                                ITDONE,LPTEST,VNEW,.TRUE.,.FALSE.)319:   &                                ITDONE,LPTEST,VNEW,.TRUE.,.FALSE.)
320:                       LRESET=.FALSE.320:                       LRESET=.FALSE.
321:                       XYZ(NOPT*(I-1)+1:NOPT*I)=LCOORDS(1:NOPT)321:                       XYZ(NOPT*(I-1)+1:NOPT*I)=LCOORDS(1:NOPT)
322:                       IF (DEBUG) PRINT '(A,I6,A,F20.10)',' newneb> energy of image ',I,' is ',EREAL322:                       IF (DEBUG) PRINT '(A,I6,A,F20.10)',' newneb> energy of image ',I,' is ',EREAL
323:                    ENDDO323:                    ENDDO
324:                    DEALLOCATE(DELTAX,VNEW,LCOORDS)324:                    DEALLOCATE(DELTAX,VNEW,LCOORDS)
325:                    KNOWE=.FALSE.; KNOWG=.FALSE.; KNOWH=.FALSE.325:                    KNOWE=.FALSE.; KNOWG=.FALSE.; KNOWH=.FALSE.
326: !                  REDOKADD=.FALSE.326:                    REDOKADD=.FALSE.
327:                    REDOPATH2=.FALSE.327:                    REDOPATH2=.FALSE.
328:                 ELSEIF (REDOPATH) THEN328:                 ELSEIF (REDOPATH) THEN
329:                    XYZ(NOPT+1:NOPT*2) = TSREDO(1:NOPT)329:                    XYZ(NOPT+1:NOPT*2) = TSREDO(1:NOPT)
330:                    PRINT '(A)','newneb> Setting tangent vector and hence initial eigenvector guess to difference between minima'330:                    PRINT '(A)','newneb> Setting tangent vector and hence initial eigenvector guess to difference between minima'
331:                    TANVEC(1:NOPT,1)=XYZ(1:NOPT)-XYZ(NOPT*2+1:NOPT*3)331:                    TANVEC(1:NOPT,1)=XYZ(1:NOPT)-XYZ(NOPT*2+1:NOPT*3)
332:                    EEE(2)=1.0D100332:                    EEE(2)=1.0D100
333:                 ELSE333:                 ELSE
334:                    IF (INTCONSTRAINTT) THEN334:                    IF (INTCONSTRAINTT) THEN
335:                       ! QCI method to construct initial band.335:                       ! QCI method to construct initial band.
336: 336: 


r32777/output.f90 2017-06-12 15:30:09.506298222 +0100 r32776/output.f90 2017-06-12 15:30:11.290321651 +0100
 15: !   You should have received a copy of the GNU General Public License 15: !   You should have received a copy of the GNU General Public License
 16: !   along with this program; if not, write to the Free Software 16: !   along with this program; if not, write to the Free Software
 17: !   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA 17: !   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 18: ! 18: !
 19: MODULE NEBOUTPUT 19: MODULE NEBOUTPUT
 20:      IMPLICIT NONE 20:      IMPLICIT NONE
 21:      CONTAINS 21:      CONTAINS
 22:  22: 
 23:      SUBROUTINE TSLOCATOR(TSRESET) 23:      SUBROUTINE TSLOCATOR(TSRESET)
 24:           USE KEY,ONLY: BFGSTST,UNRST,NSTEPS,MACHINE, GROWSTRINGT, INTEPSILON, REDOTSIM, EDIFFTOL, & 24:           USE KEY,ONLY: BFGSTST,UNRST,NSTEPS,MACHINE, GROWSTRINGT, INTEPSILON, REDOTSIM, EDIFFTOL, &
 25:   &                     NONEBMAX, INTCONSTRAINTT, CUDAT, FLATPATHT, FLATTESTT, FLATEDIFF, MAXIMFACTOR 25:   &                     NONEBMAX, INTCONSTRAINTT, CUDAT, FLATPATHT, FLATTESTT, FLATEDIFF
 26:           USE GSDATA, ONLY: EVOLVESTRINGT 26:           USE GSDATA, ONLY: EVOLVESTRINGT
 27:           USE KEYOUTPUT 27:           USE KEYOUTPUT
 28:           USE MODCHARMM 28:           USE MODCHARMM
 29:           USE NEBDATA 29:           USE NEBDATA
 30:           USE KEYNEB,ONLY:NIMAGE,DEBUG 30:           USE KEYNEB,ONLY:NIMAGE,DEBUG
 31:           USE NEBTOCONNECT 31:           USE NEBTOCONNECT
 32:           USE CHARUTILS 32:           USE CHARUTILS
 33:           USE MODGUESS 33:           USE MODGUESS
 34:           USE MODMEC 34:           USE MODMEC
 35:           USE LINKEDLIST 35:           USE LINKEDLIST
 76:                      IF (EEE(J1).GT.MAXE) THEN 76:                      IF (EEE(J1).GT.MAXE) THEN
 77:                         MLOC=J1 77:                         MLOC=J1
 78:                         MAXE=EEE(J1) 78:                         MAXE=EEE(J1)
 79:                      ENDIF 79:                      ENDIF
 80:                   ENDDO 80:                   ENDDO
 81:                   TSPOS(1)=MLOC 81:                   TSPOS(1)=MLOC
 82:              CASE('all','maxim') 82:              CASE('all','maxim')
 83:                   DO I=2,NIMAGE+1  83:                   DO I=2,NIMAGE+1 
 84:                        T=.FALSE. 84:                        T=.FALSE.
 85:                        IF (CANDIDATES=='maxim') then 85:                        IF (CANDIDATES=='maxim') then
 86:                             IF ( EEE(I-1)+EDIFFTOL*MAXIMFACTOR < EEE(I) .AND. EEE(I) > EEE(I+1)+EDIFFTOL*MAXIMFACTOR ) THEN 86:                             IF ( EEE(I-1)+EDIFFTOL*10.0D0 < EEE(I) .AND. EEE(I) > EEE(I+1)+EDIFFTOL*10.0D0 ) THEN
 87:                                  T=.TRUE. 87:                                  T=.TRUE.
 88:                             ELSE 88:                             ELSE
 89:                                  T=.FALSE. 89:                                  T=.FALSE.
 90:                             ENDIF 90:                             ENDIF
 91:                        ENDIF 91:                        ENDIF
 92: !                      PRINT '(A,I6,3F20.10,L5)','I,EEE(I-1),EEE(I),EEE(I+1),T=',I,EEE(I-1),EEE(I),EEE(I+1),T 92: !                      PRINT '(A,I6,3F20.10,L5)','I,EEE(I-1),EEE(I),EEE(I+1),T=',I,EEE(I-1),EEE(I),EEE(I+1),T
 93:                        IF (T) THEN 93:                        IF (T) THEN
 94:                             NT=NT+1 94:                             NT=NT+1
 95:                             TSPOS(NT)=I ! IS A POSITION OF A MAXIMUM IN ARRAY XYZ 95:                             TSPOS(NT)=I ! IS A POSITION OF A MAXIMUM IN ARRAY XYZ
 96:                        ENDIF 96:                        ENDIF


r32777/potential.f 2017-06-12 15:30:10.622312881 +0100 r32776/potential.f 2017-06-12 15:30:12.974343768 +0100
550: !                  ENDDO550: !                  ENDDO
551: !                ENDDO551: !                ENDDO
552: !                STOP552: !                STOP
553:             ELSEIF (MLPB3T) THEN553:             ELSEIF (MLPB3T) THEN
554:                CALL MLPB3(COORDS, VNEW, ENERGY, GTEST, SSTEST)554:                CALL MLPB3(COORDS, VNEW, ENERGY, GTEST, SSTEST)
555:             ELSEIF (MLP3T) THEN555:             ELSEIF (MLP3T) THEN
556:                CALL MLP3(COORDS, VNEW, ENERGY, GTEST, SSTEST)556:                CALL MLP3(COORDS, VNEW, ENERGY, GTEST, SSTEST)
557:             ELSEIF (MLQT) THEN557:             ELSEIF (MLQT) THEN
558:                CALL MLQ(COORDS, VNEW, ENERGY, GTEST, SSTEST)558:                CALL MLQ(COORDS, VNEW, ENERGY, GTEST, SSTEST)
559:             ELSEIF (ORBITALS) THEN559:             ELSEIF (ORBITALS) THEN
560: !              IF (ALLOCATED(HESS)) DEALLOCATE(HESS)560:                IF (ALLOCATED(HESS)) DEALLOCATE(HESS)
561: !              IF (.NOT.(ALLOCATED(HESS))) THEN561:                IF (.NOT.(ALLOCATED(HESS))) THEN
562: !                   PRINT*,'allocating hessian'562:                     PRINT*,'allocating hessian'
563: !                   ALLOCATE(HESS(1:NROTS,1:NROTS))563:                     ALLOCATE(HESS(1:NROTS,1:NROTS))
564: !              END IF564:                END IF
565:                CALL GET_ORBITAL_LOCALITY(COORDS, VNEW, ENERGY, GTEST, SSTEST)565:                CALL GET_ORBITAL_LOCALITY(COORDS, VNEW, ENERGY, GTEST, SSTEST)
566: !                DIFF=1.0D-6566:                DIFF=1.0D-6
567: !                PRINT*,'analytic and numerical gradients:'567:                PRINT*,'analytic and numerical gradients:'
568: !                IF (.NOT.(ALLOCATED(HESS))) THEN568:                IF (.NOT.(ALLOCATED(HESS))) THEN
569: !                     PRINT*,'allocating hessian'569:                     PRINT*,'allocating hessian'
570: !                     ALLOCATE(HESS(NROTS,NROTS))570:                     ALLOCATE(HESS(NROTS,NROTS))
571: !                END IF571:                END IF
572: !                !CALL MLPVB3(COORDS, VNEW, ENERGY, .TRUE., .TRUE.)572:                !CALL MLPVB3(COORDS, VNEW, ENERGY, .TRUE., .TRUE.)
573: !                CALL GET_ORBITAL_LOCALITY(COORDS, VNEW, ENERGY, .TRUE., .TRUE.)573:                CALL GET_ORBITAL_LOCALITY(COORDS, VNEW, ENERGY, .TRUE., .TRUE.)
574: !                !PRINT '(A,I8)','SIZE(HESS)=',SIZE(HESS)574:                !PRINT '(A,I8)','SIZE(HESS)=',SIZE(HESS)
575: !                !HESSDUM(1:NROTS,1:NROTS)=HESS(1:NROTS,1:NROTS)575:                !HESSDUM(1:NROTS,1:NROTS)=HESS(1:NROTS,1:NROTS)
576: !                !DO J1=1,NATOMS576:                !DO J1=1,NATOMS
577: !                !   COORDS(J1)=COORDS(J1)+DIFF577:                !   COORDS(J1)=COORDS(J1)+DIFF
578: ! !                  CALL MLPVB3(COORDS,VPLUS,EPLUS,.FALSE.,.FALSE.)578: !                  CALL MLPVB3(COORDS,VPLUS,EPLUS,.FALSE.,.FALSE.)
579: !                !   CALL GET_ORBITAL_LOCALITY(COORDS, VPLUS, EPLUS, .FALSE., .FALSE.)579:                !   CALL GET_ORBITAL_LOCALITY(COORDS, VPLUS, EPLUS, .FALSE., .FALSE.)
580: !                !   COORDS(J1)=COORDS(J1)-2.0D0*DIFF580:                !   COORDS(J1)=COORDS(J1)-2.0D0*DIFF
581: ! !                  CALL MLPVB3(COORDS,VMINUS,EMINUS,.FALSE.,.FALSE.)581: !                  CALL MLPVB3(COORDS,VMINUS,EMINUS,.FALSE.,.FALSE.)
582: !                !   CALL GET_ORBITAL_LOCALITY(COORDS, VMINUS, EMINUS, .FALSE., .FALSE.)582:                !   CALL GET_ORBITAL_LOCALITY(COORDS, VMINUS, EMINUS, .FALSE., .FALSE.)
583: !                !   COORDS(J1)=COORDS(J1)+DIFF583:                !   COORDS(J1)=COORDS(J1)+DIFF
584: !                !   IF ((ABS(VNEW(J1)).NE.0.0D0).AND. 584:                !   IF ((ABS(VNEW(J1)).NE.0.0D0).AND. 
585: !      &         !      (ABS(100.0D0*(VNEW(J1)-(EPLUS-EMINUS)/(2.0D0*DIFF))/VNEW(J1)).GT.1.0D0)) THEN585:      &         !      (ABS(100.0D0*(VNEW(J1)-(EPLUS-EMINUS)/(2.0D0*DIFF))/VNEW(J1)).GT.1.0D0)) THEN
586: !                !      WRITE(*,'(A,I5,2F20.10,A)') 'anal and num ',J1,VNEW(J1),(EPLUS-EMINUS)/(2.0D0*DIFF),'   X'586:                !      WRITE(*,'(A,I5,2F20.10,A)') 'anal and num ',J1,VNEW(J1),(EPLUS-EMINUS)/(2.0D0*DIFF),'   X'
587: !                !   ELSE587:                !   ELSE
588: !                !      WRITE(*,'(A,I5,2F20.10)') 'anal and num ',J1,VNEW(J1),(EPLUS-EMINUS)/(2.0D0*DIFF)588:                !      WRITE(*,'(A,I5,2F20.10)') 'anal and num ',J1,VNEW(J1),(EPLUS-EMINUS)/(2.0D0*DIFF)
589: !                !   ENDIF589:                !   ENDIF
590: !                !ENDDO590:                !ENDDO
591: !                !PRINT*,'analytic and numerical second derivatives:'591:                !PRINT*,'analytic and numerical second derivatives:'
592: !                !DO J1=1,NATOMS592:                !DO J1=1,NATOMS
593: !                   !COORDS(J1)=COORDS(J1)+DIFF593:                   !COORDS(J1)=COORDS(J1)+DIFF
594: ! !                  CALL MLPVB3(COORDS,VPLUS,EPLUS,.TRUE.,.FALSE.)594: !                  CALL MLPVB3(COORDS,VPLUS,EPLUS,.TRUE.,.FALSE.)
595: !                   !CALL GET_ORBITAL_LOCALITY(COORDS, VPLUS, ENERGY, .TRUE., .FALSE.)595:                   !CALL GET_ORBITAL_LOCALITY(COORDS, VPLUS, ENERGY, .TRUE., .FALSE.)
596: !                   !COORDS(J1)=COORDS(J1)-2.0D0*DIFF596:                   !COORDS(J1)=COORDS(J1)-2.0D0*DIFF
597: !                   !CALL MLPVB3(COORDS,VMINUS,EMINUS,.TRUE.,.FALSE.)597:                   !CALL MLPVB3(COORDS,VMINUS,EMINUS,.TRUE.,.FALSE.)
598: !                   !CALL GET_ORBITAL_LOCALITY(COORDS, VMINUS, ENERGY, .TRUE., .FALSE.)598:                   !CALL GET_ORBITAL_LOCALITY(COORDS, VMINUS, ENERGY, .TRUE., .FALSE.)
599: !                   !COORDS(J1)=COORDS(J1)+DIFF599:                   !COORDS(J1)=COORDS(J1)+DIFF
600: !                   !DO J2=1,NATOMS600:                   !DO J2=1,NATOMS
601: !                   !   IF ((ABS(HESS(J1,J2)).NE.0.0D0).AND. 601:                   !   IF ((ABS(HESS(J1,J2)).NE.0.0D0).AND. 
602: !      &            !      (ABS(100.0D0*(HESS(J1,J2)-(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF))/HESS(J1,J2)).GT.1.0D0)) THEN602:      &            !      (ABS(100.0D0*(HESS(J1,J2)-(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF))/HESS(J1,J2)).GT.1.0D0)) THEN
603: !                   !   WRITE(*,'(2I5,2G20.10,A)') J1,J2,HESS(J1,J2),(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF),'   X'603:                   !   WRITE(*,'(2I5,2G20.10,A)') J1,J2,HESS(J1,J2),(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF),'   X'
604: !                   !   ELSE604:                   !   ELSE
605: !                   !      WRITE(*,'(2I5,2G20.10,A)') J1,J2,HESS(J1,J2),(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF)605:                   !      WRITE(*,'(2I5,2G20.10,A)') J1,J2,HESS(J1,J2),(VPLUS(J2)-VMINUS(J2))/(2.0D0*DIFF)
606: !                   !   ENDIF606:                   !   ENDIF
607: !                   !ENDDO607:                   !ENDDO
608: !                 !ENDDO608:                 !ENDDO
609: !                !STOP609:                !STOP
610:                 IF (PTEST) THEN 
611:                    WRITE(*,10) ' potential> Energy for last cycle=',ENERGY,' ' 
612:                    WRITE(ESTRING,10) 'Energy for last cycle=',ENERGY,' ' 
613:                 ENDIF 
614:             ELSE610:             ELSE
615:                CALL FUNCTIONAL( COORDS, VNEW, ENERGY, GTEST, SSTEST)611:                CALL FUNCTIONAL( COORDS, VNEW, ENERGY, GTEST, SSTEST)
616:             ENDIF612:             ENDIF
617:             IF (PTEST.OR.MLPPROB.OR.MLQPROB) THEN613:             IF (PTEST.OR.MLPPROB.OR.MLQPROB) THEN
618:                 WRITE(*,10) ' potential> Energy for last cycle=',ENERGY,'         '614:                 WRITE(*,10) ' potential> Energy for last cycle=',ENERGY,'         '
619:                 WRITE(ESTRING,10) 'Energy for last cycle=',ENERGY,'         '615:                 WRITE(ESTRING,10) 'Energy for last cycle=',ENERGY,'         '
620:             ENDIF616:             ENDIF
621: !           IF (MLPPROB) STOP617: !           IF (MLPPROB) STOP
622:             ! CALL CTEST(NATOMS, COORDS, VNEW, ENERGY, GTEST, SSTEST)618:             ! CALL CTEST(NATOMS, COORDS, VNEW, ENERGY, GTEST, SSTEST)
623:             ! CALL TWODFUNC(COORDS,VNEW,ENERGY,GTEST,SSTEST)619:             ! CALL TWODFUNC(COORDS,VNEW,ENERGY,GTEST,SSTEST)
4009:             ! ENDDO4005:             ! ENDDO
4010:             ! STOP4006:             ! STOP
4011:          ENDIF4007:          ENDIF
4012:          ! 4008:          ! 
4013:          ! Add on attractive term for "closest" minimum if this is a REDOPATH run4009:          ! Add on attractive term for "closest" minimum if this is a REDOPATH run
4014:          ! Here we have to define closest in terms of which minimum we have moved4010:          ! Here we have to define closest in terms of which minimum we have moved
4015:          ! towards, not in terms of absolute distance, because of asymmetric pathways.4011:          ! towards, not in terms of absolute distance, because of asymmetric pathways.
4016:          ! Avoid division by zero for D1INIT and D2INIT!4012:          ! Avoid division by zero for D1INIT and D2INIT!
4017:          ! 4013:          ! 
4018: ! #endif4014: ! #endif
4019: !          IF (REDOKADD.AND.REDOPATH.AND.(.NOT.REDOPATHXYZ).AND.(REDOK.NE.0.0D0).AND.4015:          IF (REDOKADD.AND.REDOPATH.AND.(.NOT.REDOPATHXYZ).AND.(REDOK.NE.0.0D0).AND.
4020: !      &   (ALLOCATED(MIN1REDO)).AND.(ALLOCATED(MIN2REDO)).AND.(D1INIT*D2INIT.NE.0.0D0)) THEN4016:      &   (ALLOCATED(MIN1REDO)).AND.(ALLOCATED(MIN2REDO)).AND.(D1INIT*D2INIT.NE.0.0D0)) THEN
4021: ! 4017: 
4022: !             CALL NEWMINDIST(COORDS,MIN1REDO,NATOMS,DIST1,BULKT,TWOD,'AX   ',.FALSE.,RIGIDBODY,DEBUG,RMAT)4018:             CALL NEWMINDIST(COORDS,MIN1REDO,NATOMS,DIST1,BULKT,TWOD,'AX   ',.FALSE.,RIGIDBODY,DEBUG,RMAT)
4023: !             CALL NEWMINDIST(COORDS,MIN2REDO,NATOMS,DIST2,BULKT,TWOD,'AX   ',.FALSE.,RIGIDBODY,DEBUG,RMAT)4019:             CALL NEWMINDIST(COORDS,MIN2REDO,NATOMS,DIST2,BULKT,TWOD,'AX   ',.FALSE.,RIGIDBODY,DEBUG,RMAT)
4024: ! 4020: 
4025: !             IF     ((DIST1/D1INIT.LT.REDOFRAC).AND.REDOPATH1) THEN4021:             IF     ((DIST1/D1INIT.LT.REDOFRAC).AND.REDOPATH1) THEN
4026: !                DUMMY1=0.0D04022:                DUMMY1=0.0D0
4027: !                DUMMY2=0.0D04023:                DUMMY2=0.0D0
4028: !                DUMMY3=0.0D04024:                DUMMY3=0.0D0
4029: !                DO J1=1,NOPT4025:                DO J1=1,NOPT
4030: !                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))4026:                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))
4031: !                   DUMMY1=DUMMY1+VNEW(J1)*(MIN1REDO(J1)-COORDS(J1))4027:                   DUMMY1=DUMMY1+VNEW(J1)*(MIN1REDO(J1)-COORDS(J1))
4032: !                   DUMMY2=DUMMY2+VNEW(J1)**24028:                   DUMMY2=DUMMY2+VNEW(J1)**2
4033: !                   DUMMY3=DUMMY3+(COORDS(J1)-MIN1REDO(J1))**24029:                   DUMMY3=DUMMY3+(COORDS(J1)-MIN1REDO(J1))**2
4034: !                ENDDO4030:                ENDDO
4035: !                DUMMY1=DUMMY1/SQRT(DUMMY3)4031:                DUMMY1=DUMMY1/SQRT(DUMMY3)
4036: !                IF (DEBUG) PRINT '(A,2G15.5,A,G20.10)',' potential> distances/initial distance are ',DIST1/D1INIT,DIST2/D2INIT,4032:                IF (DEBUG) PRINT '(A,2G15.5,A,G20.10)',' potential> distances/initial distance are ',DIST1/D1INIT,DIST2/D2INIT,
4037: !      &         ' grad % towards first minimum=',DUMMY1*100/SQRT(DUMMY2)4033:      &         ' grad % towards first minimum=',DUMMY1*100/SQRT(DUMMY2)
4038: !                ! IF (DUMMY1.GT.0.0D0) DUMMY1=-DUMMY14034:                ! IF (DUMMY1.GT.0.0D0) DUMMY1=-DUMMY1
4039: !                DO J1=1,NOPT4035:                DO J1=1,NOPT
4040: !                   VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))4036:                   VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))
4041: !                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))*SQRT(DUMMY2/DUMMY3)4037:                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN1REDO(J1))*SQRT(DUMMY2/DUMMY3)
4042: !                ENDDO4038:                ENDDO
4043: !             ELSEIF ((DIST2/D2INIT.LT.REDOFRAC).AND.REDOPATH2) THEN4039:             ELSEIF ((DIST2/D2INIT.LT.REDOFRAC).AND.REDOPATH2) THEN
4044: !                DUMMY1=0.0D04040:                DUMMY1=0.0D0
4045: !                DUMMY2=0.0D04041:                DUMMY2=0.0D0
4046: !                DUMMY3=0.0D04042:                DUMMY3=0.0D0
4047: !                DO J1=1,NOPT4043:                DO J1=1,NOPT
4048: !                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))4044:                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))
4049: !                   DUMMY1=DUMMY1+VNEW(J1)*(MIN2REDO(J1)-COORDS(J1))4045:                   DUMMY1=DUMMY1+VNEW(J1)*(MIN2REDO(J1)-COORDS(J1))
4050: !                   DUMMY2=DUMMY2+VNEW(J1)**24046:                   DUMMY2=DUMMY2+VNEW(J1)**2
4051: !                   DUMMY3=DUMMY3+(COORDS(J1)-MIN2REDO(J1))**24047:                   DUMMY3=DUMMY3+(COORDS(J1)-MIN2REDO(J1))**2
4052: !                ENDDO4048:                ENDDO
4053: !                DUMMY1=DUMMY1/SQRT(DUMMY3)4049:                DUMMY1=DUMMY1/SQRT(DUMMY3)
4054: !                IF (DEBUG) PRINT '(A,2G15.5,A,G20.10)',' potential> distances/initial distance are ',DIST1/D1INIT,DIST2/D2INIT,4050:                IF (DEBUG) PRINT '(A,2G15.5,A,G20.10)',' potential> distances/initial distance are ',DIST1/D1INIT,DIST2/D2INIT,
4055: !      &         ' grad % for second minimum=',DUMMY1*100/SQRT(DUMMY2)4051:      &         ' grad % for second minimum=',DUMMY1*100/SQRT(DUMMY2)
4056: !                ! IF (DUMMY1.GT.0.0D0) DUMMY1=-DUMMY14052:                ! IF (DUMMY1.GT.0.0D0) DUMMY1=-DUMMY1
4057: !                DO J1=1,NOPT4053:                DO J1=1,NOPT
4058: !                   VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))4054:                   VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))
4059: !                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))*SQRT(DUMMY2/DUMMY3)4055:                   ! VNEW(J1)=VNEW(J1)+REDOK*(COORDS(J1)-MIN2REDO(J1))*SQRT(DUMMY2/DUMMY3)
4060: !                ENDDO4056:                ENDDO
4061: !             ENDIF4057:             ENDIF
4062: !          ENDIF4058:          ENDIF
4063: ! #ifndef _OPTIMLIBRARY4059: ! #ifndef _OPTIMLIBRARY
4064:          ! 4060:          ! 
4065:          ! Add on terms for rotation about the z axis4061:          ! Add on terms for rotation about the z axis
4066:          ! 4062:          ! 
4067:          IF (RTEST) THEN4063:          IF (RTEST) THEN
4068:             PRINT*,'WARNING - this potential has not been tested in OPTIM.3.0'4064:             PRINT*,'WARNING - this potential has not been tested in OPTIM.3.0'
4069:             PRINT*,' WARNING - GTEST and SSTEST ignored'4065:             PRINT*,' WARNING - GTEST and SSTEST ignored'
4070:             IF (JZ.NE.0.0D0) THEN4066:             IF (JZ.NE.0.0D0) THEN
4071:                CALL ROTD(NATOMS, COORDS, VNEW, 1.0D0, JZ, .FALSE., ROT)4067:                CALL ROTD(NATOMS, COORDS, VNEW, 1.0D0, JZ, .FALSE., ROT)
4072:             ELSE4068:             ELSE
4185:                CALL VSTAT(VNEW,TEMP,NOPT,NOPT)4181:                CALL VSTAT(VNEW,TEMP,NOPT,NOPT)
4186:                IF (PTEST) WRITE(*,'(A,43X,G15.10,2X,A,G15.10)') ' potential> RMS force: ',TEMP(5),' |gradient|=',4182:                IF (PTEST) WRITE(*,'(A,43X,G15.10,2X,A,G15.10)') ' potential> RMS force: ',TEMP(5),' |gradient|=',
4187:      &         TEMP(5)*SQRT(1.0D0*(NOPT))4183:      &         TEMP(5)*SQRT(1.0D0*(NOPT))
4188:             ENDIF4184:             ENDIF
4189:             RMS=TEMP(5)4185:             RMS=TEMP(5)
4190:             IF(DEBUG.AND.(RMS.NE.RMS)) THEN4186:             IF(DEBUG.AND.(RMS.NE.RMS)) THEN
4191:                WRITE(*,'(A)' ) 'potential> WARNING - RMS force is NaN - if using AMBER igb=1, can be due to negative Born radii'4187:                WRITE(*,'(A)' ) 'potential> WARNING - RMS force is NaN - if using AMBER igb=1, can be due to negative Born radii'
4192:             END IF4188:             END IF
4193:             ! PRINT '(A,G20.10)',' potential> RMS=',RMS4189:             ! PRINT '(A,G20.10)',' potential> RMS=',RMS
4194:             IF (CPMD.AND.(RMS.EQ.0.0D0)) RMS=1.0D0  !  to prevent convergence when CPMD SCF fails4190:             IF (CPMD.AND.(RMS.EQ.0.0D0)) RMS=1.0D0  !  to prevent convergence when CPMD SCF fails
4195:  
4196:             IF (REDOKADD.AND.REDOPATH.AND.ALLOCATED(MIN1REDO).AND.ALLOCATED(MIN2REDO).AND.(PLUSSIDET.OR.MINUSSIDET)) THEN 
4197: !!!!!!!!!!!!!!!!!!!! DEBUG DJW 
4198: !           ZSTAR=PARAM1 
4199: !           CALL LJDIFF(NATOMS, MIN1REDO, VPLUS, EPLUS, .FALSE., .FALSE.) 
4200: !           CALL LJDIFF(NATOMS, MIN2REDO, VMINUS, EMINUS, .FALSE., .FALSE.) 
4201: !           PRINT '(A,2G20.10)','potential> plus and minus minima energies=',EPLUS,EMINUS 
4202: !!!!!!!!!!!!!!!!!!!! DEBUG DJW 
4203:  
4204:                IF (PLUSSIDET) THEN 
4205: !              IF (DEBUG) PRINT '(A,G20.10)','Adding bias term to gradient for plus minimum with force constant ',REDOK 
4206:                   DO J1=1,NOPT 
4207:                      VNEW(J1)=VNEW(J1)+2.0D0*REDOK*RMS*(COORDS(J1)-MIN1REDO(J1)) 
4208: !                    VNEW(J1)=VNEW(J1)+2.0D0*REDOK*(COORDS(J1)-MIN1REDO(J1)) 
4209:                   ENDDO 
4210:                ELSEIF (MINUSSIDET) THEN 
4211: !              IF (DEBUG) PRINT '(A,G20.10)','Adding bias term to gradient for minus minimum with force constant ',REDOK 
4212:                   DO J1=1,NOPT 
4213:                      VNEW(J1)=VNEW(J1)+2.0D0*REDOK*RMS*(COORDS(J1)-MIN2REDO(J1)) 
4214: !                    VNEW(J1)=VNEW(J1)+2.0D0*REDOK*(COORDS(J1)-MIN2REDO(J1)) 
4215:                   ENDDO 
4216:                ENDIF 
4217:             ENDIF 
4218:  
4219:          ENDIF4191:          ENDIF
4220:          ! 4192:          ! 
4221:          ! If the Hessian gets overwritten by diagonalisation we must read it back in before updating!4193:          ! If the Hessian gets overwritten by diagonalisation we must read it back in before updating!
4222:          ! 4194:          ! 
4223:          IF (GTEST.AND.(STEST.AND.HUPDATE)) THEN4195:          IF (GTEST.AND.(STEST.AND.HUPDATE)) THEN
4224:             NHUP=NHUP+14196:             NHUP=NHUP+1
4225:             IF (INTHUP.EQ.-1) THEN4197:             IF (INTHUP.EQ.-1) THEN
4226:                WRITE(*,'(A)') ' potential> Not updating Hessian'4198:                WRITE(*,'(A)') ' potential> Not updating Hessian'
4227:                IF (NHUP.GT.1) THEN4199:                IF (NHUP.GT.1) THEN
4228:                   OPEN(UNIT=34,FILE='hessdump',FORM='UNFORMATTED',STATUS='UNKNOWN')4200:                   OPEN(UNIT=34,FILE='hessdump',FORM='UNFORMATTED',STATUS='UNKNOWN')


legend
Lines Added 
Lines changed
 Lines Removed

hdiff - version: 2.1.0