jax_dna.simulators.oxdna.utils ============================== .. py:module:: jax_dna.simulators.oxdna.utils .. autoapi-nested-parse:: Utilities for the oxDNA simulator. Attributes ---------- .. autoapisummary:: jax_dna.simulators.oxdna.utils.ERR_CANNOT_PROCESS_SRC_H jax_dna.simulators.oxdna.utils.ERR_INVALID_HEADER_TYPE jax_dna.simulators.oxdna.utils.SYMPY_EVAL_N jax_dna.simulators.oxdna.utils.DEFAULT_OXDNA_VARIABLE_MAPPER jax_dna.simulators.oxdna.utils.MIN_VALID_HEADER_TOKEN_COUNT Functions --------- .. autoapisummary:: jax_dna.simulators.oxdna.utils._parse_value_in jax_dna.simulators.oxdna.utils._parse_value_out jax_dna.simulators.oxdna.utils.read_src_h jax_dna.simulators.oxdna.utils.write_src_h jax_dna.simulators.oxdna.utils.update_params Module Contents --------------- .. py:data:: ERR_CANNOT_PROCESS_SRC_H :value: 'Cannot process src/model.h file. Failed parsing: {}' .. py:data:: ERR_INVALID_HEADER_TYPE :value: 'Invalid header value variable {} with value {}' .. py:data:: SYMPY_EVAL_N :type: int :value: 32 .. py:data:: DEFAULT_OXDNA_VARIABLE_MAPPER .. py:data:: MIN_VALID_HEADER_TOKEN_COUNT :value: 3 .. py:function:: _parse_value_in(value: str) -> int | float | str .. py:function:: _parse_value_out(value: int | float | str) -> str .. py:function:: read_src_h(src_h: pathlib.Path) -> dict[str, int | float | str] Parse the src/model.h file to get the parameters. .. py:function:: write_src_h(src_h: pathlib.Path, params: dict[str, tuple[jax_dna.utils.types.oxDNAModelHType, int | float | str]]) -> None Write the src/model.h file with the new parameters. .. py:function:: update_params(src_h: pathlib.Path, new_params: list[jax_dna.utils.types.Params]) -> None Update the src/model.h file with the new parameters.