The attached file contains a script contributed by Ed O'Brien to calculate the excess chemical potential using the Widom particle insertion method.
The code is based on the algorithm described by Frenkel in his book 'Understanding Molecular Simulation.' Please look there for details.

In the script, the chemical potential is printed out using the variable @chempot.

L Nilsson made some changes for increased file reading efficiency.


Attachments
widom_insertion.txt (507 downloads)

_________________________
Lennart Nilsson
Karolinska Institutet
Stockholm, Sweden