36 use,
intrinsic :: iso_c_binding
68 type,
bind(c) :: kim_compute_argument_name_type
75 integer(c_int) compute_argument_name_id
85 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles") &
95 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes") &
105 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_particleContributing") &
115 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_coordinates") &
125 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_partialEnergy") &
135 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_partialForces") &
145 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy") &
155 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_partialVirial") &
165 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial") &
174 module procedure kim_compute_argument_name_known
182 interface operator(.eq.)
183 module procedure kim_compute_argument_name_equal
184 end interface operator(.eq.)
192 interface operator(.ne.)
193 module procedure kim_compute_argument_name_not_equal
194 end interface operator(.ne.)
204 module procedure kim_compute_argument_name_from_string
213 module procedure kim_compute_argument_name_to_string
222 logical recursive function kim_compute_argument_name_known( &
223 compute_argument_name)
226 integer(c_int) recursive function known(compute_argument_name) &
227 bind(c, name="KIM_ComputeArgumentName_Known")
228 use,
intrinsic :: iso_c_binding
231 type(kim_compute_argument_name_type),
intent(in),
value :: &
232 compute_argument_name
235 type(kim_compute_argument_name_type),
intent(in) :: compute_argument_name
237 kim_compute_argument_name_known = (known(compute_argument_name) /= 0)
238 end function kim_compute_argument_name_known
245 logical recursive function kim_compute_argument_name_equal(lhs, rhs)
247 type(kim_compute_argument_name_type),
intent(in) :: lhs
248 type(kim_compute_argument_name_type),
intent(in) :: rhs
250 kim_compute_argument_name_equal &
251 = (lhs%compute_argument_name_id == rhs%compute_argument_name_id)
252 end function kim_compute_argument_name_equal
260 logical recursive function kim_compute_argument_name_not_equal(lhs, rhs)
262 type(kim_compute_argument_name_type),
intent(in) :: lhs
263 type(kim_compute_argument_name_type),
intent(in) :: rhs
265 kim_compute_argument_name_not_equal = .not. (lhs == rhs)
266 end function kim_compute_argument_name_not_equal
275 recursive subroutine kim_compute_argument_name_from_string( &
276 string, compute_argument_name)
279 type(kim_compute_argument_name_type)
recursive function from_string( &
280 string)
bind(c, name="KIM_ComputeArgumentName_FromString")
281 use,
intrinsic :: iso_c_binding
284 character(c_char),
intent(in) :: string(*)
285 end function from_string
287 character(len=*, kind=c_char),
intent(in) :: string
288 type(kim_compute_argument_name_type),
intent(out) :: compute_argument_name
290 compute_argument_name = from_string(trim(string)//c_null_char)
291 end subroutine kim_compute_argument_name_from_string
298 recursive subroutine kim_compute_argument_name_to_string( &
299 compute_argument_name, string)
300 use kim_convert_string_module,
only: kim_convert_c_char_ptr_to_string
303 type(c_ptr)
recursive function get_string(compute_argument_name) &
304 bind(c, name="KIM_ComputeArgumentName_ToString")
305 use,
intrinsic :: iso_c_binding
308 type(kim_compute_argument_name_type),
intent(in),
value :: &
309 compute_argument_name
312 type(kim_compute_argument_name_type),
intent(in) :: &
313 compute_argument_name
314 character(len=*, kind=c_char),
intent(out) :: string
319 call kim_convert_c_char_ptr_to_string(p, string)
320 end subroutine kim_compute_argument_name_to_string
330 number_of_compute_argument_names)
333 recursive subroutine get_number_of_compute_argument_names( &
334 number_of_compute_argument_names) &
336 name=
"KIM_COMPUTE_ARGUMENT_NAME_GetNumberOfComputeArgumentNames")
337 use,
intrinsic :: iso_c_binding
338 integer(c_int),
intent(out) :: number_of_compute_argument_names
339 end subroutine get_number_of_compute_argument_names
341 integer(c_int),
intent(out) :: number_of_compute_argument_names
343 call get_number_of_compute_argument_names(number_of_compute_argument_names)
354 index, compute_argument_name, ierr)
357 integer(c_int) recursive function get_compute_argument_name( &
358 index, compute_argument_name) &
359 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentName")
360 use,
intrinsic :: iso_c_binding
363 integer(c_int),
intent(in),
value :: index
365 compute_argument_name
366 end function get_compute_argument_name
368 integer(c_int),
intent(in) :: index
370 integer(c_int),
intent(out) :: ierr
372 ierr = get_compute_argument_name(index - 1, compute_argument_name)
383 compute_argument_name, &
388 integer(c_int) recursive function get_compute_argument_data_type( &
389 compute_argument_name, data_type) &
390 bind(c, name="KIM_COMPUTE_ARGUMENT_NAME_GetComputeArgumentDataType")
391 use,
intrinsic :: iso_c_binding
395 type(kim_compute_argument_name_type),
intent(in),
value :: &
396 compute_argument_name
397 type(kim_data_type_type),
intent(out) :: data_type
400 type(kim_compute_argument_name_type),
intent(in) :: &
401 compute_argument_name
402 type(kim_data_type_type),
intent(out) :: data_type
403 integer(c_int),
intent(out) :: ierr
ComputeArgumentName(std::string const &)
Determines if the object is a quantity known to the KIM API.
Converts the object to a string.
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
recursive subroutine, public kim_get_compute_argument_name(index, compute_argument_name, ierr)
GetComputeArgumentName
recursive subroutine, public kim_get_compute_argument_data_type(compute_argument_name, data_type, ierr)
GetComputeArgumentDataType
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_partialForces"), public, protected kim_compute_argument_name_partial_forces
The standard partialForces argument.
recursive subroutine, public kim_get_number_of_compute_argument_names(number_of_compute_argument_names)
GetNumberOfComputeArgumentNames
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_particleContributing"), public, protected kim_compute_argument_name_particle_contributing
The standard particleContributing argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_partialVirial"), public, protected kim_compute_argument_name_partial_virial
The standard partialVirial argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_coordinates"), public, protected kim_compute_argument_name_coordinates
The standard coordinates argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_partialParticleVirial"), public, protected kim_compute_argument_name_partial_particle_virial
The standard partialParticleVirial argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_partialParticleEnergy"), public, protected kim_compute_argument_name_partial_particle_energy
The standard partialParticleEnergy argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_numberOfParticles"), public, protected kim_compute_argument_name_number_of_particles
The standard numberOfParticles argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_particleSpeciesCodes"), public, protected kim_compute_argument_name_particle_species_codes
The standard particleSpeciesCodes argument.
type(kim_compute_argument_name_type), save, bind(C, name="KIM_COMPUTE_ARGUMENT_NAME_partialEnergy"), public, protected kim_compute_argument_name_partial_energy
The standard partialEnergy argument.
An Extensible Enumeration for the DataType's supported by the KIM API.
An Extensible Enumeration for the ComputeArgumentName's supported by the KIM API.
An Extensible Enumeration for the DataType's supported by the KIM API.