Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "How to compute the free energy of solids." #1613

Merged
merged 7 commits into from
Sep 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion sphinx-doc/how-to.rst
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ How-to
howto/determine-the-most-efficient-device
howto/choose-the-neighbor-list-buffer-distance
howto/molecular
howto/custom-md-potential
howto/continuously-vary-potential-parameters
howto/custom-md-potential
howto/minimize-potential-energy
howto/prevent-particles-from-moving
howto/compute-the-free-energy-of-solids
howto/cpppotential
58 changes: 58 additions & 0 deletions sphinx-doc/howto/compute-the-free-energy-of-solids.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
.. Copyright (c) 2009-2023 The Regents of the University of Michigan.
.. Part of HOOMD-blue, released under the BSD 3-Clause License.

How to compute the free energy of solids
========================================

Follow these steps to perform `Frenkel-Ladd`_ (*Einstein crystal*) or `Vega-Noya`_ (*Einstein
molecule*) approach to compute the free energy of solid phases.

MD simulations
--------------

1. Initialize your system in the ideal crystal structure.
2. Add stationary reference particles at the equilibrium sites.
3. Set the pair force ``r_cut`` to 0 between the reference particle type and all particle types.
4. Add bonds (`hoomd.md.bond.Harmonic`) between the stationary reference particles and the mobile
particles.
5. Integrate the equations of motion of the mobile particles.

.. seealso::

`prevent-particles-from-moving`.

6. Adjust the strength of bonds as needed during the simulation.

.. seealso::

`continuously-vary-potential-parameters`.

7. When using the *Einstein crystal* approach, apply `hoomd.update.RemoveDrift` to adjust the center
of mass of the system.

HPMC simulations
----------------

1. Initialize your system in the ideal crystal structure.
2. Apply the harmonic external potential (`hoomd.hpmc.external.field.Harmonic`), using variants
to adjust the spring constants as needed during the simulation.
3. Apply trial moves to the mobile particles.

.. seealso::

`prevent-particles-from-moving`.

4. When using the *Einstein crystal* approach, apply `hoomd.update.RemoveDrift` to adjust the center
of mass of the system.

Log and analyze energies
------------------------

In both MD and HPMC simulations:

1. Log relevant energies (e.g. with `hoomd.write.HDF5Log`).
2. Post process the logged data to compute the free energy following the procedures in
`Frenkel-Ladd`_ or `Vega-Noya`_ as appropriate.

.. _Frenkel-Ladd: https://doi.org/10.1063/1.448024
.. _Vega-Noya: https://doi.org/10.1063/1.2790426