Hello, can I simultaneously use the fix nve/spin command and the fix rigid/nvt command in the simulation with the justification that I have separated the degrees of freedom of the spin and other degrees of freedom of the system?


why not? Could you please explain about it?
I want to check the interaction of the spin with the external magnetic field and the precession motion of the spin around the field direction in the nve/spin command, in other words to check the spin state of the system independently.
At the same time as the rigid/nvt command is applied, the coordinates, velocities and orientations of the atoms in each object are updated. Why is it incorrect? how can I do that?
because If I use nve/spin command alone and don’t have the rigid/nvt command, the molecules will come out of the rigid state.

Fix nve/spin has two modes: frozen lattice and moving lattice
That is, either only the spins are updated with unchanged positions or spins and positions are updated together (including any spin position coupling).

There currently is no SPIN package compatible integrator for that.

Hello @Somayeh and @akohlmey !

My apologies for the late reply, I just saw this message.

The explanations of Axel are fully correct.

In my opinion, the only thing you could do would be to alternate the two fixes. For example, you could run some steps with the fix rigid/nvt, then unfix it, set a fix nve/spin lattice frozen command, and update the spin configuration with the new atom positions by running some steps. And then unfix the nve/spin command and start again.

This is also what you would do in order to equilibrate the pressure of a spin - lattice simulation: run with fix nve/spin lattice moving, then unfix it, set a fix npt and run it (with a frozen spin configuration), unfix it and reset and rerun fix nve/spin lattice moving. This way, you can slowly reach a state where you are running a spin-lattice calculation at a given temperature, and at a given pressure.

This is absolutely not ideal (you will probably see an energy drift if you were to do that in an nve ensemble), but at this stage and to my knowledge, this is the best existing solution. Spin - lattice calculations remain a rather new approach, and the methodology still lacks theoretical developments (like the possibility of running actual npt spin - lattice calculations).

All the best,