Question about the setting and effect of the NX parameter in fix atom/swap

Dear LAMMPS developers and users,

I am currently using the fix atom/swap command in LAMMPS for Monte Carlo atom exchange simulations, and I would like to better understand the role of the NX parameter.

According to the documentation, the syntax of fix atom/swap includes the parameter:

fix ID group-ID atom/swap N X seed T ...

where N is the number of MD timesteps between Monte Carlo swap attempts, and X (NX) is the number of swap attempts performed during each MC step.

I would like to ask for clarification on the following questions:

  1. How should the value of NX be determined in practice?
    Is there a recommended relationship between NX and the total number of atoms, concentration of the swapped species, or system size?

  2. What is the physical effect of changing NX?
    For example, if NX is increased while keeping other parameters unchanged:

    • Does it only increase the number of attempted swaps per MC cycle and therefore accelerate sampling?

    • Could a very large NX introduce any bias or affect the equilibrium state obtained from the simulation?

  3. Is there a commonly used criterion to judge whether NX is sufficiently large for MC/MD simulations?
    For example, should NX be related to the number of atoms of the minority species or a certain fraction of the total number of atoms?

  4. In a system with approximately N atoms, if the goal is to achieve good chemical equilibration through atom swaps, would setting:

NX = N

(or a similar order of magnitude) be considered reasonable?

I would appreciate any guidance or practical experience regarding the selection of NX in fix atom/swap simulations.

Thank you very much for your time and help.

Best regards.

You should pick up a text book on Monte Carlo simulations and learn about the various parameters that influence the performance and accuracy there. There is nothing in your questions that is specific to LAMMPS.

Dear Axel,

Thank you very much for your reply and guidance.

I understand that the choice of NX is related to general Monte Carlo sampling rather than being a LAMMPS-specific issue. I will further study the relevant Monte Carlo methods and consider NX from the perspective of sampling efficiency and accuracy.

Thank you again for your help.

Best regards