jax_dna.simulators.oxdna

oxDNA simulator module.

Submodules

Attributes

BIN_PATH_ENV_VAR

BUILD_PATH_ENV_VAR

CMAKE_BIN_ENV_VAR

ERR_BIN_PATH_NOT_SET

ERR_BUILD_PATH_NOT_SET

ERR_BUILD_SETUP_FAILED

ERR_INPUT_FILE_NOT_FOUND

ERR_MISSING_REQUIRED_KEYS

MAKE_BIN_ENV_VAR

Classes

oxDNABinarySemaphore

A semaphore for the oxDNA binary.

oxDNABinarySemaphoreActor

A ray actor wrapped oxDNA binary semaphore.

oxDNASimulator

A sampler base on running an oxDNA simulation.

Functions

_guess_binary_location(→ pathlib.Path | None)

Guess the location of a binary.

Package Contents

jax_dna.simulators.oxdna.BIN_PATH_ENV_VAR = 'OXDNA_BIN_PATH'
jax_dna.simulators.oxdna.BUILD_PATH_ENV_VAR = 'OXDNA_BUILD_PATH'
jax_dna.simulators.oxdna.CMAKE_BIN_ENV_VAR = 'CMAKE_BIN_PATH'
jax_dna.simulators.oxdna.ERR_BIN_PATH_NOT_SET = 'OXDNA_BIN_PATH environment variable not set'
jax_dna.simulators.oxdna.ERR_BUILD_PATH_NOT_SET = 'OXDNA_BUILD_PATH environment variable not set'
jax_dna.simulators.oxdna.ERR_BUILD_SETUP_FAILED = 'OXDNA build setup failed wiht return code: {}'
jax_dna.simulators.oxdna.ERR_INPUT_FILE_NOT_FOUND = 'Input file not found: {}'
jax_dna.simulators.oxdna.ERR_MISSING_REQUIRED_KEYS = 'Missing required keys: {}'
jax_dna.simulators.oxdna.MAKE_BIN_ENV_VAR = 'MAKE_BIN_PATH'
jax_dna.simulators.oxdna._guess_binary_location(bin_name: str, env_var: str) pathlib.Path | None[source]

Guess the location of a binary.

class jax_dna.simulators.oxdna.oxDNABinarySemaphore[source]

A semaphore for the oxDNA binary.

_ready = False
check() bool[source]

Check if the semaphore is ready.

set(ready: bool) None[source]

Set the value of the semaphore.

class jax_dna.simulators.oxdna.oxDNABinarySemaphoreActor[source]

Bases: oxDNABinarySemaphore

A ray actor wrapped oxDNA binary semaphore.

class jax_dna.simulators.oxdna.oxDNASimulator[source]

Bases: jax_dna.simulators.base.BaseSimulation

A sampler base on running an oxDNA simulation.

input_dir: str
sim_type: jax_dna.utils.types.oxDNASimulatorType
energy_configs: list[jax_dna.energy.configuration.BaseConfiguration] | None = None
n_build_threads: int = 4
logger_config: dict[str, Any] | None = None
disable_build: bool = False
check_build_ready: collections.abc.Callable[[None], bool]
set_build_ready: collections.abc.Callable[[bool], None]
build_wait_interval: int = 15
__post_init__(*args, **kwds) None[source]

Check the validity of the configuration.

_initialize_logger() None[source]
run(opt_params: list[jax_dna.utils.types.Params] | None = None, seed: numpy.ndarray | None = None, **kwargs) jax_dna.input.trajectory.Trajectory[source]

Run an oxDNA simulation.

_update_params(*, new_params: list[dict]) None[source]

Update the simulation.

This function will recompile the oxDNA binary with the new parameters.

_restore_params() None[source]

Restore the original parameters.