Hi again Iain,
Just wanted to leave a note here that the merge request mentioned above has been merged into the master branch of ASE and will be part of the next official release. The docs page for the KIM calculator won’t be updated until then, so I’ll echo the part about changing parameters here:
If one instantiates the calculator for a KIM Portable Model that registers its parameters, they can be accessed or mutated using the get_parameters and set_parameters methods. For example, to print the components of the parameters epsilons and sigmas in the Lennard-Jones universal model corresponding to Mo-Mo (index 4879), Mo-S (index 2006) and S-S (index 1980) interactions, one can do the following:
model = "LJ_ElliottAkerson_2015_Universal__MO_959249795837_003"
calc = KIM(model)
print(calc.get_parameters(epsilons=[4879, 2006, 1980],
sigmas=[4879, 2006, 1980])
This will print a dictionary whose keys are the parameter names and whose values are lists that each contain two sublists. The first contains the set of indices in the parameters arrays that were requested and the second contains the corresponding parameter values:
{'epsilons': [[4879, 2006, 1980],
[4.47499, 4.421814057295943, 4.36927]],
'sigmas': [[4879, 2006, 1980],
[2.74397, 2.30743, 1.87089]]}
Or, suppose we want to set the values of the components of the epsilons parameter of the same model corresponding to Mo-Mo, Mo-S, and S-S to 5.0, 4.5, and 4.0, respectively. In this case, a syntax similar is used:
model = "LJ_ElliottAkerson_2015_Universal__MO_959249795837_003"
calc = KIM(model)
calc.set_parameters(epsilons=[[4879, 2006, 1980],
[5.0, 4.5, 4.0]])
Note: For models with parameter arrays that contain many components, such as the Lennard-Jones universal model above, one must refer to the documentation of the model itself (or its model driver, if it uses one) in order to ascertain the meaning of the different components of the parameter arrays.
Let me know if you have any questions,
Dan