Skip to content

Conversation

@orionarcher
Copy link
Collaborator

Summary

  • Condensed each folder of examples/scripts, 1_Introduction ... 7_Others into a single script, e.g. 1_introduction.py ... 7_others.py. Any duplicate or redundant content was removed.
  • A new readme.md summarizes the examples available in each of the scripts.

Checklist

Before a pull request can be merged, the following items must be checked:

  • Doc strings have been added in the Google docstring format.
  • Run ruff on your code.
  • Tests have been added for any new functionality or bug fixes.

- **Issues**: Report problems at the TorchSim GitHub repository
- **Questions**: Check existing issues or open a new discussion

## Differences from Original Examples
Copy link
Collaborator

Choose a reason for hiding this comment

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

vibecoded ;)

- Dynamic autobatching for memory optimization
- Mixed system sizes in single batch

## Tips for Best Performance
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe we should rewrite this to reflect actual best tips. (although I can see this changing over time when we add more sophisticated autobatching)


# 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(
Copy link
Collaborator

Choose a reason for hiding this comment

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

not sure if we want to update this or not to a newer neighbor list

Copy link
Collaborator

@curtischong curtischong left a comment

Choose a reason for hiding this comment

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

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.

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.

3 participants