root / src / PrintGeom.f90 @ 3
Historique | Voir | Annoter | Télécharger (4,32 ko)
| 1 | 1 | pfleura2 | ! This subroutine prints a geometry |
|---|---|---|---|
| 2 | 1 | pfleura2 | SUBROUTINE PrintGeom(Title,Nat,NCoord,Geom,Coord,IOOUT,Atome,Order,OrderInv,IndZmat) |
| 3 | 1 | pfleura2 | |
| 4 | 1 | pfleura2 | use Path_module, only : Renum,Nom,NCart,Pi |
| 5 | 1 | pfleura2 | |
| 6 | 1 | pfleura2 | IMPLICIT NONE |
| 7 | 1 | pfleura2 | |
| 8 | 1 | pfleura2 | |
| 9 | 1 | pfleura2 | INTEGER, PARAMETER :: KINT=KIND(1) |
| 10 | 1 | pfleura2 | INTEGER, PARAMETER :: KREAL=KIND(1.D0) |
| 11 | 1 | pfleura2 | |
| 12 | 1 | pfleura2 | CHARACTER(*), INTENT(IN) :: Title |
| 13 | 1 | pfleura2 | INTEGER(KINT), INTENT(IN) :: Nat,NCoord,IoOut |
| 14 | 1 | pfleura2 | INTEGER(KINT), INTENT(IN) :: Atome(Nat),Order(Nat), OrderInv(Nat),IndZmat(Nat,5) |
| 15 | 1 | pfleura2 | CHARACTER(32), INTENT(IN) :: Coord |
| 16 | 1 | pfleura2 | REAL(KREAL), INTENT(IN) :: Geom(NCoord) |
| 17 | 1 | pfleura2 | |
| 18 | 1 | pfleura2 | INTEGER(KINT) :: Idx, Iat,I,IBeg |
| 19 | 1 | pfleura2 | LOGICAL :: Debug=.FALSE. |
| 20 | 1 | pfleura2 | |
| 21 | 1 | pfleura2 | SELECT CASE (COORD) |
| 22 | 1 | pfleura2 | CASE ("ZMAT")
|
| 23 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A)') TRIM(AdjustL(Title)) |
| 24 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(1,1)))) |
| 25 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(2,1)))), & |
| 26 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(2,2)))),Geom(1) |
| 27 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(3,1)))), & |
| 28 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(3,2)))),Geom(2), & |
| 29 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(3,3)))),Geom(3)*180./Pi |
| 30 | 1 | pfleura2 | Idx=4 |
| 31 | 1 | pfleura2 | DO Iat=4,Nat |
| 32 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(iat,1)))), & |
| 33 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,2)))),Geom(Idx), & |
| 34 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,3)))),Geom(Idx+1)*180./Pi, & |
| 35 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,4)))),Geom(Idx+2)*180./Pi |
| 36 | 1 | pfleura2 | Idx=Idx+3 |
| 37 | 1 | pfleura2 | END DO |
| 38 | 1 | pfleura2 | |
| 39 | 1 | pfleura2 | |
| 40 | 1 | pfleura2 | if (debug) THEN |
| 41 | 1 | pfleura2 | WRITE(*,'(1X,A)') TRIM(AdjustL(Title)) |
| 42 | 1 | pfleura2 | WRITE(*,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(1,1)))) |
| 43 | 1 | pfleura2 | WRITE(*,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(2,1)))), & |
| 44 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(2,2)))),Geom(1) |
| 45 | 1 | pfleura2 | WRITE(*,'(1X,A5,3(1X,A4,1X,F14.6))') Nom(Atome(OrderInv(indzmat(3,1)))), & |
| 46 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(3,2)))),Geom(2), & |
| 47 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(3,3)))),Geom(3)*180./Pi |
| 48 | 1 | pfleura2 | Idx=4 |
| 49 | 1 | pfleura2 | DO Iat=4,Nat |
| 50 | 1 | pfleura2 | WRITE(*,'(1X,A5,3(1X,A4,1X,F11.6))') Nom(Atome(OrderInv(indzmat(iat,1)))), & |
| 51 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,2)))),Geom(Idx), & |
| 52 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,3)))),Geom(Idx+1)*180./Pi, & |
| 53 | 1 | pfleura2 | Nom(Atome(OrderInv(indzmat(iat,4)))),Geom(Idx+2)*180./Pi |
| 54 | 1 | pfleura2 | Idx=Idx+3 |
| 55 | 1 | pfleura2 | END DO |
| 56 | 1 | pfleura2 | END IF |
| 57 | 1 | pfleura2 | CASE ("MIXED")
|
| 58 | 1 | pfleura2 | ! WRITE(*,'(1X,A,12(1X,F10.5))') "IntCoordTmp:",Geom(1:NCoord) |
| 59 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A)') TRIM(AdjustL(Title)) |
| 60 | 1 | pfleura2 | DO I=1,NCart |
| 61 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,F11.6))') Nom(Atome(OrderInv(indzmat(1,1)))) & |
| 62 | 1 | pfleura2 | ,Geom(3*I-2:3*I) |
| 63 | 1 | pfleura2 | END DO |
| 64 | 1 | pfleura2 | Idx=3*NCart+1 |
| 65 | 1 | pfleura2 | SELECT CASE (NCart) |
| 66 | 1 | pfleura2 | CASE (1) |
| 67 | 1 | pfleura2 | I=2 |
| 68 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(I5,F11.6))') Nom(Atome(OrderInv(Indzmat(I,1)))), & |
| 69 | 1 | pfleura2 | IndZmat(I,2),Geom(Idx) |
| 70 | 1 | pfleura2 | Idx=Idx+1 |
| 71 | 1 | pfleura2 | I=3 |
| 72 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(I5,F11.6))') Nom(Atome(OrderInv(Indzmat(I,1)))), & |
| 73 | 1 | pfleura2 | IndZmat(I,2),Geom(Idx),IndZmat(I,3), & |
| 74 | 1 | pfleura2 | Geom(Idx+1)*180./Pi |
| 75 | 1 | pfleura2 | Idx=Idx+2 |
| 76 | 1 | pfleura2 | Ibeg=4 |
| 77 | 1 | pfleura2 | CASE (2) |
| 78 | 1 | pfleura2 | I=3 |
| 79 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(I5,F11.6))') Nom(Atome(OrderInv(Indzmat(I,1)))), & |
| 80 | 1 | pfleura2 | IndZmat(I,2),Geom(Idx),IndZmat(I,3), & |
| 81 | 1 | pfleura2 | Geom(Idx+1)*180./Pi |
| 82 | 1 | pfleura2 | Idx=Idx+2 |
| 83 | 1 | pfleura2 | Ibeg=4 |
| 84 | 1 | pfleura2 | CASE DEFAULT |
| 85 | 1 | pfleura2 | IBeg=NCart+1 |
| 86 | 1 | pfleura2 | END SELECT |
| 87 | 1 | pfleura2 | DO I=IBeg,Nat |
| 88 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(I5,F11.6))') Nom(Atome(OrderInv(Indzmat(I,1)))), & |
| 89 | 1 | pfleura2 | IndZmat(I,2),Geom(Idx),IndZmat(I,3), & |
| 90 | 1 | pfleura2 | Geom(Idx+1)*180./Pi, & |
| 91 | 1 | pfleura2 | IndZmat(I,4),Geom(Idx+2)*180./Pi |
| 92 | 1 | pfleura2 | Idx=Idx+3 |
| 93 | 1 | pfleura2 | END DO |
| 94 | 1 | pfleura2 | CASE ('CART','HYBRID')
|
| 95 | 1 | pfleura2 | WRITE(IOOUT,'(1X,I5)') Nat |
| 96 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A)') TRIM(AdjustL(Title)) |
| 97 | 1 | pfleura2 | DO I=1,Nat |
| 98 | 1 | pfleura2 | Iat=I |
| 99 | 1 | pfleura2 | If (renum) Iat=Order(I) |
| 100 | 1 | pfleura2 | !!! CAUTION : PFL 29.AUG.2008 -> |
| 101 | 1 | pfleura2 | ! Old line: |
| 102 | 1 | pfleura2 | ! WRITE(IOOUT,'(1X,A5,3(1X,F11.6))') Nom(Atome(i)), Geom(3*Iat-2:3*Iat) |
| 103 | 1 | pfleura2 | ! uses implicitly that Geom is Geom(3,Nat) whereas it is in fact Geom(Nat,3) :-( |
| 104 | 1 | pfleura2 | WRITE(IOOUT,'(1X,A5,3(1X,F11.6))') Nom(Atome(i)), Geom(Iat), Geom(Iat+Nat), Geom(Iat+2*Nat) |
| 105 | 1 | pfleura2 | |
| 106 | 1 | pfleura2 | END DO |
| 107 | 1 | pfleura2 | CASE ('BAKER')
|
| 108 | 1 | pfleura2 | !WRITE(IOOUT,*) "Baker coordinates are difficult to interpret. Therefore cartesian coordinates" |
| 109 | 1 | pfleura2 | !WRITE(IOOUT,*) "Should be printed" |
| 110 | 1 | pfleura2 | WRITE(*,*) "Baker coordinates are difficult to interpret. Therefore cartesian" |
| 111 | 1 | pfleura2 | WRITE(*,*) "coordinates are printed above." |
| 112 | 1 | pfleura2 | END SELECT |
| 113 | 1 | pfleura2 | |
| 114 | 1 | pfleura2 | END SUBROUTINE PRINTGEOM |