group_decomposition.utils

utils.py

Various utilities used in fragmenting molecules - retrieving information from molecules Identifying small parts of molecules, and tools for minor manipulations of SMILES or molecules

Functions

add_cml_atoms_bonds(el_list, bond_list)

create a molecule from cml file, building it one atom at a time then adding in bond orders.

all_data_from_cml(data)

Gets symbols, xyz coords, bonds and charge of a mol from cml file

data_from_cml(cml_file[, bonds])

Gets symbols, xyz coords, bonds and charge of a mol from cml file

get_canonical_molecule(smile)

Ensures that molecule numbering is consistent with creating molecule from canonical SMILES for consistency.

get_cml_atom_types(cml_file)

Extract atom types from cml file

get_molecules_atomicnum(molecule)

Given molecule object, get list of atomic numbers.

get_molecules_atomsinrings(molecule)

Given molecule object, get Boolean list of if atoms are in a ring.

link_molecules(mol_1, mol_2, dl_1, dl_2)

Given two mols, each with dummy atoms that have dummyAtomLabels, link the molecules between the dummy atoms specified by labels dl_1 and dl_2

list_to_str(lst)

Convert a list to string.

mol_from_cml(cml_file[, input_type])

Creates a molecule from a cml file and returns atoms, xyz and types

mol_from_molfile(mol_file)

takes mol_file and returns mol wth atom numbers the same

mol_from_xyzfile(xyz_file, cml_file)

Attempt to create a molecule from an xyz file by automatically determining bond orders

mol_with_atom_index(mol)

Label a molecule with map numbers for order atoms are in molecule.

smiles_from_cml(cml_file[, smile_tag])

Finds the Retreivium SMILES in a cml file with a given label

trim_placeholders(rwmol)

Given Chem.RWmol, remove atoms with atomic number 0.

xyz_from_cml(cml_file)

Extract xyz coordinates from cml file

xyz_list_to_str(xyz_list)

Convert 2d array to string [[a,b,c],[d,e,f]] -> a, b, c d, e, f