Statistics
| Revision:

root / src / Read_geom.f90 @ 5

History | View | Annotate | Download (1.5 kB)

1
SUBROUTINE Read_Geom(input)
2

    
3
  Use VarTypes
4
  Use Path_module, only : NGeomI
5
  Use Io_module
6

    
7
  IMPLICIT NONE
8

    
9

    
10
  CHARACTER(32), INTENT(IN) :: input    
11
  CHARACTER(132) :: LineTmp,Line
12

    
13
  INTEGER(KINT), ALLOCATABLE :: NbAtType(:) !na
14
  INTEGER(KINT) :: NbType, NbTypeUser
15
  INTEGER(KINT) :: I, J, Iat,NAtP,Idx,JStart
16
  INTEGER(KINT) :: IGeom
17
  REAL(KREAL) :: Xt,Yt,Zt
18
  LOGICAL :: Debug, TChk
19
  CHARACTER(4), ALLOCATABLE :: FFFt(:,:) ! 3,Na
20
  LOGICAL, ALLOCATABLE :: FFFl(:,:) ! 3,Na
21

    
22
!!! for VASP inputs
23
! latx_loc used to check that the lattice parameters are the same for all geometries
24
  REAL(KREAL) :: lata_loc(3), latb_loc(3), latc_loc(3)
25
! VaspPar_loc is the local value of the vasp parametre
26
  REAL(KREAL) :: VaspPar_loc
27
! Vdir_loc is used to convert the read geometry to Cartesian.
28
! V_direct is set by the first geometry.
29
  CHARACTER(LCHARS) :: Vdir_loc
30

    
31

    
32
  INTERFACE
33
     function valid(string) result (isValid)
34
       CHARACTER(*), intent(in) :: string
35
       logical                  :: isValid
36
     END function VALID
37
  END INTERFACE
38

    
39
  debug=valid('Read_geom')
40
 if (debug) Call Header("Entering Read_Geom")
41
  if (debug) WRITE(*,*) "Input:",Trim(Input)
42
  if (debug) WRITE(*,*) "NgeomI:",NGeomI
43

    
44
  SELECT CASE(Input)
45
  CASE ('XYZ','CART')
46
     Call ReadGeom_cart
47
  CASE ('TURBOMOLE')
48
     Call ReadGeom_turbomole
49
  CASE ('VASP')
50
     Call ReadGeom_vasp
51
  CASE ('SIESTA')
52
     Call ReadGeom_siesta
53
  CASE Default
54
     WRITe(*,*) 'Input=',trim(Input),' UNKNOWN. Stop'
55
     STOP
56

    
57
  END SELECT
58

    
59

    
60
 if (debug) Call Header("Exiting Read_Geom")
61

    
62
END SUBROUTINE Read_Geom