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) 2012, Regents of the University of Minnesota. All rights reserved. 23# 24# Contributors: 25# Ryan S. Elliott 26# Ellad B. Tadmor 27# Valeriu Smirichinski 28# 29 30# 31# Release: This file is part of the openkim-api-v1.1.1 package. 32# 33 34 35This file contains a table of information about the example Models included with 36this release of the openkim-api package. 37 38*** List of the example Models *** 39 40Model name Language NBC Loca/Iter Half/Full Published 41 parameters 42---------------------------------------------------------------------------------------------- 43 44ex_model_Al_PF_ErcolessiAdams F90 NEIGH_PURE_H Iterator Full NO 45 NEIGH_PURE_F Locator Half 46 NEIGH_RVEC_F 47 MI_OPBC_H 48 MI_OPBC_F 49 CLUSTER 50 51ex_model_ArNe_P_MLJ_NEIGH_RVEC_F F90 NEIGH_RVEC_F Locator Full YES 52 53ex_model_Ar_P_LJ F90 NEIGH_PURE_H Iterator Full YES 54 - based on model_driver_P_LJ NEIGH_PURE_F Locator Half 55 NEIGH_RVEC_F 56 MI_OPBC_H 57 MI_OPBC_F 58 CLUSTER 59 60ex_model_Ar_P_MLJ_C C NEIGH_PURE_H Iterator Full NO 61 NEIGH_PURE_F Locator Half 62 NEIGH_RVEC_F 63 MI_OPBC_H 64 MI_OPBC_F 65 CLUSTER 66 67ex_model_Ar_P_MLJ_CLUSTER_C C CLUSTER N/A N/A YES 68 69ex_model_Ar_P_MLJ_CLUSTER_F90 F90 CLUSTER N/A N/A YES 70 71ex_model_Ar_P_MLJ_F90 F90 NEIGH_PURE_H Iterator Full NO 72 NEIGH_PURE_F Locator Half 73 NEIGH_RVEC_F 74 MI_OPBC_H 75 MI_OPBC_F 76 CLUSTER 77 78ex_model_Ar_P_MLJ_MI_OPBC_H_F F90 MI_OPBC_H Locator Half YES 79 MI_OPBC_F Full 80 81ex_model_Ar_P_MLJ_NEIGH_PURE_H_F F90 NEIGH_PURE_H Locator Half YES 82 NEIGH_PURE_F Full 83 84ex_model_Ar_P_MLJ_NEIGH_RVEC_F F90 NEIGH_RVEC-F Locator Full YES 85 86ex_model_Ar_P_Morse C NEIGH_PURE_H Iterator Full YES 87 - based on model_driver_P_Morse NEIGH_PURE_F Locator Half 88 NEIGH_RVEC_F 89 MI_OPBC_H 90 MI_OPBC_F 91 CLUSTER 92 93ex_model_Ne_P_fastLJ C NEIGH_PURE_H Iterator Full YES 94 NEIGH_PURE_F Half 95 NEIGH_RVEC_F 96 MI_OPBC_H 97 MI_OPBC_F 98 CLUSTER 99 100ex_model_Ne_P_LJ F90 NEIGH_PURE_H Iterator Full YES 101 - based on model_driver_P_LJ NEIGH_PURE_F Locator Half 102 NEIGH_RVEC_F 103 MI_OPBC_H 104 MI_OPBC_F 105 CLUSTER 106 107ex_model_Ne_P_LJ_NEIGH_PURE_H F77 NEIGH_PURE_H Iterator Half NO 108 109ex_model_Ne_P_MLJ_NEIGH_RVEC_F C NEIGH_RVEC_F Iterator Full YES 110 111ex_model_Ne_P_Morse C NEIGH_PURE_H Iterator Full YES 112 - based on model_driver_P_Morse NEIGH_PURE_F Locator Half 113 NEIGH_RVEC_F 114 MI_OPBC_H 115 MI_OPBC_F 116 CLUSTER 117--------------------------------------------------------------------------------------------- 118 119*** Description of the example Models *** 120 121A description of the provided example Models is given below. The Models are, 122roughly, listed in order of increasing complexity. It is suggested that 123examining the example Models in this order will provide a gradual introduction 124to the various components of a KIM-compliant Model. (See the README file in the 125DOCs directory for guidelines on how to study the Models distributed with this 126package.) 127 128ex_model_Ar_P_MLJ_CLUSTER_C (C) 129ex_model_Ar_P_MLJ_CLUSTER_F90 (Fortran 90) 130 These Models implement the CLUSTER neighbor list and boundary condition 131 (NBC) method, which is the simplest computation to understand. For this 132 reason, looking at the compute() or Compute_Energy_Forces() subroutines, 133 respectively, for this Model is a good place to get started when first 134 trying to understand how a KIM compliant Model works. Note that these 135 Models publish their parameters. This means that they must also provide 136 reinitialization and destroy routines in addition to the required 137 initialization routine. Examples of Models that do not publish parameters 138 (which makes the initialization routine simpler) are described below. 139 140ex_model_Ne_P_LJ_NEIGH_PURE_H (FORTRAN 77) 141 This Model implements the NEIGH_PURE_H NBC method, which is slightly more 142 complicated than the CLUSTER method. The Model uses only Iterator mode 143 for neighbor list access, which makes this Model a good place to study the 144 details of the NEIGH_PURE_H method and Iterator mode. This Model does not 145 publish its parameters, which makes it easy to focus on the details of the 146 calculate subroutine. 147 148ex_model_Ar_P_MLJ_NEIGH_PURE_H_F (Fortran 90) 149 This Model implements both the NEIGH_PURE_H and NEIGH_PURE_F NBC methods, 150 and supports both Iterator mode and Locator mode. Thus, this Model makes 151 it easy to identify the differences required for a computation when one 152 uses half or full neighbor lists, as well as, Iterator or Locator neighbor 153 list access modes. 154 155ex_model_Ar_P_MLJ_NEIGH_RVEC_F (Fortran 90) 156ex_model_Ne_P_MLJ_NEIGH_RVEC_F (C) 157 These two Models (the first written in F90, the second written in C) 158 provide parallel examples of an implementation of the NEIGH_RVEC_F NBC 159 method. This NBC method includes relative position vectors (Rij's) as 160 well as the usual neighbor list of atom Id's. 161 162ex_model_Ar_P_MLJ_MI_OPBC_H_F (Fortran 90) 163 This Model implements the MI_OPBC_H and MI_OPBC_F NBC methods. This is, 164 arguably, the most complex method and requires that both the Test and 165 Model apply the "minimum image" convention (using the `boxSideLengths' 166 argument) to determine an atom's neighbors and the corresponding relative 167 position vectors. 168 169ex_model_ArNe_P_MLJ_NEIGH_RVEC_F (Fortran 90) 170 This Model is the same as ex_model_Ar_P_MLJ_NEIGH_RVEC_F except that it 171 supports interactions between argon and neon atoms. Thus, it is useful to 172 compare these two Models in order to see what changes are required for a 173 KIM Model to support multiple species interactions. 174 175ex_model_Ar_P_MLJ_C (C) 176 This Model is based on the template file 177 $KIM_DIR/DOCs/TEMPLATEs/model_El_P_Template.c. Thus, it is useful to 178 compare the file ex_model_Ar_P_MLJ_C.c with 179 $KIM_DIR/DOCs/TEMPLATEs/model_El_P_Template.c to see the relatively few 180 changes required to implement the modified Lennard-Jones model. The 181 template implements all NBCs and Iterator and Locator modes in a way that 182 results in a very compact compute() function. 183 184ex_model_Ar_P_MLJ_F90 (Fortran 90) 185 This Model is based on the template file 186 $KIM_DIR/DOCs/TEMPLATEs/model_El_P_Template.F90. Thus, it is useful to 187 compare the file ex_model_Ar_P_MLJ_F90.F90 with 188 $KIM_DIR/DOCs/TEMPLATEs/model_El_P_Template.F90 to see the relatively few 189 changes required to implement the modified Lennard-Jones model. The 190 template implements all NBCs and Iterator and Locator modes in a way that 191 results in a very compact Compute_Energy_Forces() subroutine. 192 193ex_model_Al_PF_ErcolessiAdams (Fortran 90) 194 This Model is based on the template file 195 $KIM_DIR/DOCs/TEMPLATEs/model_El_PF_Template.F90. Thus, it is useful to 196 compare the file ex_model_Al_PF_ErcolessiAdams.F90 with 197 $KIM_DIRDOCs/TEMPLATEs/model_El_PF_Template.F90 to see the relatively 198 simple changes required to implement a pair functional Model. 199 200ex_model_Ar_P_LJ (F90) 201ex_model_Ne_P_LJ (F90) 202 These Models are based on the KIM Model Driver model_driver_P_LJ. They 203 only consist of a simple Makefile and a parameters file. Everything else 204 is handled by the KIM Model Driver. See the directory 205 $KIM_DIR/MODEL_DRIVERs/model_driver_P_LJ/ for more details on how KIM 206 Model Drivers are handled. 207 208ex_model_Ar_P_Morse (C) 209ex_model_Ne_P_Morse (C) 210 These Models are based on the KIM Model Driver model_driver_P_Morse. They 211 only consist of a simple Makefile and a parameters file. Everything else 212 is handled by the KIM Model Driver. See the directory 213 $KIM_DIR/MODEL_DRIVERs/model_driver_P_Morse/ for more details on how KIM 214 Model Drivers are handled. 215 216ex_model_Ne_P_fastLJ (C) 217 This Model implements the shifted Lennard-Jones Model in an attempt to be 218 as efficient as possible. The code can be compared to that of 219 ex_model_Ar_P_MLJ_C.c or ex_model_driver_P_Morse.c. This is a good 220 example of how significant performance gains can be made, but only at the 221 expense of source code readability. 222