sweetpea.core.generate.tools.unigen module¶
This module provides functionality for calling the third-party Unigen tool.
Unigen is a state-of-the-art, almost-uniform SAT sampler that uses CryptoMiniSAT to solve SAT problems. SweetPea uses Unigen for a few processes.
- exception sweetpea.core.generate.tools.unigen.UnigenError(returncode, stdout, stderr)¶
Bases:
sweetpea.core.generate.tools.tool_error.ToolError
An error raised when Unigen fails.
- sweetpea.core.generate.tools.unigen.call_unigen(sample_count, input_file, docker_mode=False, download_if_missing=True)¶
Calls Unigen with the given file as input.
If
docker_mode
isTrue
, this will use a Docker container to run Unigen. If it’sFalse
, a command-line executable will be used.If
docker_mode
isFalse
and no local Unigen executable can be found, and ifdownload_if_missing
isTrue
, the needed executable will be automatically downloaded if it’s missing.- Parameters
sample_count (int) –
input_file (pathlib.Path) –
docker_mode (bool) –
download_if_missing (bool) –
- Return type