27 use,
intrinsic :: iso_c_binding
35 character(len=*, kind=c_char),
intent(in) :: message
37 print *,
"* Error : ", trim(message)
49 use,
intrinsic :: iso_c_binding
60 character(len=2048, kind=c_char) coll_str
61 character(len=2048, kind=c_char) item_type_str
62 character(len=2048, kind=c_char) dir_str
68 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
72 print
'(A,A)', achar(9), trim(dir_str)
79 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
83 print
'(A,A)', achar(9), trim(dir_str)
90 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
94 print
'(A,A)', achar(9), trim(dir_str)
99 use,
intrinsic :: iso_c_binding
109 integer(c_int) extent
110 character(len=2048, kind=c_char) coll_str
111 character(len=2048, kind=c_char) item_type_str
112 character(len=2048, kind=c_char) name_str
118 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
122 print
'(A,A)', achar(9), trim(name_str)
129 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
133 print
'(A,A)', achar(9), trim(name_str)
140 print
'(A,":",A," :")', trim(coll_str), trim(item_type_str)
144 print
'(A,A)', achar(9), trim(name_str)
155 use,
intrinsic :: iso_c_binding
163 integer(c_int) :: ierr
164 integer(c_int) :: extent
169 character(len=2048, kind=c_char) project_name
170 character(len=2048, kind=c_char) sem_ver
171 character(len=2048, kind=c_char) name
172 character(len=2048, kind=c_char) value
173 character(len=2048, kind=c_char) file_name
174 integer(c_long) file_length
175 integer(c_int) available_as_string
176 integer(c_signed_char) file_raw_data(10000)
177 character(len=10000, kind=c_char) file_string
178 character(len=2048, kind=c_char) item_type_str
183 call my_error(
"Unable to create collections object.")
187 print *,
"Project : ", trim(project_name)
188 print *,
"semVer : ", trim(sem_ver)
194 print
'(A," env name : ",A)', trim(item_type_str), trim(name)
200 print
'(A," env name : ",A)', trim(item_type_str), trim(name)
206 print
'(A," env name : ",A)', trim(item_type_str), trim(name)
210 print
'("config file env name : ",A)', trim(name)
211 print
'("config file env value : ",A)', trim(
value)
215 print
'("config file name : ",A)', trim(file_name)
233 print
'(A," :")', trim(item_type_str)
236 print
'(A,A)', achar(9), trim(name)
242 print
'(A," :")', trim(item_type_str)
245 print
'(A,A)', achar(9), trim(name)
251 print
'(A," :")', trim(item_type_str)
254 print
'(A,A)', achar(9), trim(name)
258 col, it, trim(
"Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu"), name, &
261 print
'(A)',
"Error from GetItemLibraryFileNameAndCollection"
264 print
'(A,A,A,A,A,A)', &
265 "Simulator Model Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu ", &
266 "has library name '", trim(name),
"' and is part of the '", &
267 trim(
value),
"' collection."
271 col, it, trim(
"Sim_LAMMPS_LJcut_AkersonElliott_Alchemy_PbAu"), extent, ierr)
273 print
'(A)',
"Error from CacheListOfItemMetadataFiles"
277 available_as_string, ierr)
279 file_raw_data, file_string, ierr)
280 print
'(A,I2,A,A,A,I6)',
"Metadata File ", i,
", ", trim(file_name), &
281 ", is of length", file_length
282 print
'(A)', trim(file_string)
program collections_example_fortran
Converts the object to a string.
Cache a list of directory names where a specific KIM API collection stores library files for a specif...
Cache a list of all item names of a specific type in a specific collection.
Cache a list of all item names of a specific type in the KIM API collections.
Get the name and value of the environment variable that stores the name of the KIM API user configura...
Get the absolute file and path name of the KIM API user configuration file.
Get the name of a directory from the cached list.
Get the names of environment variables that store configuration settings for the KIM::COLLECTION::env...
Get the item's library file name and its KIM::Collection.
Get the name of an item from the cached list.
Get the name of an item from the cached list.
Get the KIM API project name and full Semantic Version string.
recursive subroutine my_error(message)
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_simulatorModel"), public, protected kim_collection_item_type_simulator_model
The standard simulatorModel CollectionItemType.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_modelDriver"), public, protected kim_collection_item_type_model_driver
The standard modelDriver CollectionItemType.
type(kim_collection_item_type_type), save, bind(C, name="KIM_COLLECTION_ITEM_TYPE_portableModel"), public, protected kim_collection_item_type_portable_model
The standard portableModel CollectionItemType.
An Extensible Enumeration for the Collection's supported by the KIM API.
type(kim_collection_type), save, bind(C, name="KIM_COLLECTION_system"), public, protected kim_collection_system
The standard system Collection.
type(kim_collection_type), save, bind(C, name="KIM_COLLECTION_user"), public, protected kim_collection_user
The standard user Collection.
type(kim_collection_type), save, bind(C, name="KIM_COLLECTION_environmentVariable"), public, protected kim_collection_environment_variable
The standard environmentVariable Collection.
type(kim_collection_type), save, bind(C, name="KIM_COLLECTION_currentWorkingDirectory"), public, protected kim_collection_current_working_directory
The standard currentWorkingDirectory Collection.
Provides the interface to the KIM API Collections and is meant to be used by simulators.
recursive subroutine, public kim_collections_destroy(collections_handle)
Destroy a previously Collections::Create'd object.
recursive subroutine, public kim_collections_create(collections_handle, ierr)
Create a new KIM API Collections object.
subroutine dirs_for_collection(collection, col)
subroutine names_for_collection(kc, col)
An Extensible Enumeration for the CollectionItemType's supported by the KIM API.
An Extensible Enumeration for the Collection's supported by the KIM API.
Provides the interface to the KIM API Collections and is meant to be used by simulators.