Pair entropy CV

These are some tips for the use of the Pair entropy collective variable introduced in the paper "Enhancing Entropy and Enthalpy Fluctuations to Drive Crystallization in Atomistic Simulations".

The easiest way to use this collective variable is with the LOAD keyword in PLUMED and an example can be found here.

This is a minimal input:

PAIRENTROPY ...

LABEL=s2

ATOMS=1-250

MAXR=0.65

SIGMA=0.01

... PAIRENTROPY

You can also find the latest version of the PLUMED implementation of the CV in this repository.

The files that you will need are::

  • src/colvar/PairEntropy.cpp

  • src/tools/NeighborListParallel.h

  • src/tools/NeighborListParallel.cpp

Don't forget to check out some of the features such as printing the g(r) to a file, and averaging the g(r) over many frames, for instance:

PAIRENTROPY ...

LABEL=s2

ATOMS=1-250

MAXR=0.65

SIGMA=0.01

OUTPUT_GOFR

AVERAGE_GOFR

... PAIRENTROPY

There is also the option to use neighbor lists:

PAIRENTROPY ...

LABEL=s2

ATOMS=1-250

MAXR=0.65

SIGMA=0.01

NLIST

NL_CUTOFF=0.75

NL_STRIDE=10

... PAIRENTROPY

Here NLIST is a flag that activates the use of the neighbors lists, NL_STRIDE is the number of steps between neighbor list rebuilds, and NL_CUTOFF is the cutoff for the construction of the neighbor list. I suggest that you check carefully the scaling of the calculation of the CV with the number of MPI threads. You can try removing the NLIST and NL_* keywords to do the normal N^2 calculation, since for small systems (N<200) it should be faster. If you use the neighbor lists, check out the statistics in the plumed output file, they should give some insight into the calculation. Be sure to check that the number of dangerous builds of the neighbor list is 0. This means that you haven't missed any interactions by using the neighbor lists.

I have kept an old version of the code, the one I used in the original paper, for reference. This is src/colvar/Pentropy5.cpp.

I hope you find it useful!