pertdb.Compound
¶
- class pertdb.Compound(name: str, ontology_id: str | None, abbr: str | None, synonyms: str | None, description: str | None, chembl_id: str | None, smiles: str | None, canonical_smiles: str | None, inchikey: str | None, molweight: float | None, molformula: str | None, parents: list[Compound], source: Source | None)¶
- class pertdb.Compound(*db_args)
Bases:
BioRecord,HasOntologyId,TracksRun,TracksUpdatesModels a (chemical) compound such as a drug.
Example:
import pertdb compound = pertdb.Compound( name="Navitoclax", ontology_id="CHEMBL443684", smiles="[H][C@@](CCN1CCOCC1)(CSC1=CC=CC=C1)NC1=C(C=C(C=C1)S(=O)(=O)NC(=O)C1=CC=C(C=C1)N1CCN(CC2=C(CCC(C)(C)C2)C2=CC=C(Cl)C=C2)CC1)S(=O)(=O)C(F)(F)F" ).save()
- type: str | None¶
Type of the compound.
- chembl_id: str | None¶
Chembl ontology ID of the compound
- smiles: str | None¶
Raw SMILES string as provided by user.
- canonical_smiles: str | None¶
Normalized and standardized canonical SMILES string.
- inchikey: str | None¶
InChIKey of the compound from the canonical SMILES.
- molweight: float | None¶
MolWeight of the compound from the canonical SMILES.
- molformula: str | None¶
MolFormula of the compound from the canonical SMILES.
- moa: str | None¶
Mechanism of action of the compound.
- targets: PerturbationTarget¶
Targets of the compound.
- save(*args, **kwargs)¶
Override save to ensure SMILES processing happens before database save.
- update_smiles(new_smiles)¶
Update the SMILES string and reprocess normalization.
- Parameters:
new_smiles (
str) – New SMILES string to set- Return type:
None