Make sure that atoms.calc = model.calculator is done after model.fix_cell_dependence(), otherwise the redefinition of the model.calculator symbol that this function does is ignored.
This was already OK for existing invocations of relax_config(), because fix_cell_dependence() was explicitly called before calling relax_config(), and relax_config does its own atoms.calc = model.calculator. It was definitely not being done correctly before calling the matscipy.elasticity routines, and probably would have also been wrong if fix_cell_dependence=True had been passed to relax_config (a possibility which is apparently not actually used anywhere).
Make sure that
atoms.calc = model.calculator
is done aftermodel.fix_cell_dependence()
, otherwise the redefinition of themodel.calculator
symbol that this function does is ignored.This was already OK for existing invocations of
relax_config()
, becausefix_cell_dependence()
was explicitly called before callingrelax_config()
, and relax_config does its ownatoms.calc = model.calculator
. It was definitely not being done correctly before calling thematscipy.elasticity
routines, and probably would have also been wrong iffix_cell_dependence=True
had been passed torelax_config
(a possibility which is apparently not actually used anywhere).