navicatGA.chemistry_selfies

Attributes

Functions

check_selfie_chars(chromosome)

Check if a list of selfies characters leads to a valid smiles string. Uses sanitize_smiles to check the smiles string from selfies.decoder.

count_selfie_chars(selfie)

Count the number of selfie characters in a selfie string. Returns the number.

decode_selfies_list(selfies_list)

Decode a list of smiles to a list of selfies using timed_decoder.

diagnose_mol(mol)

Tries to identify and print to logger whatever was or is wrong with the chemistry_selfies of an rdkit.mol object.

draw_selfies(selfies, root_name)

encode_smiles_list(smiles_list)

Encode a list of smiles to a list of selfies using selfies.encoder.

get_ECFP4(mol)

get_conformer_rmsd(mol)

get_confs_ff(mol[, maxiters])

get_interatomic_distances(conf)

get_selfie_chars(selfie[, maxchars])

Obtain an ordered list of all selfie characters in string selfie

get_structure_ff(mol[, n_confs])

Generates a reasonable set of 3D structures

has_transition_metals(mol)

Returns True if the rdkit.mol object passed as argument has a (transition)-metal atom, False if else.

is_transition_metal(at)

Returns True if the rdkit.Atom object passed as argument is a transition metal, False if else.

prune_mol_conformers(mol, energies_list)

randomize_selfies(selfies[, num_random])

randomize_smiles(mol)

sanitize_multiple_smiles(smiles_list)

Calls sanitize_smiles for every item in a list.

sanitize_smiles(smiles)

Return a canonical smile representation of smi.

set_dative_bonds(mol[, fromAtoms])

Tries to replace bonds with metal atoms by dative bonds, while keeping valence rules enforced. Adapted from G. Landrum.

timed_decoder(selfie)

Decode a selfies string to smiles using selfies.decoder, call exception and return None if decoder takes more than 10 seconds to run.

timed_sanitizer(smiles)

Convert smiles string to rdkit.mol, call exception and return None if it takes more than 10 seconds to run.

Module Contents

Check if a list of selfies characters leads to a valid smiles string. Uses sanitize_smiles to check the smiles string from selfies.decoder.

Parameters: :param chromosome: list of selfie characters

Returns: :return: True if the smiles string is deemed valid by sanitize_smiles, False otherwise

Count the number of selfie characters in a selfie string. Returns the number.

Decode a list of smiles to a list of selfies using timed_decoder.

Tries to identify and print to logger whatever was or is wrong with the chemistry_selfies of an rdkit.mol object.

Encode a list of smiles to a list of selfies using selfies.encoder.

Obtain an ordered list of all selfie characters in string selfie padded to maxchars with [nop]s.

Parameters: :param selfie: a selfie string representing a molecule :param maxchars: maximum number of elements in the list

Returns: :return chars_selfie: list of selfie characters present in molecule selfie

Generates a reasonable set of 3D structures using forcefields for a given rdkit.mol object. It will try several 3D generation approaches in rdkit. It will try to sample several conformations and get the minima.

Parameters: :type mol: a rdkit.mol object :type n_confs: the number of conformations to sample

Returns: :return mol_structure: the same rdkit mol with 3D coordinates

Returns True if the rdkit.mol object passed as argument has a (transition)-metal atom, False if else.

Returns True if the rdkit.Atom object passed as argument is a transition metal, False if else.

Calls sanitize_smiles for every item in a list.

Parameters: :param smiles_list list of smiles strings to be sanitized

Returns: :return sanitized_smiles: list of sanitized smile strings with None in errors

Return a canonical smile representation of smi. If there are metals, it will try to fix the bonds as dative.

Parameters: :param smi: smiles string to be sanitized :type smi: smiles string

Returns: :return mol: corresponding rdkit.mol object, None if exception caught :return smi_canon: canonicalized smile representation of smi, None if exception caught :return conversion_successful: True if no exception caught, False if exception caught

Tries to replace bonds with metal atoms by dative bonds, while keeping valence rules enforced. Adapted from G. Landrum.

Decode a selfies string to smiles using selfies.decoder, call exception and return None if decoder takes more than 10 seconds to run.

Convert smiles string to rdkit.mol, call exception and return None if it takes more than 10 seconds to run.