In molecular dynamics simulations under periodic boundary conditions, particle positions are typically wrapped into a reference box. For diffusion coefficient calculations using the Einstein relation, the particle positions need to be unwrapped. Here, we show that a widely used heuristic unwrapping scheme is not suitable for long simulations at constant pressure. Improper accounting for box-volume fluctuations creates, at long times, unphysical trajectories and, in turn, grossly exaggerated diffusion coefficients. We propose an alternative unwrapping scheme that resolves this issue. At each time step, we add the minimal displacement vector according to periodic boundary conditions for the instantaneous box geometry. Here and in a companion paper [J. Chem. Phys. XXX, YYYYY (2020)], we apply the new unwrapping scheme to extensive molecular dynamics and Brownian dynamics simulation data. We provide practitioners with a formula to assess if and by how much earlier results might have been affected by the widely used heuristic unwrapping scheme.
High-pressure melting and elastic behavior of vanadium and niobium based on ab initio and machine learning molecular dynamics
National Key Laboratory of Shock Wave and Detonation Physics, Institute of Fluid Physics, CAEP(冲击波物理与爆轰力学国家重点实验室,中国工程物理研究院流体物理研究所);HEDPS, Center for Applied Physics and Technology, and College of Engineering, Peking University(高能量密度物理教育部/科技部重点实验室,北京大学应用物理与技术研究中心,工学院);Institute of Atomic and Molecular Physics, College of Physics, Sichuan University(四川大学物理学院原子分子物理研究所)