Unable to set variable value from the python function using fix python/invoke

Dear Dr. Axel Kohlmeyer,

Thank you for taking time to respond to my query. From the suggestions that you had given us on how we should proceed with our MC simulation. We decided to proceed by applying a hybrid approach which will be using both c++ and python to perform the MC simulation. I will take your above thought in cognition for the future steps of my project. As a first approach, I will modify my c++ code which will then depend on fix_move to handle the rotation process and recompute forces/energies and make the corresponding updates in the internal data structures.

Thanking You,
Birva Patel
Student - Nanyang Technological University

Dear Dr. Axel Kohlmeyer,

Thank you for taking time to respond to my query. From the suggestions that
you had given us on how we should proceed with our MC simulation. We decided
to proceed by applying a hybrid approach which will be using both c++ and
python to perform the MC simulation. I will take your above thought in
cognition for the future steps of my project. As a first approach, I will
modify my c++ code which will then depend on fix_move to handle the
rotation process and recompute forces/energies and make the corresponding
updates in the internal data structures.

i don't think that that is a good idea. fix move is meant to be used
to have atoms according to a prescribed recipe without consideration
of forces.
i think it is conceptually much more straightforward to build a
mechanism, where you update coordinates from your external code and
use LAMMPS only as engine to compute the energy.
from what you are writing it looks to me like you are trying to hard
to make LAMMPS do as much work as possible, while neglecting that this
often requires more effort than simply using LAMMPS as an engine to
evaluate the potential energy.

axel.