tune_mmff_optimize#

nvmolkit.autotune.tune_mmff_optimize(
molecules: list[Mol],
*,
maxIters: int = 200,
properties: MMFFMolProperties | Sequence[MMFFMolProperties | None] | None = None,
nonBondedThreshold: float | Sequence[float] = 100.0,
ignoreInterfragInteractions: bool | Sequence[bool] = True,
gpuIds: Iterable[int] | None = None,
calibration_set: Iterable[int] | None = None,
calibration_fraction: float = 0.1,
calibration_max_size: int = 2000,
target_seconds_per_trial: float = 10.0,
n_trials: int = 30,
search_space_overrides: dict[str, Any] | None = None,
cpu_budget: int | None = None,
sampler: Any = None,
seed: int | None = None,
verbose: bool = False,
) TuneResult#

Tune HardwareOptions for MMFFOptimizeMoleculesConfs().

Each trial clones the calibration molecules (preserving their conformers) and runs MMFF optimization with the trial-suggested hardware options.

Parameters:
  • molecules – Workload of pre-embedded RDKit molecules. Each molecule must already contain the conformers to optimize.

  • maxItersmaxIters argument forwarded to each trial.

  • propertiesproperties argument forwarded to each trial. If a per-molecule sequence is provided, it must match len(molecules) (the wrapper subsets it for each trial).

  • nonBondedThresholdnonBondedThreshold forwarded to each trial. Accepts a scalar or per-molecule sequence.

  • ignoreInterfragInteractionsignoreInterfragInteractions forwarded to each trial.

  • gpuIds – GPU device IDs to use. Fixed across the study.

  • calibration_set – Optional explicit indices into molecules.

  • calibration_fraction – Fraction of the workload to auto-sample.

  • calibration_max_size – Cap on the auto-sampled calibration size.

  • target_seconds_per_trial – Target wall-clock budget for one trial.

  • n_trials – Number of Optuna trials to run after warm-up.

  • search_space_overrides – Optional overrides for batchSize / batchesPerGpu ranges.

  • cpu_budget – Optional explicit cap on total CPU threads. The default (None) uses os.cpu_count(). Set this when normalizing tuning runs across machines with different core counts so the search space stays comparable.

  • sampler – Optional Optuna sampler.

  • seed – Seed for the default sampler.

  • verbose – Print warm-up and trial diagnostics.

Returns:

TuneResult with best_config set to a fully-populated HardwareOptions instance.