diff --git a/src/adjmat/AlignedMatrixBase.cpp b/src/adjmat/AlignedMatrixBase.cpp index dacc59227cecc3b69ae7c5802165823d3586ffd9..28fd47c936b8105ca31d1d0efda1affe6474ea2f 100644 --- a/src/adjmat/AlignedMatrixBase.cpp +++ b/src/adjmat/AlignedMatrixBase.cpp @@ -33,8 +33,14 @@ void AlignedMatrixBase::registerKeywords( Keywords& keys ){ "have an orientation so your list will be a list of the labels of \\ref mcolv or \\ref multicolvarfunction " "as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority " "of \\ref mcolv and \\ref multicolvarfunction do not calculate a molecular orientation."); - keys.add("atoms-1","ATOMSA",""); - keys.add("atoms-1","ATOMSB",""); + keys.add("atoms-1","ATOMSA","The list of molecules that you would like to use for the rows of the contact matrix. The molecules involved must " + "have an orientation so your list will be a list of the labels of \\ref mcolv or \\ref multicolvarfunction " + "as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority " + "of \\ref mcolv and \\ref multicolvarfunction do not calculate a molecular orientation."); + keys.add("atoms-1","ATOMSB","The list of molecules that you would like to use for the columns of the contact matrix. The molecules involved must " + "have an orientation so your list will be a list of the labels of \\ref mcolv or \\ref multicolvarfunction " + "as PLUMED calculates the orientations of molecules within these operations. Please note also that the majority " + "of \\ref mcolv and \\ref multicolvarfunction do not calculate a molecular orientation."); keys.add("numbered","SWITCH","This keyword is used if you want to employ an alternative to the continuous swiching function defined above. " "The following provides information on the \\ref switchingfunction that are available. " "When this keyword is present you no longer need the NN, MM, D_0 and R_0 keywords."); diff --git a/src/adjmat/SMACMatrix.cpp b/src/adjmat/SMACMatrix.cpp index 7684390485f04008b4be83ab9ab3d0d205b522cb..55e8fa854773ea611e57776b49d9245fbd03a7ba 100644 --- a/src/adjmat/SMACMatrix.cpp +++ b/src/adjmat/SMACMatrix.cpp @@ -29,8 +29,49 @@ /* Adjacency matrix in which two molecules are adjacent if they are within a certain cutoff and if the angle between them is within certain ranges. +In this case the elements of the adjacency matrix are calculated using: + +\f[ +A_{ij} = \sigma(r_{ij}) \sum_n K_n(\theta_{ij}) +\f] + +In this expression \f$r_{ij}\f$ is the distance between molecule \f$i\f$ and molecule \f$j\f$ and \f$\sigma(r_{ij}\f$ is a +\ref switchingfunction that acts on this distance. The $K_n functions are \ref kernelfunctions that take the torsion angle, \f$\theta_{ij}\f$, between the +internal orientation vectors for molecules \f$i\f$ and \f$j\f$ as input. These kernel functions should be set so that they are +equal to one when the relative orientation of the moleclues are as they are in the solid and equal to zero otherwise. +As the above matrix element is a product of functions it is only equal to one when the centers of mass of molecules \f$i\f$ and\f$j\f$ +are with a certain distance of each other and when the molecules are aligned in some desirable way. + \par Examples +In the following example an adjacency matrix is constructed in which the \f$(i,j)\f$ element is equal to one if +molecules \f$i\f$ and \f$j\f$ are within 6 angstroms of each other and if the torsional angle between the orientations +of these molecules is close to 0 or \pi. The various connected components of this matrix are determined using the +\ref DFSCLUSTERING algorithm and then the size of the largest cluster of connectes molecules is output to a colvar file + +\verbatim +UNITS LENGTH=A + +MOLECULES ... +MOL1=1,2,1 +MOL2=5,6,5 +MOL3=9,10,9 +MOL4=13,14,13 +MOL5=17,18,17 +LABEL=m1 +... MOLECULES + +SMAC_MATRIX ... + ATOMS=m1 SWITCH={RATIONAL D_0=5.99 R_0=0.1 D_MAX=6.0} + KERNEL1={TRIANGULAR CENTER=0 SIGMA=1.0} KERNEL2={TRIANGULAR CENTER=pi SIGMA=0.6} + LABEL=smacm +... SMAC_MATRIX + +dfs1: DFSCLUSTERING MATRIX=smacm +cc2: CLUSTER_NATOMS CLUSTERS=dfs1 CLUSTER=1 +PRINT ARG=smac.*,cc1.*,cc2 FILE=colvar +\endverbatim + */ //+ENDPLUMEDOC diff --git a/src/crystallization/Fccubic.cpp b/src/crystallization/Fccubic.cpp index 3c97c28185eda96175a823645d996528fa945db0..6ea0ce86227ad3ef8528d37515f3a080dd59a3e1 100644 --- a/src/crystallization/Fccubic.cpp +++ b/src/crystallization/Fccubic.cpp @@ -33,9 +33,40 @@ namespace crystallization{ //+PLUMEDOC MCOLVAR FCCUBIC /* +Measure how similar the environment around atoms is to that found in a FCC structure. + +This CV was introduced in this article \cite fcc-michele-1 and again in this article \cite fcc-michele-2 +This CV essentially determines whether the environment around any given atom is similar to that found in +the FCC structure or not. The function that is used to make this determination is as follows: + +\f[ +s_i = \frac{ \sum_{i \ne j} \sigma(r_{ij}) \left\{ a\left[ \frac{(x_{ij}y_{ij})^4 + (x_{ij}z_{ij})^4 + (y_{ij}z_{ij})^4}{r_{ij}^8} - \frac{\alpha (x_{ij}y_{ij}z_{ij})^4}{r_{ij}^{12}} \right] + b \right\} }{ \sum_{i \ne j} \sigma(r_{ij}) } +\f] + +In this expression \f$x_{ij}\f$, \f$y_{ij}\f$ and \f$z_{ij}\f$ are the \f$x\f$, \f$y\f$ and \f$z\f$ components of the vector connecting atom \f$i\f$ to +atom \f$j\f$ and \f$r_{ij}\f$ is the magnitude of this vector. \f$\sigma(r_{ij})\f$ is a \ref switchingfunction that acts on the distance between +atom \f$i\f$ and atom \f$j\f$ and its inclusion in the numerator and the denominator of the above expression ensures that we are calculating an average +of the function of \f$x_{ij}\f$, \f$y_{ij}\f$ and \f$z_{ij}\f$ for the atoms in the first coordination sphere around atom \f$i\f$. Lastly, \f$\alpha\f$ +is a parameter that can be set by the user, which by default is equal to three. The values of \f$a\f$ and \f$b\f$ are calculated from \f$\alpha\f$ using: + +\f[ +a = \frac{ 80080}{ 2717 + 16 \alpha} \qquad \textrm{and} \qquad b = \frac{ 16(\alpha - 143) }{2717 + 16\alpha} +\f] + +This quantity is once again a multicolvar so you can compute it for multiple atoms using a single PLUMED action and then compute +the average value for the atoms in your system, the number of atoms that have an \f$s_i\f$ value that is more that some target and +so on. Notice also that you can rotate the reference frame if you are using a non-standard unit cell. \par Examples +The following input calculates the FCCUBIC parameter for the 64 atoms in the system +and then calculates and prints the average value for this quantity. + +\verbatim +FCCUBIC SPECIES=1-64 SWITCH={RATIONAL D_0=3.0 R_0=1.5} MEAN LABEL=d +PRINT ARG=d.* FILE=colv +\endverbatim + */ //+ENDPLUMEDOC diff --git a/src/crystallization/SMAC.cpp b/src/crystallization/SMAC.cpp index 53fc2e9becea19dbe62cc248cb02709a03b252da..18e9a2ab050bf0fffd6b80f7f2c5758325822b91 100644 --- a/src/crystallization/SMAC.cpp +++ b/src/crystallization/SMAC.cpp @@ -26,11 +26,96 @@ //+PLUMEDOC MCOLVARF SMAC /* -Calculate the SMAC collective variable discussed in \cite smac-paper - +Calculate a variant on the SMAC collective variable discussed in \cite smac-paper + +The SMAC collective variable can be used to study the formation of molecular solids +from either the melt or from solution. The idea behind this variable is that what +differentiates a molecular solid from a molecular liquid is an alignment of +internal vectors in neighboring molecules. In other words, the relative orientation +of neighboring molecules is no longer random as it is in a liquid. In a solid particular +torsional angles between molecules are preferred. As such this CV calculates the following +average: + +\f[ +s_i = \frac{ \left\{ 1 - \psi\left[ \sum_{j \ne i} \sigma(r_{ij}) \right] \right\} \sum_{j \ne i} \sigma(r_{ij}) \sum_n K_n(\theta_{ij}) }{ \sum_{j \ne i} \sigma(r_{ij}) } +\f] + +In this expression \f$r_{ij}\f$ is the distance between molecule \f$i\f$ and molecule \f$j\f$ and \f$\sigma(r_{ij})\f$ is a +\ref switchingfunction that acts on this distance. By including this switching function in the second summation in the +numerator and in the denominator we are thus ensuring that we calculate an average over the molecules in the first coordination +sphere of molecule \f$i\f$. All molecules in higher coordination sphere will essentially contribute zero to the sums in the +above expression because their \f$\sigma(r_{ij})\f$ will be very small. \f$\psi\f$ is also a switching function. The term +including \f$\psi\f$ in the numerator is there to ensure that only those molecules that are attached to a reasonably large +number of molecules. It is important to include this "more than" switching function when you are simulating nucleation +from solution with this CV. Lastly, the $K_n functions are \ref kernelfunctions that take the torsion angle, \f$\theta_{ij}\f$, between the +internal orientation vectors for molecules \f$i\f$ and \f$j\f$ as input. These kernel functions should be set so that they are +equal to one when the relative orientation of the moleclues are as they are in the solid and equal to zero otherwise. +The final \f$s_i\f$ quantity thus measures whether (on average) the molecules in the first coordination sphere around molecule \f$i\f$ +are oriented as they would be in the solid. Furthermore, this Action is a multicolvar so you can calculate the \f$s_i\f$ values +for all the molecules in your system simultaneously and then determine the average, the number less than and so on. \par Examples +In the example below the orientation of the molecules in the system is determined by calculating the +vector that connects a pair of atoms. SMAC is then used to determine whether the molecules are sitting +in a solid or liquid like environment. We can determine whether the environment is solid or liquid like because in the solid the torsional angle between +the bond vectors on adjacent molecules is close to 0 or \f$\pi\f$. The final quantity that is output to the colvar +file measures the number of molecules that have a SMAC parameter that is greater than 0.7. N.B. By using +the indices of three atoms for each of the MOL keywords below we are telling PLUMED to use the first two +numbers to determine the orientation of the molecule that will ultimately be used when calculating the \f$\theta_{ij}\f$ +terms in the formula above. The atom with the third index meanwhile is used when we calculate \f$r_{ij}\f$. + +\verbatim +MOLECULES ... +MOL1=9,10,9 +MOL2=89,90,89 +MOL3=473,474,473 +MOL4=1161,1162,1161 +MOL5=1521,1522,1521 +MOL6=1593,1594,1593 +MOL7=1601,1602,1601 +MOL8=2201,2202,2201 +LABEL=m3 +... MOLECULES + +SMAC ... + SPECIES=m3 LOWMEM + KERNEL1={GAUSSIAN CENTER=0 SIGMA=0.480} KERNEL2={GAUSSIAN CENTER=pi SIGMA=0.480} + SWITCH={RATIONAL R_0=0.6} MORE_THAN={RATIONAL R_0=0.7} SWITCH_COORD={EXP R_0=4} + LABEL=s2 +... SMAC + +PRINT ARG=s2.* FILE=colvar +\endverbatim + +This second example works in a way that is very similar to the previous command. Now, however, +the orientation of the molecules is determined by finding the plane that contains the positions +of three atoms. + +\verbatim +PLANES ... +MOL1=9,10,11 +MOL2=89,90,91 +MOL3=473,474,475 +MOL4=1161,1162,1163 +MOL5=1521,1522,1523 +MOL6=1593,1594,1595 +MOL7=1601,1602,1603 +MOL8=2201,2202,2203 +VMEAN +LABEL=m3 +... PLANES + +SMAC ... + SPECIES=m3 LOWMEM + KERNEL1={GAUSSIAN CENTER=0 SIGMA=0.480} KERNEL2={GAUSSIAN CENTER=pi SIGMA=0.480} + SWITCH={RATIONAL R_0=0.6} MORE_THAN={RATIONAL R_0=0.7} SWITCH_COORD={EXP R_0=3.0} + LABEL=s2 +... SMAC + +PRINT ARG=s2.* FILE=colvar +\endverbatim + */ //+ENDPLUMEDOC diff --git a/user-doc/bibliography.bib b/user-doc/bibliography.bib index c8657d85e6a6019642f61ddf5488ded1d3f50770..0c1a8a599408af81f0a382c742e731bbe14c298e 100644 --- a/user-doc/bibliography.bib +++ b/user-doc/bibliography.bib @@ -2293,3 +2293,59 @@ eprint = { } +@article{smac-paper, +title = "Insight into the nucleation of urea crystals from the melt ", +journal = "Chemical Engineering Science ", +volume = "121", +number = "", +pages = "51 - 59", +year = "2015", +note = "2013 Danckwerts Special Issue on Molecular Modelling in Chemical Engineering ", +issn = "0009-2509", +doi = "http://dx.doi.org/10.1016/j.ces.2014.08.032", +url = "http://www.sciencedirect.com/science/article/pii/S0009250914004503", +author = "Federico Giberti and Matteo Salvalaglio and Marco Mazzotti and Michele Parrinello", +keywords = "Urea", +keywords = "Molecular dynamics", +keywords = "Nucleation", +keywords = "Free energy", +keywords = "Enhanced sampling", +keywords = "Well tempered metadynamics ", +abstract = "Abstract Obtaining molecular-level information regarding nucleation is an essential step towards a thorough comprehension of crystallization processes. In this work we investigate the nucleation of urea at the atomic scale using enhanced sampling Molecular Dynamics simulations. We show that by employing a set of suitably defined collective variables in a Well Tempered Metadynamics scheme it is possible to reversibly drive the system across the solid–liquid phase transition and to recover the associated free energy surface. Our study reveals the presence of an undiscovered metastable ordered structure competing with the experimental one during crystal nucleation, suggesting a non-classical mechanism for this process. " +} + +@article{fcc-michele-1, + title = {Solid-liquid interface free energy through metadynamics simulations}, + author = {Angioletti-Uberti, Stefano and Ceriotti, Michele and Lee, Peter D. and Finnis, Mike W.}, + journal = {Phys. Rev. B}, + volume = {81}, + issue = {12}, + pages = {125416}, + numpages = {11}, + year = {2010}, + month = {Mar}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.81.125416}, + url = {http://link.aps.org/doi/10.1103/PhysRevB.81.125416} +} + +@article{fcc-michele-2, + title = {Solid-liquid interfacial free energy out of equilibrium}, + author = {Cheng, Bingqing and Tribello, Gareth A. and Ceriotti, Michele}, + journal = {Phys. Rev. B}, + volume = {92}, + issue = {18}, + pages = {180102}, + numpages = {5}, + year = {2015}, + month = {Nov}, + publisher = {American Physical Society}, + doi = {10.1103/PhysRevB.92.180102}, + url = {http://link.aps.org/doi/10.1103/PhysRevB.92.180102} +} + + + + + +