.. _sphx_glr_examples_advanced: Advanced Examples ================= These examples are for users who want to extend the nvalchemi-toolkit framework. They require understanding of the intermediate tier. **01 — Biased Potential**: BiasedPotentialHook for harmonic COM restraints and umbrella sampling patterns. **02 — Custom Hook**: Implementing the Hook protocol with a full radial distribution function accumulator. **03 — Custom Convergence**: ConvergenceHook with multiple criteria and custom_op for arbitrary convergence logic. **04 — MACE NVT**: Using a real MACE MLIP for NVT dynamics; automatic neighbor list wiring via ModelCard; LJ fallback for CI. **05 — Custom Integrator**: Subclassing BaseDynamics to implement a velocity-rescaling thermostat; the pre_update/post_update contract; _init_state for stateful integrators. .. raw:: html
.. thumbnail-parent-div-open .. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_01_biased_potential_thumb.png :alt: :doc:`/examples/advanced/01_biased_potential` .. raw:: html
Biased Sampling with BiasedPotentialHook
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_02_custom_hook_thumb.png :alt: :doc:`/examples/advanced/02_custom_hook` .. raw:: html
Writing a Custom Hook: Radial Distribution Function
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_03_custom_convergence_thumb.png :alt: :doc:`/examples/advanced/03_custom_convergence` .. raw:: html
Multi-Criteria Convergence with Custom Operators
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_04_mace_nvt_thumb.png :alt: :doc:`/examples/advanced/04_mace_nvt` .. raw:: html
NVT MD with MACE (with LJ Fallback)
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_05_custom_integrator_thumb.png :alt: :doc:`/examples/advanced/05_custom_integrator` .. raw:: html
Building a Custom Integrator by Subclassing BaseDynamics
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_06_ewald_electrostatics_thumb.png :alt: :doc:`/examples/advanced/06_ewald_electrostatics` .. raw:: html
Long-Range Electrostatics with Ewald Summation
.. raw:: html
.. only:: html .. image:: /examples/advanced/images/thumb/sphx_glr_07_composable_model_composition_thumb.png :alt: :doc:`/examples/advanced/07_composable_model_composition` .. raw:: html
Composable Model Composition (LJ + Ewald)
.. thumbnail-parent-div-close .. raw:: html
.. toctree:: :hidden: /examples/advanced/01_biased_potential /examples/advanced/02_custom_hook /examples/advanced/03_custom_convergence /examples/advanced/04_mace_nvt /examples/advanced/05_custom_integrator /examples/advanced/06_ewald_electrostatics /examples/advanced/07_composable_model_composition