If one carries out a molecular simulation of N particles using periodic boundary conditions, linear momentum is conserved and hence the number of degrees of freedom is set to 3N-3. In most programs, this number of degrees of freedom is the default setting. However, if one carries out a molecular simulation in an external field, one needs to ensure that degrees of freedom are changed from this default setting to 3N, as in an external field the velocity of the center of mass can change. Using the correct degrees of freedom is important in calculating the temperature and in some algorithms to simulate at constant temperature. For sufficiently large systems, the difference between 3N and 3N-3 is negligible in the way. However, there are systems in which the comparison with experimental data requires molecular dynamics simulations of a small number of particles. In this work, we illustrate the effect of an incorrect setting of degrees of freedom in molecular dynamic simulations studying the diffusion properties of guest molecules in nanoporous materials. We show that previously published results have reported a surprising diffusion dependence on the loading, which could be traced back to an incorrect setting of the degrees of freedom. As the correct settings are convoluted and counter-intuitive in some of the most commonly used molecular dynamics programs, we carried out a systematic study on the consequences of the various commonly used (incorrect) settings. Our conclusion, is that for systems smaller than 50 particles the results are most likely unreliable as these are either performed at an incorrect temperature or the temperature is incorrectly used in some of the results. Furthermore, a novel and efficient method to calculate diffusion coefficients of guest molecules into nanoporous materials at zero loading conditions is introduced.
The supplementary material of the manuscript “On the effect of the degrees of freedom on calculating diffusion properties in nanoporous materials”
This is the supplementary material of the manuscript “On the effect of the degrees of freedom on calculating diffusion properties in nanoporous materials”. The main paper discusses the misleading effects that an incorrect setting of the degrees of freedom has on the diffusion coefficients calculated by means of Molecular Dynamics (MD) simulations. In particular, we have presented diffusion studies on nanoporous materials, however those effects are not limited to our particular case studies, but concern all the MD simulations of a limited number of particles under external forces. This document is organized as follows. In the first session, the theory and mathematical formalism used in the main paper are presented. In the second section, LAMMPS commands of different DoF settings are presented. In the last section, figures supporting the arguments in the main paper are presented.