KIM API V2
kim_argument_name_module.f90
Go to the documentation of this file.
1 !
2 ! CDDL HEADER START
3 !
4 ! The contents of this file are subject to the terms of the Common Development
5 ! and Distribution License Version 1.0 (the "License").
6 !
7 ! You can obtain a copy of the license at
8 ! http://www.opensource.org/licenses/CDDL-1.0. See the License for the
9 ! specific language governing permissions and limitations under the License.
10 !
11 ! When distributing Covered Code, include this CDDL HEADER in each file and
12 ! include the License file in a prominent location with the name LICENSE.CDDL.
13 ! If applicable, add the following below this CDDL HEADER, with the fields
14 ! enclosed by brackets "[]" replaced with your own identifying information:
15 !
16 ! Portions Copyright (c) [yyyy] [name of copyright owner]. All rights reserved.
17 !
18 ! CDDL HEADER END
19 !
20 
21 !
22 ! Copyright (c) 2016--2018, Regents of the University of Minnesota.
23 ! All rights reserved.
24 !
25 ! Contributors:
26 ! Ryan S. Elliott
27 !
28 
29 !
30 ! Release: This file is part of the kim-api-v2.0.0-alpha.0 package.
31 !
32 
33 
35  use, intrinsic :: iso_c_binding
36  implicit none
37  private
38 
39  public &
40  kim_argument_name_type, &
41  kim_argument_name_from_string, &
42  operator (.eq.), &
43  operator (.ne.), &
44  kim_argument_name_string, &
45 
55 
56  kim_argument_name_get_number_of_arguments, &
57  kim_argument_name_get_argument_name, &
58  kim_argument_name_get_argument_data_type
59 
60  type, bind(c) :: kim_argument_name_type
61  integer(c_int) argument_name_id
62  end type kim_argument_name_type
63 
64  type(kim_argument_name_type), protected, &
65  bind(c, name="KIM_ARGUMENT_NAME_numberOfParticles") &
67  type(kim_argument_name_type), protected, &
68  bind(c, name="KIM_ARGUMENT_NAME_particleSpeciesCodes") &
70  type(kim_argument_name_type), protected, &
71  bind(c, name="KIM_ARGUMENT_NAME_particleContributing") &
73  type(kim_argument_name_type), protected, &
74  bind(c, name="KIM_ARGUMENT_NAME_coordinates") &
76  type(kim_argument_name_type), protected, &
77  bind(c, name="KIM_ARGUMENT_NAME_partialEnergy") &
79  type(kim_argument_name_type), protected, &
80  bind(c, name="KIM_ARGUMENT_NAME_partialForces") &
82  type(kim_argument_name_type), protected, &
83  bind(c, name="KIM_ARGUMENT_NAME_partialParticleEnergy") &
85  type(kim_argument_name_type), protected, &
86  bind(c, name="KIM_ARGUMENT_NAME_partialVirial") &
88  type(kim_argument_name_type), protected, &
89  bind(c, name="KIM_ARGUMENT_NAME_partialParticleVirial") &
91 
92  interface operator (.eq.)
93  logical function kim_argument_name_equal(left, right)
94  use, intrinsic :: iso_c_binding
95  import kim_argument_name_type
96  implicit none
97  type(kim_argument_name_type), intent(in) :: left
98  type(kim_argument_name_type), intent(in) :: right
99  end function kim_argument_name_equal
100  end interface operator (.eq.)
101 
102  interface operator (.ne.)
103  logical function kim_argument_name_not_equal(left, right)
104  use, intrinsic :: iso_c_binding
105  import kim_argument_name_type
106  implicit none
107  type(kim_argument_name_type), intent(in) :: left
108  type(kim_argument_name_type), intent(in) :: right
109  end function kim_argument_name_not_equal
110  end interface operator (.ne.)
111 
112  interface
113  subroutine kim_argument_name_from_string(string, argument_name)
114  import kim_argument_name_type
115  implicit none
116  character(len=*), intent(in) :: string
117  type(kim_argument_name_type), intent(out) :: argument_name
118  end subroutine kim_argument_name_from_string
119 
120  subroutine kim_argument_name_string(argument_name, string)
121  import kim_argument_name_type
122  implicit none
123  type(kim_argument_name_type), intent(in), value :: argument_name
124  character(len=*), intent(out) :: string
125  end subroutine kim_argument_name_string
126 
127  subroutine kim_argument_name_get_number_of_arguments( &
128  number_of_arguments)
129  use, intrinsic :: iso_c_binding
130  implicit none
131  integer(c_int), intent(out) :: number_of_arguments
132  end subroutine kim_argument_name_get_number_of_arguments
133 
134  subroutine kim_argument_name_get_argument_name(index, argument_name, &
135  ierr)
136  use, intrinsic :: iso_c_binding
137  import kim_argument_name_type
138  implicit none
139  integer(c_int), intent(in), value :: index
140  type(kim_argument_name_type), intent(out) :: argument_name
141  integer(c_int), intent(out) :: ierr
142  end subroutine kim_argument_name_get_argument_name
143 
144  subroutine kim_argument_name_get_argument_data_type(argument_name, &
145  data_type, ierr)
146  use, intrinsic :: iso_c_binding
147  use kim_data_type_module, only : kim_data_type_type
148  import kim_argument_name_type
149  implicit none
150  type(kim_argument_name_type), intent(in), value :: argument_name
151  type(kim_data_type_type), intent(out) :: data_type
152  integer(c_int), intent(out) :: ierr
153  end subroutine kim_argument_name_get_argument_data_type
154  end interface
155 end module kim_argument_name_module
type(kim_argument_name_type), public, protected kim_argument_name_number_of_particles
type(kim_argument_name_type), public, protected kim_argument_name_partial_forces
type(kim_argument_name_type), public, protected kim_argument_name_particle_contributing
type(kim_argument_name_type), public, protected kim_argument_name_particle_species_codes
type(kim_argument_name_type), public, protected kim_argument_name_partial_particle_energy
type(kim_argument_name_type), public, protected kim_argument_name_partial_virial
type(kim_argument_name_type), public, protected kim_argument_name_partial_energy
type(kim_argument_name_type), public, protected kim_argument_name_coordinates
type(kim_argument_name_type), public, protected kim_argument_name_partial_particle_virial