Skip to content

Comments

Implement first pass at duecredit#459

Merged
CompRhys merged 9 commits intomainfrom
due-credit
Feb 23, 2026
Merged

Implement first pass at duecredit#459
CompRhys merged 9 commits intomainfrom
due-credit

Conversation

@CompRhys
Copy link
Member

@CompRhys CompRhys commented Feb 21, 2026

Adds due credit to TS. See Readme for how to generate this output.

(base) ➜  torch-sim git:(due-credit) ✗ DUECREDIT_ENABLE=yes uv run --with . --extra docs --extra test python -m duecredit <(printf 'import pytest\nraise SystemExit(pytest.main(["-q"]))\n')
.............................................................................................. [ 13%]
...................................................s.......................................... [ 27%]
.............................................................................................. [ 41%]
...................................................................s..s..s.................... [ 55%]
.............................................................................................. [ 68%]
.............................................................................................. [ 82%]
.............................................................................................. [ 96%]
.........................                                                                      [100%]
679 passed, 15 skipped in 71.61s (0:01:11)
/Users/radical-rhys/.cache/uv/archive-v0/zMth5rWx8Ta1vShpZ4Ce9/lib/python3.12/site-packages/tables/file.py:130: UnclosedFileWarning: Closing remaining open file: /private/var/folders/nl/sh8rg5qn11b4f5g6lgn35m380000gn/T/pytest-of-radical-rhys/pytest-21/test_report_no_properties0/no_properties.hdf5
  warnings.warn(UnclosedFileWarning(msg))
/Users/radical-rhys/.cache/uv/archive-v0/zMth5rWx8Ta1vShpZ4Ce9/lib/python3.12/site-packages/tables/file.py:130: UnclosedFileWarning: Closing remaining open file: /var/folders/nl/sh8rg5qn11b4f5g6lgn35m380000gn/T/tmpx8_gq993/uneven_integrate_trajectory_1.h5
  warnings.warn(UnclosedFileWarning(msg))
/Users/radical-rhys/.cache/uv/archive-v0/zMth5rWx8Ta1vShpZ4Ce9/lib/python3.12/site-packages/tables/file.py:130: UnclosedFileWarning: Closing remaining open file: /var/folders/nl/sh8rg5qn11b4f5g6lgn35m380000gn/T/tmpx8_gq993/uneven_integrate_trajectory_0.h5
  warnings.warn(UnclosedFileWarning(msg))

DueCredit Report:
- None / ase (v 3.26.0) [1]
- Scientific tools library / numpy (v 2.3.3) [2]
- None / phonopy (v 2.43.2) [3]
- None / pymatgen (v 2025.6.14) [4]
  - Numerically stable algorithms for the computation of reduced unit cells / pymatgen.core.lattice:get_niggli_reduced_lattice (v 2025.6.14) [5]
- PyTorch deep learning framework / torch (v 2.9.1) [6]
- TorchSim simulation engine / torch_sim (v 0.2.0) [7]
  - None / torch_sim.integrators.md:construct_nose_hoover_chain (v 0.2.0) [8, 9, 10]
  - None / torch_sim.integrators.npt:npt_crescale_anisotropic_step (v 0.2.0) [11, 12]
  - None / torch_sim.integrators.npt:npt_crescale_isotropic_step (v 0.2.0) [11]
  - None / torch_sim.integrators.npt:npt_langevin_step (v 0.2.0) [13]
  - None / torch_sim.integrators.npt:npt_nose_hoover_step (v 0.2.0) [14]
  - None / torch_sim.integrators.nvt:nvt_langevin_step (v 0.2.0) [15]
  - None / torch_sim.integrators.nvt:nvt_nose_hoover_step (v 0.2.0) [14]
  - None / torch_sim.integrators.nvt:nvt_vrescale_step (v 0.2.0) [16]
  - None / torch_sim.math:_matrix_log_33 (v 0.2.0) [17]
  - None / torch_sim.math:expm_frechet_block_enlarge (v 0.2.0) [18]
  - None / torch_sim.math:expm_frechet_sps (v 0.2.0) [19]
  - None / torch_sim.optimizers.fire:fire_init (v 0.2.0) [20]

6 packages cited
0 modules cited
13 functions cited

References
----------

