Functions

class razi.functions.BaseFunction(*arguments, **kwargs)

Represents a database function.

When the function is used on a molecule column additional arguments are set using __call__. The column or molecule the function is called on is stored inside the constructor (see ChemicalComparator.__getattr__()). When the function is called directly all arguments are set using the constructor.

class razi.functions.functions

Functions that are supported by most databases

class smiles(*arguments, **kwargs)

Translates a Molecule into a SMILES string representation

class functions.mw(*arguments, **kwargs)

Computes the molecular weight for a Molecule

class functions.logp(*arguments, **kwargs)

Estimates the LogP for a Molecule

class functions.tpsa(*arguments, **kwargs)

Computes the topological polar surface area for a Molecule

class functions.hba(*arguments, **kwargs)

Returns the number of hydrogen-bond acceptors for a Molecule

class functions.hbd(*arguments, **kwargs)

Returns the number of hydrogen-bond donors for a Molecule

class functions.num_atoms(*arguments, **kwargs)

Returns the total number of atoms in a Molecule

class functions.num_hetatoms(*arguments, **kwargs)

Returns the number of hetero atoms in a Molecule

class functions.num_hvy_atoms(*arguments, **kwargs)

Returns the number of heavy atoms in a Molecule

class functions.num_rings(*arguments, **kwargs)

Returns the number of rings in a Molecule

class functions.num_rotatable_bonds(*arguments, **kwargs)

Returns the number of rotatable bonds in a Molecule

class functions.equals(*arguments, **kwargs)

Returns true if two Molecule objects represent the same structure.

class functions.contains(*arguments, **kwargs)

Returns true if the second argument represents a substructure of the Molecule object. If the second argument is a string, SMILES semantic is assumed (the string is coerced to Molecule type).

class functions.contained_in(*arguments, **kwargs)

Superstructure test. Returns true if the first argument represents a fragment of the Molecule object passed as second argument.

class functions.match(*arguments, **kwargs)

Returns true if the second argument represents a substructure of the Molecule object. If the second argument is a string, SMARTS semantic is assumed (the string is coerced to QMolecule type).

class functions.morgan_b(*arguments, **kwargs)

Returns a BitFingerprint which is the bit vector Morgan fingerprint for a molecule using connectivity invariants. The second argument provides the radius. This is an ECFP-like fingerprint.

class functions.morgan_feat_b(*arguments, **kwargs)

Returns a BitFingerprint which is the bit vector Morgan fingerprint for a molecule using chemical-feature invariants. The second argument provides the radius. This is an FCFP-like fingerprint.

class functions.atompair_b(*arguments, **kwargs)

Returns a BitFingerprint which is the bit vector atom-pair fingerprint for a molecule.

class functions.torsion_b(*arguments, **kwargs)

Returns a BitFingerprint which is the bit vector topological-torsion fingerprint for a molecule.

class functions.layered_b(*arguments, **kwargs)

Returns a BitFingerprint which is the layered fingerprint for a molecule. This is an experimental substructure fingerprint using hashed molecular subgraphs.

class functions.morgan_c(*arguments, **kwargs)

Returns a CntFingerprint which is the count-based Morgan fingerprint for a molecule using connectivity invariants. The second argument provides the radius. This is an ECFP-like fingerprint.

class functions.morgan_feat_c(*arguments, **kwargs)

Returns a CntFingerprint which is the count-based Morgan fingerprint for a molecule using chemical-feature invariants. The second argument provides the radius. This is an FCFP-like fingerprint.

class functions.atompair_c(*arguments, **kwargs)

Returns a CntFingerprint which is the count-based atom-pair fingerprint for a molecule.

class functions.torsion_c(*arguments, **kwargs)

Returns a CntFingerprint which is the count-based topological-torsion fingerprint for a molecule.

class functions.tanimoto_similarity(*arguments, **kwargs)

Returns the Tanimoto similarity between two fingerprints of the same type (either two CntFingerprint or two BitFingerprint values).

class functions.tanimoto_similar(*arguments, **kwargs)

Returns true if the Tanimoto similarity between two fingerprints is higher than the currently set threshold value.

class functions.dice_similarity(*arguments, **kwargs)

Returns the Dice similarity between two fingerprints of the same type (either two CntFingerprint or two BitFingerprint values).

class functions.dice_similar(*arguments, **kwargs)

Returns true if the Dice similarity between two fingerprints is higher than the currently set threshold value.