Skip to content

feat(md): add CSVR thermostat for NVT molecular dynamics#7461

Open
mintleaf84 wants to merge 4 commits into
deepmodeling:developfrom
mintleaf84:feat-csvr-thermostat
Open

feat(md): add CSVR thermostat for NVT molecular dynamics#7461
mintleaf84 wants to merge 4 commits into
deepmodeling:developfrom
mintleaf84:feat-csvr-thermostat

Conversation

@mintleaf84

Copy link
Copy Markdown

Reminder

  • Have you linked an issue with this pull request?
  • Have you added adequate unit tests and/or case tests for your pull request?
  • Have you noticed possible changes of behavior below or in the linked issue?
  • Have you explained the changes of codes in core modules of ESolver, HSolver, ElecState, Hamilt, Operator or Psi? (ignore if not applicable)

Linked Issue

Implements #6941

Unit Tests and/or Case Tests for my changes

  • Added CSVR test case in source/source_md/test/verlet_test.cpp
  • Test passed locally: [PASSED] 1 test

What's changed?

Implement the Canonical Sampling through Velocity Rescaling (CSVR) thermostat as described in:
G. Bussi, D. Donadio, M. Parrinello, J. Chem. Phys. 126, 014101 (2007)

Features:

  • New thermostat option: md_thermostat = csvr
  • New parameter: md_csvr_tau (characteristic time scale, default: 100.0 fs)
  • Properly samples the canonical (NVT) ensemble
  • Simple implementation with only one parameter

Usage:

md_type nvt
md_thermostat csvr
md_csvr_tau 100.0  # characteristic time scale in fs

Changed Files

File Change
source/source_io/module_parameter/md_parameter.h Add md_csvr_tau parameter
source/source_io/module_parameter/read_input_item_md.cpp Add parameter parsing for md_csvr_tau
source/source_md/verlet.h Add apply_csvr() function declaration
source/source_md/verlet.cpp Implement CSVR thermostat algorithm
source/source_md/test/verlet_test.cpp Add CSVR unit test
docs/advanced/input_files/input-main.md Add CSVR documentation

Any changes of core modules? (ignore if not applicable)

No changes to core modules. The modification is only in the MD module.

Implement the Canonical Sampling through Velocity Rescaling (CSVR)
thermostat as described in:
G. Bussi, D. Donadio, M. Parrinello, J. Chem. Phys. 126, 014101 (2007)

Features:
- New thermostat option: md_thermostat = csvr
- New parameter: md_csvr_tau (characteristic time scale)
- Properly samples the canonical (NVT) ensemble
- Simple implementation with only one parameter

Implements deepmodeling#6941
- Add csvr option to md_thermostat parameter description
- Add md_csvr_tau parameter documentation

Implements deepmodeling#6941
Add CSVR thermostat test case to verlet_test.cpp:
- Test position update correctness
- Verify temperature is in reasonable range

Implements deepmodeling#6941
@mohanchen mohanchen added Feature Discussed The features will be discussed first but will not be implemented soon Refactor Refactor ABACUS codes MD & LAM MD and Larege Atomic Models labels Jun 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Discussed The features will be discussed first but will not be implemented soon MD & LAM MD and Larege Atomic Models Refactor Refactor ABACUS codes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants