A Rust library for building automated scanning probe microscopy routines, shipping with automated STM/AFM tip preparation as its first end-to-end routine.
Warning
The 0.3.x/0.4.x line is an experimental rewrite.
The control path was rebuilt around the SpmController trait and a new
action/event system, and it has not run on a real microscope yet: every test
in this release exercises MockController. The stability thresholds were
calibrated against the v1 code path and may need retuning.
Expect the API and the config format to keep moving until the rewrite gets machine time. For the last version that has run on hardware, see 0.2.3.
If you need a stable interface to program against today, use nanonis-rs, the Nanonis TCP client this library is built on, or the official Python package nanonis_spm from SPECS.
The core of rusty-tip is a library for writing SPM automation: a
hardware-abstraction trait (SpmController), a vocabulary of composable
actions with capability checking, an event stream for observability, and a
scriptable mock controller so routines can be developed and tested without
instrument time. Routines written against it are controller-agnostic; today
Nanonis (over TCP) is the only instrument backend, and the trait is the seam
for adding others.
The first routine built on this foundation, and the proof of concept for the
design, is automated tip preparation: pulse, reposition, measure the
frequency shift, repeat until the tip is sharp and provably stable. It ships
as a CLI (tip-prep) and a GUI (tip-prep-gui).
Pre-built binaries from GitHub Releases:
rusty-tip-x86_64-unknown-linux-gnu.tar.xz (Linux) or
rusty-tip-x86_64-pc-windows-msvc.zip (Windows).
From source:
cargo build --release # CLI tools
cargo build --release --features gui # + tip-prep-guiAs a library: cargo add rusty-tip.
tip-prep --config path/to/config.tomlA minimal config:
[nanonis]
host_ip = "127.0.0.1"
control_ports = [6501, 6502, 6503, 6504]
[data_acquisition]
data_port = 6590
sample_rate = 2000
[tip_prep]
sharp_tip_bounds = [-1.5, 0.0] # freq-shift window that counts as "sharp" (Hz)
max_cycles = 10000
max_duration_secs = 12000
initial_bias_v = -0.5
initial_z_setpoint_a = 100e-12
[pulse_method]
type = "fixed"
voltage = 4.0
polarity = "positive"tip-prep-gui provides the same routine with live plots and an editable
configuration, plus a simulation mode that runs against the mock controller
without hardware.
- Library guide — the action system, implementing
SpmControllerfor your hardware, writing routines of your own - Configuration reference — every section and field of the tip-prep config, pulse strategies, stability checking, TCP channel mapping
- How tip preparation works — the routine, cycle by cycle
- CHANGELOG — release notes
- Nanonis SPM controller with TCP interface enabled
- Configured TCP data logging (typically port 6590)
- Control ports accessible (typically 6501-6504)
MIT