Skip to content

Constructor(reaction)


bigsmiles.constructors.constructor_reaction.parse_reaction(text)

Main entry point to parsing reaction SMILES.

Regular Expression Pattern

pattern: r"(?<![)(>>|>)"

PARAMETER DESCRIPTION
text

reaction BigSMILES string

TYPE: str

RETURNS DESCRIPTION
reactants

reactants

TYPE: list[BigSMILES]

agents

agents

TYPE: list[BigSMILES]

products

products

TYPE: list[BigSMILES]

bigsmiles.constructors.constructor_reaction.split_chemical(bigsmiles_)

Tries to split a BigSMILES at disconnects '.' if it thinks they are different molecules/polymers.

If it can't determine, it won't do anything.

PARAMETER DESCRIPTION
bigsmiles_

bigsmiles which may or may not be made of multiple molecules/polymers seperated by disconnect notation '.'

TYPE: BigSMILES

RETURNS DESCRIPTION
results

list of BigSMILES of individual molecules/polymers

TYPE: list[BigSMILES]