Example #1
0
def _alcohol(oxygen, hydrogen, atom):
    bonders = (oxygen, )
    deleters = (hydrogen, )
    return GenericCaseData(
        functional_group=stk.Alcohol(
            oxygen=oxygen,
            hydrogen=hydrogen,
            atom=atom,
            bonders=bonders,
            deleters=deleters,
        ),
        atoms=(oxygen, hydrogen, atom),
        bonders=bonders,
        deleters=deleters,
    )
Example #2
0
import pytest
from pytest_lazyfixture import lazy_fixture
import stk

# Fixtures need to visible for lazy_fixture() calls.
from .fixtures import *  # noqa


@pytest.fixture(
    params=(
        stk.Alcohol(
            oxygen=stk.O(1),
            hydrogen=stk.H(2),
            atom=stk.C(2),
            bonders=(stk.C(2), ),
            deleters=(stk.O(1), stk.H(2)),
        ),
        stk.Aldehyde(
            carbon=stk.C(0),
            oxygen=stk.O(1),
            hydrogen=stk.H(2),
            atom=stk.C(3),
            bonders=(stk.C(0), ),
            deleters=(stk.O(1), ),
        ),
        stk.Alkene(
            carbon1=stk.C(1),
            atom1=stk.C(2),
            atom2=stk.C(3),
            carbon2=stk.C(4),
            atom3=stk.C(5),
Example #3
0
             sulfur=stk.S(5),
             hydrogen=stk.H(10),
             atom=stk.C(3),
             bonders=(stk.C(4), ),
             deleters=(stk.S(5), stk.H(10)),
         ),
     ),
 ),
 lambda: CaseData(
     factory=stk.AlcoholFactory(),
     molecule=stk.BuildingBlock('OCCCO'),
     functional_groups=(
         stk.Alcohol(
             oxygen=stk.O(0),
             hydrogen=stk.H(5),
             atom=stk.C(1),
             bonders=(stk.O(0), ),
             deleters=(stk.H(5), ),
         ),
         stk.Alcohol(
             oxygen=stk.O(4),
             hydrogen=stk.H(12),
             atom=stk.C(3),
             bonders=(stk.O(4), ),
             deleters=(stk.H(12), ),
         ),
     ),
 ),
 lambda: CaseData(
     factory=stk.ThiolFactory(),
     molecule=stk.BuildingBlock('SCCCS'),