anneal anneal anneal
    • eindir Typed primitives for ND objectives and sampling (used by anneal)
    • rgpycrumbs Chemical physics utilities and visualization
/

Getting started

  • Quickstart
  • Classical Presets
  • Cluster Search
  • Bayesian Pilot and Mixer
  • GLE Colored-Noise Langevin
  • Prerequisites
  • Step 1: Define obj + grad
  • Step 2: Call gle_langevin (the exposed driver)
  • Step 3: The thermostat inside (what the algebra buys)
  • Why this works
  • Polish, Device, and Scale

How-to Guides

  • Installation
  • Decision Tree
  • Three Channels
  • How do I pick between the presets?
  • What is the Bayesian mixer and when does it help?
  • Do I need to supply a gradient?
  • Precision and float16/float32 policy?
  • Reproducibility guarantees?
  • FAQ

Explanation

  • Architecture
  • The five components (signatures)
  • The four laws (plain English)
  • Reuse table (the concrete payoff)
  • How every advanced driver is still just the algebra
  • Bayesian Pilot and Mixer Details
  • GLE Mechanics

Reference

  • Specification
  • Rust API Reference
  • Rust API (anneal-core)
    • Crate anneal_core
      • mod accept
      • mod adapter
      • mod allocate
      • mod bias
      • mod calibrate
      • mod catalog
      • mod construct
      • mod contextual
      • mod cool
      • mod curvature
      • mod delayed
      • mod diversity
      • mod dos
      • mod error
      • mod exchange
      • mod floors
      • mod free_energy
      • mod funnel_bo
      • mod funnel_spectral
      • mod grad
      • mod graphkey
      • mod history
      • mod hmc
        • mod integrator
        • mod momentum
        • mod nuts
        • mod sampler
      • mod lattice
      • mod laws
      • mod localkey
      • mod methods
        • mod activation
        • mod archive_search
        • mod bank
        • mod cluster_hopping
        • mod cluster_search
        • mod committor_pop
        • mod csa_cluster
        • mod ffs
        • mod minima_hopping
        • mod nested
        • mod splice
        • mod additive_independence
        • mod amsa
        • mod bayesian_mixing
        • mod bayesian_pilot
        • mod bfwt
        • mod dmc_population
        • mod gle_langevin
        • mod gpmd
        • mod local_polish
        • mod mcmc_sa
        • mod parallel_tempering
        • mod portfolio
        • mod regime
        • mod routing_probe
        • mod sketchmap
        • mod tpe
        • mod tps_shoot
        • mod warm_lbfgs
      • mod model_hessian
      • mod movekernel
      • mod neigh
      • mod neighbors
      • mod noise_accept
      • mod path
      • mod potentials
      • mod quench
      • mod residual_field
      • mod runner
      • mod sampler
      • mod screen
      • mod ace
      • mod soap
      • mod spectral
      • mod structure
      • mod symmetrise
      • mod terminate
      • mod twin
      • mod types
      • mod variant
      • mod version
      • mod ffi
      • mod shape
      • mod python
  • Glossary
  • Classical (values only)
  • Pilot and low-discrepancy
  • Polish
  • Advanced drivers
  • Device and ensemble (same kernel)
  • Hamiltonian Monte Carlo (HMC) / quasi-Monte Carlo (QMC) variants (also exposed)
  • Bindings
  • Device backend, ensembles, and noise-aware acceptance
  • Changelog
  • Used By

Development

  • Contributing
  • Best Practices for anneal
  • Code of Conduct

On this page

  • Direct quantum-chemistry profiles
HaoZeke/anneal 0 0
Edit this page
  1. anneal /
  2. Cluster Search
View Source Open in ChatGPT Open in Claude

Cluster Search¶

Install the package, then run a 38-point Lennard-Jones search with the measured configuration.

pip install anneal
import numpy as np
from anneal import Config, cluster_search

def lj(x):
    p = x.reshape(-1, 3)
    d = p[:, None] - p
    r2 = (d * d).sum(-1)
    iu = np.triu_indices(len(p), 1)
    inv6 = (1.0 / r2[iu]) ** 3
    return float(4.0 * np.sum(inv6 * inv6 - inv6))

def lj_g(x):
    p = x.reshape(-1, 3)
    d = p[:, None] - p
    r2 = (d * d).sum(-1)
    np.fill_diagonal(r2, np.inf)
    inv2 = 1.0 / r2
    inv6 = inv2 ** 3
    c = 24.0 * inv2 * (2.0 * inv6 * inv6 - inv6)
    return np.einsum("ij,ijk->ik", c, d).ravel()

cfg = Config.recommended(38)
out = cluster_search(lj, lj_g, cfg.n_points, 4000, seed=0, recommended=True)
print(out["hops"], round(out["best_energy"], 3), len(out["best"]))

Expected output (seed 0)::

PLACEHOLDER

Direct quantum-chemistry profiles¶

The molecular-cluster and slab examples use the same persistent ProfileEngine. The adapter loads a conforming potential library once, turns each energy-and-force result into the optimizer’s value-and-gradient pair, and owns the session for the full hop loop. Selecting nwchemc calls libnwchemc in process; no RPC server or result cache participates. Molecular requests omit a simulation cell and slab requests carry their periodic cell through the same request type.

POTENTIAL_CONFIG=/path/to/PotentialConfig.bin \
POTENTIAL_LIBRARY=/path/to/libnwchemc.so \
cargo run --locked --release --features rgpot-ex \
  --example molecular_cluster -- 6 1200 8 nwchemc

The shared adapter is examples/common/profile_engine.rs. The molecular and periodic consumers are examples/molecular_cluster.rs and examples/slab_adsorption.rs.

Previous
Classical Presets
Next
Bayesian Pilot and Mixer

2026--present, anneal developers

Made with Sphinx and Shibuya theme.