jax_dna.simulators.oxdna ======================== .. py:module:: jax_dna.simulators.oxdna .. autoapi-nested-parse:: oxDNA simulator module. Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/jax_dna/simulators/oxdna/oxdna/index /autoapi/jax_dna/simulators/oxdna/utils/index Attributes ---------- .. autoapisummary:: jax_dna.simulators.oxdna.BIN_PATH_ENV_VAR jax_dna.simulators.oxdna.BUILD_PATH_ENV_VAR jax_dna.simulators.oxdna.CMAKE_BIN_ENV_VAR jax_dna.simulators.oxdna.ERR_BIN_PATH_NOT_SET jax_dna.simulators.oxdna.ERR_BUILD_PATH_NOT_SET jax_dna.simulators.oxdna.ERR_BUILD_SETUP_FAILED jax_dna.simulators.oxdna.ERR_INPUT_FILE_NOT_FOUND jax_dna.simulators.oxdna.ERR_MISSING_REQUIRED_KEYS jax_dna.simulators.oxdna.MAKE_BIN_ENV_VAR Classes ------- .. autoapisummary:: jax_dna.simulators.oxdna.oxDNABinarySemaphore jax_dna.simulators.oxdna.oxDNABinarySemaphoreActor jax_dna.simulators.oxdna.oxDNASimulator Functions --------- .. autoapisummary:: jax_dna.simulators.oxdna._guess_binary_location Package Contents ---------------- .. py:data:: BIN_PATH_ENV_VAR :value: 'OXDNA_BIN_PATH' .. py:data:: BUILD_PATH_ENV_VAR :value: 'OXDNA_BUILD_PATH' .. py:data:: CMAKE_BIN_ENV_VAR :value: 'CMAKE_BIN_PATH' .. py:data:: ERR_BIN_PATH_NOT_SET :value: 'OXDNA_BIN_PATH environment variable not set' .. py:data:: ERR_BUILD_PATH_NOT_SET :value: 'OXDNA_BUILD_PATH environment variable not set' .. py:data:: ERR_BUILD_SETUP_FAILED :value: 'OXDNA build setup failed wiht return code: {}' .. py:data:: ERR_INPUT_FILE_NOT_FOUND :value: 'Input file not found: {}' .. py:data:: ERR_MISSING_REQUIRED_KEYS :value: 'Missing required keys: {}' .. py:data:: MAKE_BIN_ENV_VAR :value: 'MAKE_BIN_PATH' .. py:function:: _guess_binary_location(bin_name: str, env_var: str) -> pathlib.Path | None Guess the location of a binary. .. py:class:: oxDNABinarySemaphore A semaphore for the oxDNA binary. .. py:attribute:: _ready :value: False .. py:method:: check() -> bool Check if the semaphore is ready. .. py:method:: set(ready: bool) -> None Set the value of the semaphore. .. py:class:: oxDNABinarySemaphoreActor Bases: :py:obj:`oxDNABinarySemaphore` A ray actor wrapped oxDNA binary semaphore. .. py:class:: oxDNASimulator Bases: :py:obj:`jax_dna.simulators.base.BaseSimulation` A sampler base on running an oxDNA simulation. .. py:attribute:: input_dir :type: str .. py:attribute:: sim_type :type: jax_dna.utils.types.oxDNASimulatorType .. py:attribute:: energy_configs :type: list[jax_dna.energy.configuration.BaseConfiguration] | None :value: None .. py:attribute:: n_build_threads :type: int :value: 4 .. py:attribute:: logger_config :type: dict[str, Any] | None :value: None .. py:attribute:: disable_build :type: bool :value: False .. py:attribute:: check_build_ready :type: collections.abc.Callable[[None], bool] .. py:attribute:: set_build_ready :type: collections.abc.Callable[[bool], None] .. py:attribute:: build_wait_interval :type: int :value: 15 .. py:method:: __post_init__(*args, **kwds) -> None Check the validity of the configuration. .. py:method:: _initialize_logger() -> None .. py:method:: run(opt_params: list[jax_dna.utils.types.Params] | None = None, seed: numpy.ndarray | None = None, **kwargs) -> jax_dna.input.trajectory.Trajectory Run an oxDNA simulation. .. py:method:: _update_params(*, new_params: list[dict]) -> None Update the simulation. This function will recompile the oxDNA binary with the new parameters. .. py:method:: _restore_params() -> None Restore the original parameters.