~nickpapior/siesta/mixing

« back to all changes in this revision

Viewing changes to Src/FoX/wcml/m_wcml_geometry.F90

  • Committer: Alberto Garcia
  • Date: 2016-10-24 13:50:32 UTC
  • mfrom: (560.1.36 4.1)
  • Revision ID: albertog@icmab.es-20161024135032-yf1fynnn1v3j55vo
Merge 4.1 (595, 596)

- Enabled default chemical potentials if they are named equally
- Implement CML calls using an upgraded Src/wxml library
  (Remove FoX)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
!
2
 
! This file is AUTOGENERATED
3
 
! To update, edit m_wcml_geometry.m4 and regenerate
4
 
 
5
 
module m_wcml_geometry
6
 
 
7
 
  use fox_m_fsys_realtypes, only: sp, dp
8
 
  use FoX_wxml, only: xmlf_t
9
 
#ifndef DUMMYLIB
10
 
  use FoX_wxml, only: xml_NewElement, xml_EndElement
11
 
  use FoX_wxml, only: xml_AddAttribute, xml_AddCharacters
12
 
 
13
 
! Fix for pgi, requires this explicitly:
14
 
  use m_wxml_overloads
15
 
#endif
16
 
 
17
 
  implicit none
18
 
  private
19
 
 
20
 
  interface cmlAddLength
21
 
    module procedure cmlAddLength_SP, cmlAddLength_DP
22
 
  end interface
23
 
 
24
 
  interface cmlAddAngle
25
 
    module procedure cmlAddAngle_SP, cmlAddAngle_DP
26
 
  end interface
27
 
 
28
 
  interface cmlAddTorsion
29
 
    module procedure cmlAddTorsion_SP, cmlAddTorsion_DP
30
 
  end interface
31
 
 
32
 
  public :: cmlAddLength
33
 
  public :: cmlAddAngle
34
 
  public :: cmlAddTorsion
35
 
 
36
 
contains
37
 
 
38
 
  subroutine cmlAddLength_sp(xf, id, atomRef1, atomRef2, length, fmt)
39
 
    type(xmlf_t), intent(inout) :: xf
40
 
    character(len=*), intent(in) :: id
41
 
    character(len=*), intent(in) :: atomRef1
42
 
    character(len=*), intent(in) :: atomRef2
43
 
    real(kind=sp), intent(in)    :: length
44
 
    character(len=*), intent(in), optional :: fmt
45
 
 
46
 
#ifndef DUMMYLIB
47
 
    call xml_NewElement(xf, "length")
48
 
    call xml_AddAttribute(xf, "id", id)
