This is part of the multicolvar module |
Calculate a a weighted average position based on the value of some multicolvar.
This action calculates the position of a new virtual atom using the following formula:
\[ x_\alpha = \frac{1}{2\pi} \arctan \left[ \frac{ \sum_i w_i f_i \sin\left( 2\pi x_{i,\alpha} \right) }{ \sum_i w_i f_i \cos\left( 2\pi x_{i,\alpha} \right) } \right] \]
Where in this expression the \(w_i\) values are a set of weights calculated within a multicolvar action and the \(f_i\) are the values of the multicolvar functions. The \(x_{i,\alpha}\) values are the positions (in scaled coordinates) associated with each of the multicolvars calculated.
Lets suppose that you are examining the formation of liquid droplets from gas. You may want to determine the center of mass of any of the droplets formed. In doing this calculation you recognize that the atoms in the liquid droplets will have a higher coordination number than those in the surrounding gas. As you want to calculate the position of the droplets you thus recognize that these atoms with high coordination numbers should have a high weight in the weighted average you are using to calculate the position of the droplet. You can thus calculate the position of the droplet using an input like the one shown below:
c1: COORDINATIONNUMBERLOWMEM( default=off ) lower the memory requirementsSPECIES=1-512this keyword is used for colvars such as coordination number.SWITCH={EXP D_0=4.0 R_0=0.5} cc: CENTER_OF_MULTICOLVARThis keyword is used if you want to employ an alternative to the continuous switching function defined above.DATA=c1compulsory keyword find the average value for a multicolvar
The first line here calculates the coordination numbers of all the atoms in the system. The virtual atom then uses the values of the coordination numbers calculated by the action labelled c1 when it calculates the Berry Phase average described above. (N.B. the \(w_i\) in the above expression are all set equal to 1 in this case)
The above input is fine we can, however, refine this somewhat by making use of a multicolvar transform action as shown below:
c1: COORDINATIONNUMBERSPECIES=1-512this keyword is used for colvars such as coordination number.SWITCH={EXP D_0=4.0 R_0=0.5} cf: MTRANSFORM_MOREThis keyword is used if you want to employ an alternative to the continuous switching function defined above.DATA=c1compulsory keyword The multicolvar that calculates the set of base quantities that we are interested inSWITCH={RATIONAL D_0=2.0 R_0=0.1}This keyword is used if you want to employ an alternative to the continuous switching function defined above.LOWMEMcc: CENTER_OF_MULTICOLVAR( default=off ) lower the memory requirementsDATA=cfcompulsory keyword find the average value for a multicolvar
This input once again calculates the coordination numbers of all the atoms in the system. The middle line then transforms these coordination numbers to numbers between 0 and 1. Essentially any atom with a coordination number larger than 2.0 is given a weight of one and below this value the transformed value decays to zero. It is these transformed coordination numbers that are used to calculate the Berry phase average described in the previous section.
ATOMS | the list of atoms which are involved the virtual atom's definition. For more information on how to specify lists of atoms see Groups and Virtual Atoms |
DATA | find the average value for a multicolvar |
COMPONENT | if your input multicolvar is a vector then specify which component you would like to use in calculating the weight |