This repository hosts the implementation for PLUMED 2 of the CmuMD method, which allows to mimic open boundary conditions in NVT molecular simulations involving solid/fluid interfaces, and enables the simulation of concentration-driven fluxes through porous membranes.
The method, with an application to crystal growth problems is described in the paper:
[1] Molecular dynamics simulations of solutions at constant chemical potential
C Perego, M Salvalaglio, M Parrinello, J Chem Phys (14), 144113, 2015, arxiv
The adaptation of CmuMD to model concentration driven membrane fluxes is described in the paper:
[2] Concentration gradient driven molecular dynamics: a new method for simulations of membrane permeation and separation A Ozcan, C Perego, M Salvalaglio, M Parrinello, O Yazaydin Chem Sci 8 (5), 3858-3865, 2017
The version hosted here has been developed by Dr. Claudio Perego and is maintained by the Salvalaglio and Yazaydin groups at UCL Chemical Engineering.
The method has been further developed into a "cannibalistic" variant, and to model crystal nucleation at constant supersaturation by Dr. Tarak Karmakar.
CMUMD is implemented as a PLUMED 2 Collective Variable (CV), the purpose of which is that of computing the density in a specific region of the simulation box. The derivatives of such variable are suitably modified to apply forces at the interface between a physical region of the simulation box and the system' reservoir.
NB: CMUMD is defined as a CV but IT IS NOT an actual CV, the derivatives are formally wrong for any typical CV usage.
The forces are then applied by using the RESTRAINT
keyword in PLUMED 2 (see the examples following). The method as implemented in this repository can be applied only to a planar geometry.
In order to install CmuMD:
- Download the file
Cmumd.cpp
- Copy the source code in the PLUMED source directory:
cp CMUMD.cpp $PLUMED_DIR/src/colvar
- compile PLUMED 2
This example reports the PLUMED file used to implement the method discussed in Ozcan et al., Chem Sci, 2017.
The input files of for a typical simulation are available in Examples/Example1_methane_permeation_in_ZIF-8_membrane
GROUP ATOMS=5361-5785:1 LABEL=solute
CMUMD LABEL=LEFT GROUP=solute NSV=1 FIXED=0.350932603 DCR=0.087733 CRSIZE=0.087733 WF=0.00877 ASYMM=-1
CMUMD LABEL=RIGHT GROUP=solute NSV=1 FIXED=0.649067397 DCR=0.087733 CRSIZE=0.087733 WF=0.00877 ASYMM=1
RESTRAINT ARG=LEFT AT=1.03 KAPPA=8000.0 LABEL=lres
RESTRAINT ARG=RIGHT AT=0.0 KAPPA=500000.0 LABEL=rres
PRINT ARG=LEFT,RIGHT STRIDE=500 FILE=COLVAR_2
-
GROUP
defines the group of atoms that are monitored to bias and monitor the density. More about the syntax ofGROUP
can be found in the PLUMED 2 manual -
CMUMD LABEL=LEFT GROUP=solute NSV=1 FIXED=0.350932603 DCR=0.087733 CRSIZE=0.087733 WF=0.00877 ASYMM=-1
CMUMD LABEL=RIGHT GROUP=solute NSV=1 FIXED=0.649067397 DCR=0.087733 CRSIZE=0.087733 WF=0.00877 ASYMM=1
These line computes the methane number density in a CR located at distance DCR from the left and right sides of the membrane slab.
Keywords:
GROUP
= the solvent atom groupNSV
= number of atoms per solvent moleculeDCR
= distance of the CR inner boundary from the left and right interfaces of the crystal slab (all lengths are in units of Z box size!!!).CRSIZE
= width of the CR.WF
= Fermi function length at the CR boundaries.ASYMM
= Indicates that this statement defines the concentration on the left side of the membrane slab,ASYMM=-1
indicates the left side of the membrane slab,ASYMM=1
indicates the right side of the membrane slab.
-
RESTRAINT ARG=LEFT AT=1.03 KAPPA=8000.0 LABEL=lres
RESTRAINT ARG=RIGHT AT=0.0 KAPPA=500000.0 LABEL=rres
Impose an armonic constraint on the concentration, in the left and right volumes. More about the syntax of
RESTRAINT
can be found in the PLUMED 2 manual -
PRINT ARG=LEFT,RIGHT STRIDE=500 FILE=COLVAR_2
Print statement. More about the syntax ofRESTRAINT
can be found in the PLUMED 2 manual