Significantly consolidate scripts to speed up testing.#385
Merged
Conversation
curtischong
reviewed
Dec 20, 2025
| - **Issues**: Report problems at the TorchSim GitHub repository | ||
| - **Questions**: Check existing issues or open a new discussion | ||
|
|
||
| ## Differences from Original Examples |
curtischong
reviewed
Dec 20, 2025
| - Dynamic autobatching for memory optimization | ||
| - Mixed system sizes in single batch | ||
|
|
||
| ## Tips for Best Performance |
Collaborator
There was a problem hiding this comment.
maybe we should rewrite this to reflect actual best tips. (although I can see this changing over time when we add more sophisticated autobatching)
curtischong
reviewed
Dec 20, 2025
|
|
||
| # Method 2: N^2 neighbor list (simple but slower) | ||
| print("\nCalculating neighbor lists with N^2 method...") | ||
| mapping_n2, mapping_system_n2, shifts_idx_n2 = torch_nl_n2( |
Collaborator
There was a problem hiding this comment.
not sure if we want to update this or not to a newer neighbor list
curtischong
approved these changes
Dec 20, 2025
Collaborator
curtischong
left a comment
There was a problem hiding this comment.
I think this is fine. I'm going to put this here to note down what was removed
• They consolidated the examples into 6 new top-level scripts but deleted 36 files. Several capabilities are now gone with no equivalent in the new scripts:
- Missing models/examples: examples/scripts/1_Introduction/1.3_fairchem.py (FairChem batching) and examples/scripts/2_Structural_optimization/2.2_Soft_Sphere_FIRE.py (soft-sphere potential) never reappear.
- Dynamics gaps: hybrid swap MC (3_Dynamics/3.10_Hybrid_swap_mc.py), MACE NVE with cueq (3_Dynamics/3.3_MACE_NVE_cueq.py), non-PBC NVE (3.13_MACE_NVE_non_pbc.py), NVT staggered stress
(3.9_MACE_NVT_staggered_stress.py), Nose-Hoover temperature profile (3.6_MACE_NVT_Nose_Hoover_temp_profile.py), both Lennard-Jones and MACE NPT Langevin (3.11 and 3.12), and LJ NPT Nose-Hoover (3.7) are all
removed and not represented in examples/scripts/3_dynamics.py. - Workflows: the a2c silicon workflow (5_Workflow/5.1_a2c_silicon_batched.py) and the WBM-specific in-flight workflow (5_Workflow/5.2_In_Flight_WBM.py) are gone; the new examples/scripts/5_workflow.py only
covers autobatching + elastic constants. - Phonons: quasi-harmonic and conductivity examples (6_Phonons/6.2_QuasiHarmonic_MACE.py, 6_Phonons/6.3_Conductivity_MACE.py) are deleted and not replaced in examples/scripts/6_phonons.py (which only does DOS/
band structure). - Misc/analysis tools: soft-sphere autograd (7_Others/7.1_Soft_sphere_autograd.py), stress autograd (7.2), ASE vs VV FIRE comparison (7.6), and heat flux/thermal conductivity (7.7) are gone. examples/
scripts/7_others.py now only covers neighbor lists and VACF. - The README now claims “The original examples … remain available,” but the patch deletes them.
If those use cases are still needed, they were dropped rather than moved to the consolidated scripts.
Member
|
Fixed linting issues and lgtm. |
CompRhys
added a commit
that referenced
this pull request
Jan 9, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Checklist
Before a pull request can be merged, the following items must be checked: