ms2: A molecular simulation tool for thermodynamic properties, new version release
A new version release (2.0) of the molecular simulation tool ms2 [S. Deublein et al., Comput. Phys. Commun. 182 (2011) 2350] is presented. Version 2.0 of ms2 features a hybrid parallelization based on MPI and OpenMP for molecular dynamics simulation to achieve higher scalability. Furthermore, the formalism by Lustig [R. Lustig, Mol. Phys. 110 (2012) 3041] is implemented, allowing for a systematic sampling of Massieu potential derivatives in a single simulation run. Moreover, the Green-Kubo formalism is extended for the sampling of the electric conductivity and the residence time. To remove the restriction of the preceding version to electro-neutral molecules, Ewald summation is implemented to consider ionic long range interactions. Finally, the sampling of the radial distribution function is added.
💡 Research Summary
The paper presents version 2.0 of the molecular simulation package ms2, originally introduced in 2011 for the calculation of thermodynamic properties of homogeneous fluids. The new release focuses on extending the code’s scalability, functionality, and applicability to charged systems.
Hybrid MPI/OpenMP parallelization – The authors identify that domain decomposition is ineffective for the typical system sizes (≈10³ – 10⁴ molecules) used with ms2 because the cutoff radius is comparable to half the simulation box. To overcome the MPI bottleneck, they add an OpenMP layer that parallelizes three computationally intensive loops: partner search, energy evaluation, and force calculation. Race conditions in force accumulation are avoided by storing interaction‑wise forces in a temporary list and summing them after the parallel region, rather than using atomic updates or critical sections. Benchmarks on a Cray XE6 system (2 048 cores) show a 20 % speed‑up when using 2–4 OpenMP threads per MPI rank, and a detailed comparison with GROMACS demonstrates competitive performance, especially when the Ewald summation is employed.
Massieu potential derivatives (Lustig formalism) – Building on R. Lustig’s work, ms2 2.0 can sample derivatives of the Massieu potential F/T(N,V,1/T) directly during a single NVT simulation. The implementation provides the residual parts of A₁₀, A₀₁, A₂₀, A₁₁, A₀₂, A₃₀, A₂₁, and A₁₂, which correspond to pressure, internal energy, heat capacities, compressibility, etc. The required analytical expressions for ∂U/∂V and ∂²U/∂V² are derived for Lennard‑Jones and Coulomb potentials, and long‑range corrections are incorporated where appropriate. By separating ideal and residual contributions, the code delivers all thermodynamic derivatives up to second order (and selected third‑order terms) without additional simulations, facilitating the construction of high‑accuracy equations of state that combine experimental VLE data with simulation results.
Extended Green‑Kubo transport calculations – The Green‑Kubo framework, previously used only for thermal conductivity and viscosity, is expanded to compute electric conductivity σ and residence time τ. Electric conductivity is obtained from the autocorrelation of the electric current flux jₑ(t), which is summed over all charged species only, reducing noise and memory requirements. Residence time is defined via the time‑integrated autocorrelation of a Heaviside function that monitors whether a pair of molecules stays within a prescribed distance, allowing the calculation of solvation numbers on‑the‑fly. An “extended time step” mechanism evaluates autocorrelation functions every n‑th MD step, dramatically lowering memory consumption and I/O overhead.
Ewald summation for electrostatics – To remove the restriction to electro‑neutral systems, the authors implement the classic Ewald method. Short‑range interactions are treated in real space, while the long‑range part is evaluated in Fourier space, enabling accurate simulations of ionic solutions and charged mixtures. The paper notes that, at present, the Ewald option cannot be combined with the Massieu‑derivative sampling or the hybrid MPI/OpenMP parallelization, a limitation that will be addressed in future releases.
Radial distribution function (RDF) sampling – A new on‑the‑fly RDF calculation is added. The code samples g(r) between all Lennard‑Jones sites during MD runs; users can also define dummy LJ sites with zero σ and ε to obtain RDFs for point charges.
Performance and validation – Table 1 and Figure 1 compare runtime per MD step for pure water simulations (298 K, 55.34 mol·dm⁻³) using reaction‑field (RF) and Ewald (EW) electrostatics against GROMACS 4.6.5. While RF runs are comparable, EW runs are up to twice as fast in ms2. Scaling tests show that hybrid MPI/OpenMP yields a modest but consistent speed‑up across a range of particle numbers (500–20 000) and core counts.
Conclusion and outlook – ms2 2.0 delivers a free, open‑source tool that combines hybrid parallelization, systematic thermodynamic derivative sampling, extended transport property calculations, and Ewald electrostatics. It broadens the applicability of ms2 from neutral fluids to ionic systems and from static property evaluation to dynamic transport analysis. The authors acknowledge current incompatibilities (Ewald + Massieu + hybrid parallelization) and suggest future development to integrate all features into a single, fully scalable package.
Comments & Academic Discussion
Loading comments...
Leave a Comment