Statistics
| Revision:

root / src / ReadGeom_turbomole.f90 @ 5

History | View | Annotate | Download (1.2 kB)

1
SUBROUTINE ReadGeom_turbomole
2

    
3
  Use Path_module
4
  Use Io_module
5

    
6
  IMPLICIT NONE
7

    
8
  CHARACTER(132) :: Line
9

    
10
  INTEGER(KINT) :: I, J, JStart
11

    
12
  LOGICAL :: Debug
13

    
14
  INTERFACE
15
     function valid(string) result (isValid)
16
       CHARACTER(*), intent(in) :: string
17
       logical                  :: isValid
18
     END function VALID
19
  END INTERFACE
20

    
21
  debug=valid('Read_geom').or.Valid('readgeom_turbomole')
22

    
23
 if (debug) Call Header("Entering ReadGeom_Turbomole")
24

    
25
  if (debug) WRITE(*,*) "NgeomI:",NGeomI
26

    
27
     DO I=1,NGeomI
28
        IF (DEBUG) WRITE(*,*) "Reading Geom :",I
29
        JStart=1
30
! read the $coord line, or $user-defined, or $end
31
        Line='$ok'
32
        DO WHILE (Line(1:1).EQ."$")
33
           READ(IOIN,'(A)') Line 
34
           Line=AdjustL(Line)
35
        END DO
36
        J=1
37
        READ(Line,*) XyzGeomI(I,1:3,J),AtName(J)
38
        DO J=2,NAt
39
           READ(IOIN,*) XyzGeomI(I,1:3,J),AtName(J)
40
        END DO
41
        XyzGeomI(I,:,:)= XyzGeomI(I,:,:)*a0
42
        If (Debug) THEN
43
           WRITE(*,*) "Geom ",I
44
           DO J=1,NAt
45
              WRITE(*,'(1X,A2,3(1X,F15.6))') AtName(J),XyzGeomI(I,1:3,J)
46
           END DO
47
        END IF
48
     END DO
49

    
50
 if (debug) Call Header("Exiting ReadGeom_turbomole")
51

    
52
END SUBROUTINE ReadGeom_turbomole