Skip to content

Bonders and deleters #293

Answered by lukasturcani
mathersrob asked this question in Q&A
Apr 2, 2021 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @mathersrob! Sorry for the delay in reply. If you would like to create esters try the following code:

    # alcohol functional group string is [*][O][H]
    # see (https://stk.readthedocs.io/en/latest/stk.molecular.functional_groups.factories.alcohol_factory.html)
    alcohol_factory = stk.AlcoholFactory(
        # The index of the oxygen atom is 1 in the functional group string
        bonders=(1, ),
        # The index of the hydrogen atom in the
        # functional group string is 2 .
        deleters=(2, ),
    )
    bb1 = stk.BuildingBlock(
        smiles='OCCCCO',
        functional_groups=(alcohol_factory, ),
    )

    # carboxylic acid functional group string is [*][C](=[O])[…

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@mathersrob
Comment options

@lukasturcani
Comment options

@lukasturcani
Comment options

Answer selected by lukasturcani
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants