Tools#

app.modules.tools.surge module#

app.modules.tools.surge.generate_structures_SURGE(molecular_formula)[source]#

Generate chemical structures using the surge tool based on the canonical.

generation path method.

Return type:

Union[list, str]

Args:

molecular_formula (str): Molecular formula provided by the user.

Returns:
list: List of SMILES strings representing generated chemical structures.

If the molecular formula contains more than 10 heavy atoms, a message indicating the limitation is returned instead.

app.modules.tools.surge.get_heavy_atom_count(formula)[source]#

Calculate the heavy atom count from a given molecular formula.

Return type:

int

Args:

formula (str): The molecular formula of the molecule.

Returns:

count (int): The number of heavy atoms in the molecule.

app.modules.tools.sugar_removal module#

app.modules.tools.sugar_removal.get_sugar_info(molecule)[source]#

Analyzes a molecule represented by a SMILES string to determine if it.

contains sugars.

This function utilizes the Sugar Removal Utility to check for the presence of circular or linear sugars.

Return type:

tuple

Args:

molecule (IAtomContainer): CDK molecule object.

Returns:
tuple: A tuple containing two boolean values indicating whether the molecule has linear sugars

and whether the molecule has circular sugars. If no sugars are found, both values will be False.

app.modules.tools.sugar_removal.remove_circular_sugar(molecule)[source]#

Detects and removes circular sugars from a given SMILES string using the.

CDK-based sugar removal utility.

Return type:

str

Args:

molecule (IAtomContainer): CDK molecule object.

Returns:

str: SMILES string with circular sugars removed, or a message if no circular sugars are found.

app.modules.tools.sugar_removal.remove_linear_and_circular_sugar(molecule)[source]#

This fucntion detects and removes linear and circular sugars from a.

give.

SMILES string. Uses the CDK based sugar removal utility.

Args:

molecule (IAtomContainer): CDK molecule object.

Returns:

smiles (str): SMILES string without linear and circular sugars.

app.modules.tools.sugar_removal.remove_linear_sugar(molecule)[source]#

Detects and removes linear sugars from a given SMILES string using the.

CDK-based.

sugar removal utility.

Return type:

str

Args:

molecule (IAtomContainer): CDK molecule object.

Returns:

str: The SMILES string with linear sugars removed, or a message indicating no linear sugar found.

Raises:

ValueError: If there is an issue with parsing the input SMILES string.