srtee
November 15, 2024, 9:10am
3
A long, long time ago, in a galaxy far, far away*, Kaitlyn Dwelle wrote a functioning imagecharges
fix that does roughly what you are talking about:
/* ----------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, [email protected]
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Contributing author: Kaitlyn Dwelle (MIT)
------------------------------------------------------------------------- */
#include <string.h>
#include <stdlib.h>
#include "fix_imagecharges.h"
This file has been truncated. show original
Inspired by that, I wrote a zmirror
fix into my own USER-CONP2:
/* ---------------------------------------------------------------------
LAMMPS - Large-scale Atomic/Molecular Massively Parallel Simulator
http://lammps.sandia.gov, Sandia National Laboratories
Steve Plimpton, [email protected]
Copyright (2003) Sandia Corporation. Under the terms of Contract
DE-AC04-94AL85000 with Sandia Corporation, the U.S. Government retains
certain rights in this software. This software is distributed under
the GNU General Public License.
See the README file in the top-level LAMMPS directory.
------------------------------------------------------------------------- */
/* ----------------------------------------------------------------------
Version: Mar/2021
Shern Ren Tee (UQ AIBN), [email protected]
------------------------------------------------------------------------- */
#include "lmptype.h"
#include "fix_zmirror.h"
This file has been truncated. show original
I won’t re-document either of those, because there’s a good reason both these projects are dormant. I agree with @akohlmey that compute capacity (to say nothing of GPUs) is growing so rapidly that doubling compute is much better than taking on unphysical behaviours of unknown impact.
That said, the mirrored cell is a general tactic for efficiently constructing asymmetric transverse profiles in MD: build one cell “facing left” and one “facing right” so that their periodic repetition has no net dipole moment, and show that the cells’ observables are statistically independent so that you indeed have twice the sampling from twice the computational work.
This is used in the Muller-Plathe method for thermal conductivity, which measures the heat fluxes across two bulks. Raiteri applied this to fluid-fluid interfaces in 2020 (Molecular dynamics simulations of liquid–liquid interfaces in an electric field: The water–1,2-dichloroethane interface | The Journal of Chemical Physics | AIP Publishing ) and I subsequently adapted the method to electrode simulations (Fully periodic, computationally efficient constant potential molecular dynamics simulations of ionic liquid supercapacitors | The Journal of Chemical Physics | AIP Publishing ). No finicky mirror planes needed!
*The Milky Way moves at between 130-600 km/s (Speed of the Milky Way in Space - The Physics Factbook ), so “the Milky Way in 2020” counts as a galaxy far, far away.
4 Likes