API References

Predicates

IsLipinskiAcceptor

class oecookbook.IsLipinskiAcceptor(*args)[source]

Predicate class to identify Lipinski acceptor atoms.

__call__(atom: OEAtomBase) bool[source]

Evaluate the atom.

IsLipinskiDonor

class oecookbook.IsLipinskiDonor(*args)[source]

Predicate class to identify Lipinski donor atoms.

__call__(atom: OEAtomBase) bool[source]

Evaluate the atom.

Functions

num_lipinsky_acceptors

oecookbook.num_lipinsky_acceptors(mol: OEMolBase) int[source]

Return the number of Lipinski acceptors in the molecule.

Parameters:

mol (oechem.OEMolBase) – Input molecule

Returns:

Number of Lipinsky donor atoms defined by IsLipinskiAcceptor predicate.

Return type:

int

Examples

>>> lipitor = "CC(C)c1c(c(c(n1CC[C@H](C[C@H](CC(=O)[O-])O)O)c2ccc(cc2)F)c3ccccc3)C(=O)Nc4ccccc4"
>>> mol = oechem.OEGraphMol()
>>> if oechem.OESmilesToMol(mol, lipitor):
...     print(f"Number of acceptors: {oecookbook.num_lipinsky_acceptors(mol)}")
Number of acceptors: 7

num_lipinsky_donors

oecookbook.num_lipinsky_donors(mol: OEAtomBase) int[source]

Return the number of Lipinski acceptors in the molecule.

Parameters:

mol (oechem.OEMolBase) – Input molecule

Returns:

Number of Lipinsky donor atoms defined by IsLipinskiDonor predicate.

Return type:

int

Examples

>>> lipitor = "CC(C)c1c(c(c(n1CC[C@H](C[C@H](CC(=O)[O-])O)O)c2ccc(cc2)F)c3ccccc3)C(=O)Nc4ccccc4"
>>> mol = oechem.OEGraphMol()
>>> if oechem.OESmilesToMol(mol, lipitor):
...     print(f"Number of donors: {oecookbook.num_lipinsky_donors(mol)}")
Number of donors: 3