Statistiques
| Révision :

root / src / ReadInput.f90

Historique | Voir | Annoter | Télécharger (2,11 ko)

1
 SUBROUTINE ReadInput
2

    
3
! This routine reads an input template for some programs.
4
! this is a 'dispatcher' routine that calls the exact subroutine from a list.
5

    
6
!----------------------------------------------------------------------
7
!  Copyright 2003-2014 Ecole Normale Supérieure de Lyon, 
8
!  Centre National de la Recherche Scientifique,
9
!  Université Claude Bernard Lyon 1. All rights reserved.
10
!
11
!  This work is registered with the Agency for the Protection of Programs 
12
!  as IDDN.FR.001.100009.000.S.P.2014.000.30625
13
!
14
!  Authors: P. Fleurat-Lessard, P. Dayal
15
!  Contact: optnpath@gmail.com
16
!
17
! This file is part of "Opt'n Path".
18
!
19
!  "Opt'n Path" is free software: you can redistribute it and/or modify
20
!  it under the terms of the GNU Affero General Public License as
21
!  published by the Free Software Foundation, either version 3 of the License,
22
!  or (at your option) any later version.
23
!
24
!  "Opt'n Path" is distributed in the hope that it will be useful,
25
!  but WITHOUT ANY WARRANTY; without even the implied warranty of
26
!
27
!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
!  GNU Affero General Public License for more details.
29
!
30
!  You should have received a copy of the GNU Affero General Public License
31
!  along with "Opt'n Path". If not, see <http://www.gnu.org/licenses/>.
32
!
33
! Contact The Office of Technology Licensing, valorisation@ens-lyon.fr,
34
! for commercial licensing opportunities.
35
!----------------------------------------------------------------------
36

    
37

    
38
  use VarTypes
39
  use Path_module, only : Prog
40
  use Io_module
41

    
42
  IMPLICIT NONE
43

    
44

    
45
  INTERFACE
46
     function valid(string) result (isValid)
47
       CHARACTER(*), intent(in) :: string
48
       logical                  :: isValid
49
     END function VALID
50
  END INTERFACE
51

    
52
  LOGICAL :: Debug
53

    
54

    
55
  Debug=Valid("readinput")
56

    
57
 if (debug) Call Header("Entering ReadInput")
58

    
59

    
60

    
61
  Select Case (Prog)
62
    CASE ("GAUSSIAN")
63
       Call ReadInput_gaussian
64
    CASE ('MOPAC')
65
       Call ReadInput_mopac
66
    CASE ("SIESTA")
67
       Call ReadInput_siesta
68
    CASE ("VASP")
69
       Call ReadInput_vasp
70
  END SELECT 
71

    
72
 if (debug) Call Header("Exiting ReadInput")
73

    
74
END SUBROUTINE ReadInput