**Project ID:** plumID:23.027

**Source:** ion-structure-driver.dat

**Originally used with PLUMED version:** 2.5.1

**Stable:** zipped raw stdout - zipped raw stderr - stderr

**Master:** zipped raw stdout - zipped raw stderr - stderr

# Plumed driver script to calculate ion coordination numbers and identify ion clusters in the EDL and bulk solution regions of CmuMD simulations # Aaron R. Finney and Matteo Salvalaglio # Properties of aqueous electrolyte solutions at carbon electrodes: # effects of concentration and surface charge on solution structure, ion clustering and thermodynamics in the electric double layer # June 2023

# Define atom groupsgra:GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More detailsATOMS=1-9152:1the numerical indexes for the set of atoms in the groupwat:GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More detailsATOMS=9153-43319:3,44156-46621:3,47458-49827:3,50664-53117:3the numerical indexes for the set of atoms in the groupsod:GROUPDefine a group of atoms so that a particular list of atoms can be referenced with a single label in definitions of CVs or virtual atoms. More detailsATOMS=43320-43737,46622-47039,49828-50245,53118-53535the numerical indexes for the set of atoms in the groupchl:ATOMS=43738-44155,47040-47457,50246-50663,53536-53953the numerical indexes for the set of atoms in the groupslt:ATOMS=43320-43737,46622-47039,49828-50245,53118-53535,43738-44155,47040-47457,50246-50663,53536-53953the numerical indexes for the set of atoms in the groupsln:ATOMS=9153-43319:3,44156-46621:3,47458-49827:3,50664-53117:3,43320-43737,46622-47039,49828-50245,53118-53535,43738-44155,47040-47457,50246-50663,53536-53953the numerical indexes for the set of atoms in the group

# Set a virtual atom at the origin and in the 'bulk'p0:FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More detailsAT=2.696525,2.75872,9.438535coordinates of the virtual atomp1:FIXEDATOMAdd a virtual atom in a fixed position. This action has hidden defaults. More detailsAT=2.696525,2.75872,13.5# Identify cations at the interface and in the bulkcoordinates of the virtual atomdenssod:DENSITYDepreciated command that is bascially equivalant to GROUP. This action is a shortcut. More detailsSPECIES=43320-43737,46622-47039,49828-50245,53118-53535the atoms in the groupsodintl:AROUNDThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. This action is a shortcut. More detailsDATA=the label of an action that calculates multicolvarsdenssodATOM=an alternative to ORIGINp0ZLOWER=-2.45the lower boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)ZUPPER=-1.45the upper boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)SIGMA=0.01the width of the function to be used for kernel density estimationsodintr:AROUNDThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. This action is a shortcut. More detailsDATA=the label of an action that calculates multicolvarsdenssodATOM=an alternative to ORIGINp0ZLOWER=1.45the lower boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)ZUPPER=2.45the upper boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)SIGMA=0.01the width of the function to be used for kernel density estimationsodblkr:AROUNDThis quantity can be used to calculate functions of the distribution of collective variables for the atoms that lie in a particular, user-specified part of of the cell. This action is a shortcut. More detailsDATA=the label of an action that calculates multicolvarsdenssodATOM=an alternative to ORIGINp1ZLOWER=-0.5the lower boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)ZUPPER=0.5the upper boundary in z relative to the z coordinate of the atom (0 indicates use full extent of box)SIGMA=0.01the width of the function to be used for kernel density estimation

# Get the Na-Cl coordination number distribution at the interface and in the bulkcnintl:COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut. More detailsSPECIESA=this keyword is used for colvars such as the coordination numbersodintlSPECIESB=this keyword is used for colvars such as the coordination numberchlSWITCH={RATIONAL R_0=0.355 NN=32 MM=64}the switching function that it used in the construction of the contact matrixMEANcalculate the mean of all the quantitiesHIGHESTthis flag allows you to recover the highest of these variablescnintr:COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut. More detailsSPECIESA=this keyword is used for colvars such as the coordination numbersodintrSPECIESB=this keyword is used for colvars such as the coordination numberchlSWITCH={RATIONAL R_0=0.355 NN=32 MM=64}the switching function that it used in the construction of the contact matrixMEANcalculate the mean of all the quantitiesHIGHESTthis flag allows you to recover the highest of these variablescnblkr:COORDINATIONNUMBERCalculate the coordination numbers of atoms so that you can then calculate functions of the distribution of This action is a shortcut. More detailsSPECIESA=this keyword is used for colvars such as the coordination numbersodblkrSPECIESB=this keyword is used for colvars such as the coordination numberchlSWITCH={RATIONAL R_0=0.355 NN=32 MM=64}the switching function that it used in the construction of the contact matrixMEANcalculate the mean of all the quantitiesHIGHESTthis flag allows you to recover the highest of these variables

