Implement Parallel Tempering

Đang mở
#302 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@thomasloux đang làm issue này rồi.

Từ ngày 25/9/2025.

  • #263 của @thomasloux — đang mở

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
20/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
python
Lĩnh vực
backend

Hướng nghiên cứu

Start by reviewing the open pull request #263 and the cited replica-exchange references; the issue names no source files or tests. The proposed work spans parallel system creation, temperature exchanges, velocity updates, and efficient trajectory access, with thermostat behavior still uncertain; done means implementing and validating that workflow for NVT or NPT simulations.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

feature physicist-friendly

Parallel Tempering is a way to improve the coverage of a distribution, by preventing a system to be trapped in a local minimum. The idea is that it's easier to pass an energy barrier with more energy, in this case provided by a higher temperature.

So, a number N of simulations are run in parallel at temperatures T_1, ..., T_N. Every n_step, a proposal to exchange two adjacent systems with temperatures T_i, T_{i+1} is tested using Metropolis Hasting. In case of success, the systems are exchange, so that the in practice the temperatures are changed and velocities are scaled.

Doing so, all chains for a given temperature follow its Boltzmann distribution for the intended temperature.

The implementation in TorchSim would be fairly easy in the first approach.

  1. Choose a system to analyse
  2. Create a function that duplicate into N systems
  3. Choose the temperatures to consider (often logarithmic)
  4. Every n_step test the exchange of adjacent systems. In case of success, of course don't change the index of systems but only the temperatures. Integrators are already able to accept different temperatures for a batched system.
  5. Update velocities in case of success
  6. (Most important step) save efficiently the trajectories so that it's easy to access the trajectories for all temperatures or a chosen temperature (most of the time the lowest temperature).Note:
  • this approach works both for NVT or NPT simulations.
  • I suspect NVT Nosé Hoover may not work properly. Or at least maybe the thermostat (extended variable) need to be rescaled or reset. But I don't have proof for that.
  • Actually the swap does not need to be between adjacent, it's often an approximation as the probability of swapping is exponentially low.

References:

  • GROMACS: https://manual.gromacs.org/documentation/2024.0/reference-manual/algorithms/replica-exchange.html
  • K. Hukushima and K. Nemoto, “Exchange Monte Carlo Method and Application to Spin Glass Simulations,” J. Phys. Soc. Jpn., 65 1604–1608 (1996). -> Apply for Monte Carlo simulations, no thermostat
  • Y. Sugita and Y. Okamoto, “Replica-exchange molecular dynamics method for protein folding,” Chem. Phys. Lett., 314 141–151 (1999). -> MD simulation but thermostat only relevant for perfect gaz, as far as I understood.
Ngôn ngữ chính
Python
Star
502
Fork
108
Merge trung bình
1 ngày 1 giờ
Pull request đã merge (30 ngày)
12

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của TorchSim/torch-sim

Tất cả issue của TorchSim/torch-sim

Issue tương tự

Thêm issue về Python

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.