TABLE OF CONTENTS


ABINIT/flib_pwscf [ Modules ]

[ Top ] [ Modules ]

NAME

  flib_pwscf

FUNCTION

  the following is a partial import of the flib directory of espresso
  provides small routines for other pwscf-imported subroutines

COPYRIGHT

  Copyright (C) 2008-2018 ABINIT group (MVer)
  This file is distributed under the terms of the
  GNU General Public License, see ~abinit/COPYING
  or http://www.gnu.org/copyleft/gpl.txt .

PARENTS

SOURCE

21 #if defined HAVE_CONFIG_H
22 #include "config.h"
23 #endif
24 
25 module flib_pwscf
26 
27   implicit none
28 
29   contains 

flib_pwscf/capital [ Functions ]

[ Top ] [ flib_pwscf ] [ Functions ]

NAME

 capital

FUNCTION

 converts character to capital if lowercase
 copy character to output in all other cases

INPUTS

OUTPUT

PARENTS

CHILDREN

SOURCE

106 !-----------------------------------------------------------------------
107 FUNCTION capital( in_char )
108 !-----------------------------------------------------------------------
109 
110 !This section has been created automatically by the script Abilint (TD).
111 !Do not modify the following lines by hand.
112 #undef ABI_FUNC
113 #define ABI_FUNC 'capital'
114 !End of the abilint section
115 
116   IMPLICIT NONE
117   !
118   CHARACTER(LEN=1), INTENT(IN) :: in_char
119   CHARACTER(LEN=1)             :: capital
120   CHARACTER(LEN=26), PARAMETER :: lower = 'abcdefghijklmnopqrstuvwxyz', &
121                                   upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
122   INTEGER                      :: i
123   !
124   !
125   DO i=1, 26
126      !
127      IF ( in_char == lower(i:i) ) THEN
128         !
129         capital = upper(i:i)
130         !
131         RETURN
132         !
133      END IF
134      !
135   END DO
136   !
137   capital = in_char
138   !
139   RETURN
140   !
141 END FUNCTION capital

flib_pwscf/errore [ Functions ]

[ Top ] [ flib_pwscf ] [ Functions ]

NAME

 errore

FUNCTION

INPUTS

OUTPUT

PARENTS

CHILDREN

SOURCE

218 subroutine errore (routine, error, code)
219 
220   use defs_basis, only: std_out,std_out_default
221 
222 !This section has been created automatically by the script Abilint (TD).
223 !Do not modify the following lines by hand.
224 #undef ABI_FUNC
225 #define ABI_FUNC 'errore'
226 !End of the abilint section
227 
228   implicit none
229 
230   !args
231   character(*), intent(in) :: routine
232   character(*), intent(in) :: error
233   integer, intent(in) :: code
234 
235   if (code == 0) return
236 
237   write(std_out,*) ' in subroutine : ', trim(routine)
238   write(std_out,*) error
239   write(std_out,*) 'error code ', code
240   stop
241 end subroutine errore
242 
243 end module flib_pwscf

flib_pwscf/lowercase [ Functions ]

[ Top ] [ flib_pwscf ] [ Functions ]

NAME

 lowercase

FUNCTION

 converts character to lowercase if capital
 copy character to output in all other cases

INPUTS

OUTPUT

PARENTS

CHILDREN

SOURCE

162 !
163 !-----------------------------------------------------------------------
164 FUNCTION lowercase( in_char )
165 !-----------------------------------------------------------------------
166 
167 !This section has been created automatically by the script Abilint (TD).
168 !Do not modify the following lines by hand.
169 #undef ABI_FUNC
170 #define ABI_FUNC 'lowercase'
171 !End of the abilint section
172 
173   IMPLICIT NONE
174   !
175   CHARACTER(LEN=1), INTENT(IN) :: in_char
176   CHARACTER(LEN=1)             :: lowercase
177   CHARACTER(LEN=26), PARAMETER :: lower = 'abcdefghijklmnopqrstuvwxyz', &
178                                   upper = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
179   INTEGER                      :: i
180   !
181   !
182   DO i=1, 26
183      !
184      IF ( in_char == upper(i:i) ) THEN
185         !
186         lowercase = lower(i:i)
187         !
188         RETURN
189         !
190      END IF
191      !
192   END DO
193   !
194   lowercase = in_char
195   !
196   RETURN
197   !
198 END FUNCTION lowercase

flib_pwscf/matches [ Functions ]

[ Top ] [ flib_pwscf ] [ Functions ]

NAME

 matches

FUNCTION

 .TRUE. if string1 is contained in string2, .FALSE. otherwise

INPUTS

OUTPUT

PARENTS

CHILDREN

SOURCE

49 !-----------------------------------------------------------------------
50 FUNCTION matches( string1, string2 )
51 !-----------------------------------------------------------------------
52 
53 !This section has been created automatically by the script Abilint (TD).
54 !Do not modify the following lines by hand.
55 #undef ABI_FUNC
56 #define ABI_FUNC 'matches'
57 !End of the abilint section
58 
59   IMPLICIT NONE
60   !
61   CHARACTER (LEN=*), INTENT(IN) :: string1, string2
62   LOGICAL                       :: matches
63   INTEGER                       :: len1, len2, l
64   !
65   !
66   len1 = LEN_TRIM( string1 )
67   len2 = LEN_TRIM( string2 )
68   !
69   DO l = 1, ( len2 - len1 + 1 )
70      !   
71      IF ( string1(1:len1) == string2(l:(l+len1-1)) ) THEN
72         !
73         matches = .TRUE.
74         !
75         RETURN
76         !
77      END IF
78      !
79   END DO
80   !
81   matches = .FALSE.
82   ! 
83   RETURN
84   !
85 END FUNCTION matches