# Report the mean and highest coordination numbers in the different regionsPrint quantities to a file. More detailsARG=the input for this action is the scalar output from one or more other actionscnintl.*,cnintr.*,cnblkrFILE=cn-regions.datthe name of the file on which to output these quantities

# DFS on ion clusters at the +ve surface interface (left)mat0l:CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More detailsATOMS=the atoms for which you would like to calculate the adjacency matrixcnintlSWITCH={GAUSSIAN D_0=0.355 R_0=0.01}specify the switching function to use between two sets of indistinguishable atomsdfs0l:DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More detailsMATRIX=the input matrix (can use ARG instead)mat0l# Number of ion clusters at the interfacenclust0l:CLUSTER_DISTRIBUTIONCalculate functions of the distribution of properties in your connected components. This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs0lMORE_THAN={GAUSSIAN D_0=1.95 R_0=0.01 D_MAX=1.99} # Largest cluster at the interfacecalculate the number of variables that are more than a certain target valueclust0natl:CLUSTER_NATOMSCalculate the number of atoms in the cluster of interest This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs0lCLUSTER=1which cluster would you like to look at 1 is the largest cluster, 2 is the second largest, 3 is the the third largest and so on

# DFS on ion clusters at the -ve surface interface (right)mat0r:CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More detailsATOMS=the atoms for which you would like to calculate the adjacency matrixcnintrSWITCH={GAUSSIAN D_0=0.355 R_0=0.01}specify the switching function to use between two sets of indistinguishable atomsdfs0r:DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More detailsMATRIX=the input matrix (can use ARG instead)mat0r# Number of ion clusters at the interfacenclust0r:CLUSTER_DISTRIBUTIONCalculate functions of the distribution of properties in your connected components. This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs0rMORE_THAN={GAUSSIAN D_0=1.95 R_0=0.01 D_MAX=1.99} # Largest cluster at the interfacecalculate the number of variables that are more than a certain target valueclust0natr:CLUSTER_NATOMSCalculate the number of atoms in the cluster of interest This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs0rCLUSTER=1which cluster would you like to look at 1 is the largest cluster, 2 is the second largest, 3 is the the third largest and so on

# DFS on ion clusters in the bulkmat1:CONTACT_MATRIXAdjacency matrix in which two atoms are adjacent if they are within a certain cutoff. More detailsATOMS=the atoms for which you would like to calculate the adjacency matrixcnblkrSWITCH={RATIONAL R_0=0.355 D_MAX=0.356}specify the switching function to use between two sets of indistinguishable atomsdfs1:DFSCLUSTERINGFind the connected components of the matrix using the depth first search clustering algorithm. More detailsMATRIX=the input matrix (can use ARG instead)mat1# Number of ion clusters in the bulknclust1:CLUSTER_DISTRIBUTIONCalculate functions of the distribution of properties in your connected components. This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs1MORE_THAN={GAUSSIAN D_0=1.95 R_0=0.01 D_MAX=1.99} # Largest cluster in the bulkcalculate the number of variables that are more than a certain target valueclust1nat:CLUSTER_NATOMSCalculate the number of atoms in the cluster of interest This action is a shortcut. More detailsCLUSTERS=the label of the action that does the clusteringdfs1CLUSTER=1which cluster would you like to look at 1 is the largest cluster, 2 is the second largest, 3 is the the third largest and so onPrint quantities to a file. More detailsARG=nclust0l.*,the input for this action is the scalar output from one or more other actionsclust0natl.*,nclust0r.*,clust0natr.*,nclust1.*,clust1natFILE=cluster.datthe name of the file on which to output these quantities