49
 
    call xml_AddAttribute(xf, "atomRefs2", atomRef1//" "//atomRef2)
50
 
    call xml_AddCharacters(xf, length, fmt)
51
 
    call xml_EndElement(xf, "length")
52
 
#endif
53
 
 
54
 
  end subroutine cmlAddLength_sp
55
 
 
56
 
  subroutine cmlAddAngle_sp(xf, id, atomRef1, atomRef2, atomRef3, angle, fmt)
57
 
    type(xmlf_t), intent(inout) :: xf
58
 
    character(len=*), intent(in) :: id
59
 
    character(len=*), intent(in) :: atomRef1
60
 
    character(len=*), intent(in) :: atomRef2
61
 
    character(len=*), intent(in) :: atomRef3
62
 
    real(kind=sp), intent(in)     :: angle
63
 
    character(len=*), intent(in), optional :: fmt
64
 
 
65
 
#ifndef DUMMYLIB
66
 
    call xml_NewElement(xf, "angle")
67
 
    call xml_AddAttribute(xf, "id", id)
68
 
    call xml_AddAttribute(xf, "atomRefs3", atomRef1//" "//atomRef2//" "//atomRef3)
69
 
    call xml_AddCharacters(xf, angle, fmt)
70
 
    call xml_EndElement(xf, "angle")
71
 
#endif
72
 
 
73
 
  end subroutine cmlAddAngle_sp
74
 
 
75
 
  subroutine cmlAddTorsion_sp(xf, id, atomRef1, atomRef2, atomRef3, atomRef4, torsion, fmt)
76
 
    type(xmlf_t), intent(inout) :: xf
77
 
    character(len=*), intent(in) :: id
78
 
    character(len=*), intent(in) :: atomRef1
79
 
    character(len=*), intent(in) :: atomRef2
80
 
    character(len=*), intent(in) :: atomRef3        ! ref to third atom
81
 
    character(len=*), intent(in) :: atomRef4
82
 
    real(kind=sp), intent(in)    :: torsion
83
 
    character(len=*), intent(in), optional :: fmt
84
 
 
85
 
#ifndef DUMMYLIB
86
 
    call xml_NewElement(xf, "torsion")
87
 
    call xml_AddAttribute(xf, "id", id)
88
 
    call xml_AddAttribute(xf, "atomRefs4", &
89
 
         atomRef1//" "//atomRef2//" "//atomRef3//" "//atomRef4)
90
 
    call xml_AddCharacters(xf, torsion, fmt)
91
 
    call xml_EndElement(xf, "torsion")
92
 
#endif
93
 
 
94
 
  end subroutine cmlAddTorsion_sp
95
 
 
96
 
 
97
 
  subroutine cmlAddLength_dp(xf, id, atomRef1, atomRef2, length, fmt)
98
 
    type(xmlf_t), intent(inout) :: xf
99
 
    character(len=*), intent(in) :: id
100
 
    character(len=*), intent(in) :: atomRef1
101
 
    character(len=*), intent(in) :: atomRef2
102
 
    real(kind=dp), intent(in)    :: length
103
 
    character(len=*), intent(in), optional :: fmt
104
 
 
105
 
#ifndef DUMMYLIB
106
 
    call xml_NewElement(xf, "length")
107
 
    call xml_AddAttribute(xf, "id", id)
108
 
    call xml_AddAttribute(xf, "atomRefs2", atomRef1//" "//atomRef2)
109
 
    call xml_AddCharacters(xf, length, fmt)
110
 
    call xml_EndElement(xf, "length")
111
 
#endif
112
 
 
113
 
  end subroutine cmlAddLength_dp
114
 
 
115
 
  subroutine cmlAddAngle_dp(xf, id, atomRef1, atomRef2, atomRef3, angle, fmt)
116
 
    type(xmlf_t), intent(inout) :: xf
117
 
    character(len=*), intent(in) :: id
118
 
    character(len=*), intent(in) :: atomRef1
119
 
    character(len=*), intent(in) :: atomRef2
120
 
    character(len=*), intent(in) :: atomRef3
121
 
    real(kind=dp), intent(in)     :: angle
122
 
    character(len=*), intent(in), optional :: fmt
123
 
 
124
 
#ifndef DUMMYLIB
125
 
    call xml_NewElement(xf, "angle")
126
 
    call xml_AddAttribute(xf, "id", id)
127
 
    call xml_AddAttribute(xf, "atomRefs3", atomRef1//" "//atomRef2//" "//atomRef3)
128
 
    call xml_AddCharacters(xf, angle, fmt)
129
 
    call xml_EndElement(xf, "angle")
130
 
#endif
131
 
 
132
 
  end subroutine cmlAddAngle_dp
133
 
 
134
 
  subroutine cmlAddTorsion_dp(xf, id, atomRef1, atomRef2, atomRef3, atomRef4, torsion, fmt)
135
 
    type(xmlf_t), intent(inout) :: xf
136
 
    character(len=*), intent(in) :: id
137
 
    character(len=*), intent(in) :: atomRef1
138
 
    character(len=*), intent(in) :: atomRef2
139
 
    character(len=*), intent(in) :: atomRef3        ! ref to third atom
140
 
    character(len=*), intent(in) :: atomRef4
141
 
    real(kind=dp), intent(in)    :: torsion
142
 
    character(len=*), intent(in), optional :: fmt
143
 
 
144
 
#ifndef DUMMYLIB
145
 
    call xml_NewElement(xf, "torsion")
146
 
    call xml_AddAttribute(xf, "id", id)
147
 
    call xml_AddAttribute(xf, "atomRefs4", &
148
 
         atomRef1//" "//atomRef2//" "//atomRef3//" "//atomRef4)
149
 
    call xml_AddCharacters(xf, torsion, fmt)
150
 
    call xml_EndElement(xf, "torsion")
151
 
#endif
152
 
 
153
 
  end subroutine cmlAddTorsion_dp
154
 
 
155
 
 
156
 
end module m_wcml_geometry