Skip to content

Commit

Permalink
v0.0.14 (#9)
Browse files Browse the repository at this point in the history
* update test and lint workflow

* fix alcohol patterns

---------

Co-authored-by: Klaus Weinbauer <[email protected]>
  • Loading branch information
klausweinbauer and Klaus Weinbauer authored Apr 22, 2024
1 parent a75a8c9 commit 5477e47
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test-and-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Test & Lint

on:
push:
branches: [ "main" ]
branches: [ "dev" ]
pull_request:
branches: [ "main", "release" ]
branches: [ "main" ]

permissions:
contents: read
Expand Down
21 changes: 18 additions & 3 deletions fgutils/fgconfig.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,24 @@
},
{"name": "amide", "pattern": "RC(=O)N(R)R", "group_atoms": [1, 2, 3]},
{"name": "alcohol", "pattern": "COH", "group_atoms": [1, 2]},
{"name": "primary_alcohol", "pattern": "C(C)OH", "group_atoms": [2, 3]},
{"name": "secondary_alcohol", "pattern": "C(C)(C)OH", "group_atoms": [3, 4]},
{"name": "tertiary_alcohol", "pattern": "C(C)(C)(C)OH", "group_atoms": [4, 5]},
{
"name": "primary_alcohol",
"pattern": "CCOH",
"group_atoms": [2, 3],
"anti_pattern": ["CC(O)O"],
},
{
"name": "secondary_alcohol",
"pattern": "C(C)(C)OH",
"group_atoms": [3, 4],
"anti_pattern": ["CC(O)O"],
},
{
"name": "tertiary_alcohol",
"pattern": "C(C)(C)(C)OH",
"group_atoms": [4, 5],
"anti_pattern": ["CC(O)O"],
},
{"name": "enol", "pattern": "C=COH"},
{"name": "acetal", "pattern": "RC(OC)(OC)H", "group_atoms": [1, 2, 4, 6]},
{"name": "ketal", "pattern": "RC(OR)(OR)R", "group_atoms": [1, 2, 4]},
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "fgutils"
version = "0.0.13"
version = "0.0.14"
authors = [{name="Klaus Weinbauer", email="[email protected]"}]
description = "Library to get functional groups from molecular graphs."
readme = "README.md"
Expand Down
4 changes: 4 additions & 0 deletions test/test_query.py
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ def test_get_functional_group_once():
pytest.param("CCO", ["primary_alcohol"], [[2]], id="Primary Alcohol"),
pytest.param("CC(C)O", ["secondary_alcohol"], [[3]], id="Secondary Alcohol"),
pytest.param("CC(C)(C)O", ["tertiary_alcohol"], [[4]], id="Teritary Alcohol"),
pytest.param(
"C(O)(O)C=CO", ["hemiketal", "enol"], [[0, 1, 2], [3, 4, 5]], id="Hemiketal"
),
pytest.param("C=CO", ["enol"], [[0, 1, 2]], id="Enol")
# pytest.param("", [""], [[]], id=""),
],
)
Expand Down

0 comments on commit 5477e47

Please sign in to comment.