[1] Hjorth Larsen, A. et al., 2017. The atomic simulation environment—a Python library for working with atoms. Journal of Physics: Condensed Matter, 29(27), p.273002.
[2] Van Der Walt, S., Colbert, S.C. & Varoquaux, G., 2011. The NumPy array: a structure for efficient numerical computation. Computing in Science & Engineering, 13(2), pp.22–30.
[3] Togo, A. & Tanaka, I., 2015. First principles phonon calculations in materials science. Scripta Materialia, 108, pp.1–5.
[4] Ong, S.P. et al., 2013. Python Materials Genomics (pymatgen): A robust, open-source python library for materials analysis. Computational Materials Science, 68, pp.314–319.
[5] Grosse-Kunstleve, R.W., Sauter, N.K. & Adams, P.D., 2003. Numerically stable algorithms for the computation of reduced unit cells. Acta Crystallographica Section A Foundations of Crystallography, 60(1), pp.1–6.
[6] Paszke, A. et al., 2019. PyTorch: An Imperative Style, High-Performance Deep Learning Library. In Advances in Neural Information Processing Systems.
[7] Cohen, O. et al., 2025. TorchSim: An efficient atomistic simulation engine in PyTorch. AI for Science, 1(2), p.025003.
[8] Martyna, G.J., Klein, M.L. & Tuckerman, M., 1992. Nosé–Hoover chains: The canonical ensemble via continuous dynamics. The Journal of Chemical Physics, 97(4), pp.2635–2643.
[9] SUZUKI, M., 1993. General Decomposition Theory of Ordered Exponentials.. Proceedings of the Japan Academy, Series B, 69(7), pp.161–166.
[10] Yoshida, H., 1990. Construction of higher order symplectic integrators. Physics Letters A, 150(5--7), pp.262–268.
[11] Bernetti, M. & Bussi, G., 2020. Pressure control using stochastic cell rescaling. The Journal of Chemical Physics, 153(11).
[12] Del Tatto, V. et al., 2022. Molecular Dynamics of Solids at Constant Pressure and Stress Using Anisotropic Stochastic Cell Rescaling. Applied Sciences, 12(3), p.1139.
[13] Grønbech-Jensen, N. & Farago, O., 2014. Constant pressure and temperature discrete-time Langevin molecular dynamics. The Journal of Chemical Physics, 141(19).
[14] Martyna, G.J. et al., 1996. Explicit reversible integrators for extended systems dynamics. Molecular Physics, 87(5), pp.1117–1157.
[15] Leimkuhler, B. & Matthews, C., 2016. Efficient molecular dynamics using geodesic integration and solvent–solute splitting. Proceedings of the Royal Society A: Mathematical, Physical and Engineering Sciences, 472(2189), p.20160138.
[16] Bussi, G., Donadio, D. & Parrinello, M., 2007. Canonical sampling through velocity rescaling. The Journal of Chemical Physics, 126(1).
[17] Jog, C.S., 2008. The Explicit Determination of the Logarithm of a Tensor and Its Derivatives. Journal of Elasticity, 93(2), pp.141–148.
[18] Higham, N.J., 2008. Functions of Matrices: Theory and Computation, Society for Industrial and Applied Mathematics.
[19] Al-Mohy, A.H. & Higham, N.J., 2009. Computing the Fréchet Derivative of the Matrix Exponential, with an Application to Condition Number Estimation. SIAM Journal on Matrix Analysis and Applications, 30(4), pp.1639–1657.
[20] Bitzek, E. et al., 2006. Structural Relaxation Made Simple. Physical Review Letters, 97(17).

@CompRhys CompRhys added the keep-open PRs to be ignored by StaleBot label Feb 21, 2026
@CompRhys
Copy link
Member Author

Note that I added the dependency to docs as there may be a runtime overhead to having duecredit installed.

@CompRhys CompRhys requested a review from orionarcher February 21, 2026 20:05
@CompRhys CompRhys marked this pull request as ready for review February 21, 2026 23:41
Copy link
Collaborator

@orionarcher orionarcher left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks @CompRhys, much needed addition.

@CompRhys CompRhys merged commit 725eaaf into main Feb 23, 2026
68 checks passed
@CompRhys CompRhys deleted the due-credit branch February 23, 2026 15:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

keep-open PRs to be ignored by StaleBot

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cite reference implementations for integrators and optimizers when appropriate

2 participants