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 k_BT to HPMC integrator #1869

Draft
wants to merge 37 commits into
base: trunk-major
Choose a base branch
from
Draft

Conversation

surajkannur
Copy link

@surajkannur surajkannur commented Aug 15, 2024

Description

Previously, $kT$ was assumed to be 1. In this PR, $kT$ is implemented as a variant in the HPMC integrator.

Motivation and context

Assuming $kT = 1$ meant that the well depth of the potential had to be rescaled to simulate different temperatures in the case of patchy particles. It also made interpreting the $\beta P$ output of the SDF compute difficult. With this change,
the temperature can be user-defined.

How has this been tested?

  • pytest set and get kT
  • notebook to test
    • $\mu VT$,
    • cluster moves,
    • shape moves
  • hoomd-validation tests

hoomd-validation:
LJ Fluid





LJ Union


Patchy Particle Pressure


MuVT simulation with octahedron particles initialized at $kT=1.0$ and $f=10$

Patchy particle simulation replicating results of the tutorial: 'Modelling Patchy Particles' with varying kT instead of the energy scale

TODO documentation

Change log

Add kT to HPMC integrator

Checklist:

  • IntegratorHPMCMono.h
  • $\mu VT$
  • Cluster moves
  • SDF pressure compute
  • shape moves
  • boxMC
  • Change SDF input from betaP to P
  • I have reviewed the Contributor Guidelines.
  • I agree with the terms of the HOOMD-blue Contributor Agreement.
  • My name is on the list of contributors (sphinx-doc/credits.rst) in the pull request source branch.

Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale There has been no activity on this for some time. label Sep 11, 2024
@joaander joaander removed the stale There has been no activity on this for some time. label Sep 11, 2024
@surajkannur
Copy link
Author

pre-commit.ci autofix

Copy link
Member

@joaander joaander left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I have made several suggestions to improve code style. I also found a bug in BoxMC (not your fault, the variable is named incorrectly).

As an added TODO item, we need to modify hpmc/compute.py.

  • Add SDF.P which returns SDF.betaP * {the current kT}.

I also considered renaming betaP to P, but I now think we should keep betaP for backwards compatibility. betaP is also more natural for purely hard particle systems.

hoomd/hpmc/ComputeSDF.h Outdated Show resolved Hide resolved
hoomd/hpmc/IntegratorHPMC.cc Outdated Show resolved Hide resolved
hoomd/hpmc/IntegratorHPMC.h Outdated Show resolved Hide resolved
hoomd/hpmc/IntegratorHPMC.h Outdated Show resolved Hide resolved
hoomd/hpmc/IntegratorHPMC.h Outdated Show resolved Hide resolved
hoomd/hpmc/UpdaterClusters.h Outdated Show resolved Hide resolved
hoomd/hpmc/UpdaterMuVT.h Outdated Show resolved Hide resolved
hoomd/hpmc/UpdaterMuVT.h Outdated Show resolved Hide resolved
hoomd/hpmc/UpdaterMuVT.h Outdated Show resolved Hide resolved
hoomd/hpmc/UpdaterBoxMC.cc Outdated Show resolved Hide resolved
…T. (2) Call Operator() on Variant directly. (3) Moved kT out of loop in places. (4) Fixed bug in UpdaterBoxMC.
hoomd/hpmc/UpdaterBoxMC.cc Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants