~nickpapior/siesta/mixing

« back to all changes in this revision

Viewing changes to Src/FoX/wcml/m_wcml_metadata.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
 
module m_wcml_metadata
2
 
 
3
 
  use FoX_wxml, only: xmlf_t
4
 
#ifndef DUMMYLIB
5
 
  use FoX_wxml, only: xml_NewElement, xml_EndElement
6
 
  use FoX_wxml, only: xml_AddAttribute
7
 
#endif
8
 
 
9
 
  implicit none
10
 
  private
11
 
 
12
 
  public :: cmlAddMetadata
13
 
 
14
 
contains
15
 
 
16
 
   subroutine cmlAddMetadata(xf, name, content, convention, dictRef, id, title )
17
 
    type(xmlf_t), intent(inout) :: xf
18
 
    character(len=*), intent(in) :: name
19
 
    character(len=*), intent(in) :: content
20
 
    character(len=*), intent(in), optional :: convention
21
 
    character(len=*), intent(in), optional :: dictRef
22
 
    character(len=*), intent(in), optional :: id
23
 
    character(len=*), intent(in), optional :: title
24
 
 
25
 
#ifndef DUMMYLIB
26
 
    call xml_NewElement(xf, "metadata")
27
 
    call xml_AddAttribute(xf, "name", name)
28
 
    call xml_AddAttribute(xf, name="content", value=content  )
29
 
    if (present(dictref)) call xml_AddAttribute(xf, "dictRef", dictref)
30
 
    if (present(id)) call xml_AddAttribute(xf, "id", title)
31
 
    if (present(title)) call xml_AddAttribute(xf, "title", title)
32
 
    if (present(convention)) call xml_AddAttribute(xf, "convention", convention)
33
 
    call xml_EndElement(xf, "metadata")
34
 
#endif
35
 
 
36
 
   end subroutine cmlAddMetadata
37
 
 
38
 
end module m_wcml_metadata