Skip to content

Constructor(strings)


bigsmiles.constructors.constructor_str.add_atom_str(parent, symbol)

appends an Atom to the end of the parent

PARAMETER DESCRIPTION
parent

parent Atom will be added to

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

symbol

atom symbol - will be parsed into symbol, isotope, charge, etc.

TYPE: str

RETURNS DESCRIPTION
parent

returns same parent that was provided

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bigsmiles.constructors.constructor_str.add_bonding_descriptor_atom_str(parent, bd_symbol, bond_symbol=None)

appends an BondDescriptorAtom to the end of the parent

PARAMETER DESCRIPTION
parent

parent that the BondDescriptorAtom will be added to

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bd_symbol

bonding descriptor symbol - will be parsed into symbol, index

TYPE: str

bond_symbol

bond symbol ("", "=", "#", etc.)

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
parent

returns same parent that was provided

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bigsmiles.constructors.constructor_str.add_bond_atom_pair_str(parent, bond_symbol, atom_symbol)

appends an Bond followed by an 'Atom' to the end of the parent

PARAMETER DESCRIPTION
parent

parent that the Bond and Atom will be added to

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bond_symbol

bond symbol ("", "=", "#", etc.)

TYPE: str | None

atom_symbol

atom symbol - will be parsed into symbol, isotope, charge, etc.

TYPE: str

RETURNS DESCRIPTION
parent

returns same parent that was provided

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bigsmiles.constructors.constructor_str.add_bond_bonding_descriptor_pair_str(parent, bond_symbol, bd_symbol)

appends an Bond followed by an 'BondDescriptorAtom' to the end of the parent

PARAMETER DESCRIPTION
parent

parent that the Bond and BondDescriptorAtom will be added to

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bond_symbol

bond symbol ("", "=", "#", etc.)

TYPE: str | None

bd_symbol

bonding descriptor symbol - will be parsed into symbol, index

TYPE: str

RETURNS DESCRIPTION
parent

returns same parent that was provided

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bigsmiles.constructors.constructor_str.open_stochastic_object_fragment_str(parent, bd_symbol)

opens 'StochasticObject' followed by opening 'StochasticFragment'

PARAMETER DESCRIPTION
parent

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bd_symbol

bonding descriptor symbol - will be parsed into symbol, index

TYPE: str

RETURNS DESCRIPTION
parent

returns parent is stochastic fragment

TYPE: StochasticFragment

bigsmiles.constructors.constructor_str.open_stochastic_object_str(parent, bd_symbol)

opens 'StochasticObject'

PARAMETER DESCRIPTION
parent

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bd_symbol

bonding descriptor symbol - will be parsed into symbol, index

TYPE: str

RETURNS DESCRIPTION
parent

returns parent is stochastic object

TYPE: StochasticFragment

bigsmiles.constructors.constructor_str.open_stochastic_object_fragment_with_bond_str(parent, bond_symbol, bd_symbol)

opens 'StochasticObject' followed by opening 'StochasticFragment'

PARAMETER DESCRIPTION
parent

parent of StochasticObject

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bd_symbol

bonding descriptor symbol - will be parsed into symbol, index

TYPE: str

bond_symbol

bond symbol ("", "=", "#", etc.)

TYPE: str | None

RETURNS DESCRIPTION
parent

returns parent is StochasticFragment

TYPE: StochasticFragment

bigsmiles.constructors.constructor_str.close_stochastic_object_str(parent, bd_symbol, bond_symbol)

closes 'StochasticObject' and append it to parent

PARAMETER DESCRIPTION
parent

parent of StochasticObject

TYPE: BigSMILES | Branch | StochasticObject | StochasticFragment

bd_symbol

bonding descriptor symbol (right side) - will be parsed into symbol, index

TYPE: str

bond_symbol

bond symbol ("", "=", "#", etc.)

TYPE: str | None

RETURNS DESCRIPTION
parent.parent

returns parent of StochasticObject

bigsmiles.constructors.constructor_str.open_stochastic_fragment(parent)

opens 'StochasticFragment'

PARAMETER DESCRIPTION
parent

parent of StochasticFragment

RETURNS DESCRIPTION
parent

returns the freshly opened StochasticFragment

TYPE: StochasticFragment

bigsmiles.constructors.constructor_str.close_open_stochastic_fragment_str(parent)

closes StochasticFragment and appends it to 'parent.parent' and opens a new StochasticFragment

PARAMETER DESCRIPTION
parent

StochasticFragment to be closed

RETURNS DESCRIPTION
parent

returns the freshly opened StochasticFragment

TYPE: StochasticFragment

bigsmiles.constructors.constructor_str.close_stochastic_fragment_str(parent)

closes StochasticFragment and appends it to 'parent.parent'

PARAMETER DESCRIPTION
parent

StochasticFragment to be closed

TYPE: StochasticFragment

RETURNS DESCRIPTION
parent.parent

returns the parent.parent