ls1mardyn / ls1-mardyn

ls1-MarDyn is a massively parallel Molecular Dynamics (MD) code for large systems. Its main target is the simulation of thermodynamics and nanofluidics. ls1-MarDyn is designed with a focus on performance and easy extensibility.
http://www.ls1-mardyn.de
Other
28 stars 15 forks source link

Add molecule-wise virial correction #328

Closed HomesGH closed 3 months ago

HomesGH commented 4 months ago

Description

In accordance to the planar LRC, the homogeneous LRC should not only correct the global virial, but also the virial of the single molecules. This way, the global pressure and the pressure sampled by some plugins, e.g. RegionSampling, match.

How Has This Been Tested?

Result for the CO2 example (added RegionSampling plugin): master PR
Direct output 1.17778E-06 1.17778E-06
ResultWriter 1.17778E-06 1.17778E-06
RegionSampling 1.22360E-06 1.17782E-06

The agreement between Direct output and ResultWriter is not surprising as both rely on the very same data from the Domain class.