rxnutils.routes.utils package¶
Submodules¶
rxnutils.routes.utils.validation module¶
Module containing routes to validate AiZynthFinder-like input dictionaries
- class rxnutils.routes.utils.validation.ReactionNode(**data)¶
Bases:
BaseModel
Node representing a reaction
- Parameters:
data (Any)
- type: Annotated[str, StringConstraints(pattern='^reaction$')]¶
- children: List[MoleculeNode]¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class rxnutils.routes.utils.validation.MoleculeNode(*, smiles, type, children=None)¶
Bases:
BaseModel
Node representing a molecule
- Parameters:
smiles (str)
type (Annotated[str, StringConstraints(strip_whitespace=None, to_upper=None, to_lower=None, strict=None, min_length=None, max_length=None, pattern=^mol$)])
children (Annotated[List[ReactionNode], Len(min_length=1, max_length=1)] | None)
- smiles: str¶
- type: Annotated[str, StringConstraints(pattern='^mol$')]¶
- children: conlist(ReactionNode, min_length=1, max_length=1) | None¶
- model_config: ClassVar[ConfigDict] = {}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- rxnutils.routes.utils.validation.validate_dict(dict_)¶
Check that the route dictionary is a valid structure
- Parameters:
dict – the route as dictionary
dict_ (Dict[str, Any])
- Return type:
None