Calculators#
ASE calculators are not thread-safe. Each thread needs its own calculator. Sharing one calculator across threads is not supported.
rgmin guarantees three things. A SolverConfig can be shared. A
Solver is entered by one thread, and a second call raises
RuntimeError. The objective is handed its own copy of the
coordinates.
The optimizer keeps a lock around calls on one calculator unless that
calculator sets reentrant to true. The lock only stops those calls
from overlapping. It does not make the calculator safe to share.
import rgmin does not import ASE. The ASE classes live in rgmin.ase.
Results#
The trajectory of one solver does not depend on how many Python threads or how many Rayon threads are running other solvers. The default build does not turn on the Rust parallel feature, so extra threads do not speed up a single solve.