Monte Carlo atom/swap with Changing Temperature

Hello! I’m studying a quenching process. The npt simulation is set up with Tstart and Tstop to define the quenching rate. However, when trying to incorporate Monte Carlo (MC) swaps of atoms during the simulation, I found that the fix atom/swap command only allow a single argument of fixed temperature.

I’m wondering how to properly set up this hybrid MC/MD quenching simulation with changing temperature:
(1). Can I set up the MC swap of atoms with the “temp” keyword instead of certain value of a temperature? I’m not sure if this will still simply fix the temperature for MC to be equal to the temperature at the step when fix atom/swap is defined.
(2). What about using a loop to iteratively define the MC swap of atoms? For example, it seems possible to define a loop with 1000 iterations, and in each iteration, the MC swap is fixed at Tstart -1, so that after 1000 iterations, the MC swap is at Tstop = Tstart -1000.

Thanks in advance for any help!

You cannot invent a new keyword that doesn’t exist. If you want fix atom/swap to use a temperature ramp in the same way as fix nvt does, you need to change the C++ source code accordingly and recompile. In that case the cleaner way would be allow fix atom/swap to use an equal style variable as alternative to a number in the same way also fix nvt allows it and then define the temperature ramp in the variable and have it guaranteed that the exact some target temperature is applied in both cases.

Yes. Instead of a continuous temperature ramp you can also break the entire quench down into multiple fragments and then use a different, fixed(!) target temperature for each fragment (which may be entered with a ${temp} immediate variable expansion instead of the v_temp like variable reference that would be needed in case (1)).