2
! This file is AUTOGENERATED
3
! To update, edit m_wcml_geometry.m4 and regenerate
7
use fox_m_fsys_realtypes, only: sp, dp
8
use FoX_wxml, only: xmlf_t
10
use FoX_wxml, only: xml_NewElement, xml_EndElement
11
use FoX_wxml, only: xml_AddAttribute, xml_AddCharacters
13
! Fix for pgi, requires this explicitly:
20
interface cmlAddLength
21
module procedure cmlAddLength_SP, cmlAddLength_DP
25
module procedure cmlAddAngle_SP, cmlAddAngle_DP
28
interface cmlAddTorsion
29
module procedure cmlAddTorsion_SP, cmlAddTorsion_DP
32
public :: cmlAddLength
34
public :: cmlAddTorsion
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
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")
54
end subroutine cmlAddLength_sp
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
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")
73
end subroutine cmlAddAngle_sp
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
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")
94
end subroutine cmlAddTorsion_sp
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
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")
113
end subroutine cmlAddLength_dp
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
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")
132
end subroutine cmlAddAngle_dp
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
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")
153
end subroutine cmlAddTorsion_dp
156
end module m_wcml_geometry