luna.mol.templates module¶
- class LigandExpoTemplate(lig_expo_file='/home/docs/checkouts/readthedocs.org/user_builds/luna-toolkit/checkouts/latest/luna/data/ligand_expo.tsv')[source]¶
Bases:
luna.mol.templates.TemplateStandardize small molecules based on templates (SMILES) from LigandExpo.
- Parameters
lig_expo_file (str) – The LigandExpo file containing the SMILES and ligand ids.
- assign_bond_order(mol_obj, lig_id)[source]¶
Assign bond order to a molecular object based on its LigandExpo SMILES.
- Parameters
mol_obj (
MolWrapper,rdkit.Chem.rdchem.Mol, oropenbabel.pybel.Molecule) – A molecule to standardise.lig_id (str) – The ligand identifier (PDB id) in LigandExpo.
- Returns
new_mol – A standardized molecular object of the same type as
mol_obj.- Return type
MolWrapper,rdkit.Chem.rdchem.Mol, oropenbabel.pybel.Molecule
- property data¶
The LigandExpo data.
- Type
- get_ligand_smiles(lig_id)[source]¶
Get SMILES for the ligand
lig_id.- Parameters
lig_id (str) – The ligand identifier (PDB id) in LigandExpo.
- Returns
smiles – The ligand SMILES.
- Return type
str or None
- class Template[source]¶
Bases:
objectStandardize small molecules based on templates.
- assign_bond_order()[source]¶
Assign bond order to a molecular object. However, this method is not implemented by default. Instead, you should use a class that inherits from
Templateand implementsassign_bond_order(). An example is the classLigandExpoTemplatethat assigns bonds order based on ligands SMILES from LigandExpo. Therefore, you should define your own logic beyondassign_bond_order()that meets your goals.