No project description provided
Project description
hypothesis-rdkit
Installation
pip install -U hypothesis-rdkit
Usage
The module hypothesis-rdkit
provides a strategy for the generating RDKit
molecules. During the installation of the package, this strategy is linked to the
rdkit.Chem.Mol
type:
from hypothesis import given
from rdkit.Chem import Mol
@given(...)
def test_molecule_method(mol : Mol):
assert mol.GetNumAtoms() > 0
# ...
You can use the mols
strategy directly for further customization:
from hypothesis import given # import hypothesis before hypothesis_rdkit!
from hypothesis_rdkit import mols
from rdkit.Chem import GetMolFrags, Mol
@given(mols(n_connected_components=2))
def test_molecule_mixtures(mol : Mol):
frags = GetMolFrags(mol, asMols=True)
assert len(frags) == 2
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
hypothesis-rdkit-0.1.tar.gz
(72.2 kB
view hashes)
Built Distribution
Close
Hashes for hypothesis_rdkit-0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b5771f25d4423cce2cd1060e0e1aa99c2991717705bcdc8f1122535efe3494 |
|
MD5 | fc37b38a8b2657ccaf1336de5744d1ba |
|
BLAKE2b-256 | 296c4a77ceeff7ce5e40491d3882ff3b896d091c732b58a0e2b92f3299156919 |