Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modify graphs.py to handle insertions when {'insertions': True} #223

Merged
merged 12 commits into from
Dec 8, 2022
Prev Previous commit
Next Next commit
Merge branch 'master' into insertion
  • Loading branch information
a-r-j authored Nov 9, 2022
commit 707e6e575f27487b25502e5e0dd832bcf5dc5fbc
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
#### Protein

* [Bugfix] - [#223](https://github.com/a-r-j/graphein/pull/220) Fix handling of insertions in protein graphs. Insertions are now given IDs like: `A:SER:12:A`. Contribution by @manonreau.
* [Feature] - [#229](https://github.com/a-r-j/graphein/pull/220) Adds support for filtering KNN edges based on self-loops and chain membership. Contribution by @anton-bushuiev.
* [Bugfix] - [#229](https://github.com/a-r-j/graphein/pull/220) Fixes bug in KNN edge computation. Contribution by @anton-bushuiev.
* [Bugfix] - [#220](https://github.com/a-r-j/graphein/pull/220) Fixes edge metadata conversion to PyG. Contribution by @manonreau.
* [Bugfix] - [#220](https://github.com/a-r-j/graphein/pull/220) Fixes centroid atom grouping & avoids unnecessary edge computation where none are found. Contribution by @manonreau.

Expand Down
7 changes: 2 additions & 5 deletions graphein/protein/edges/distance.py
Original file line number Diff line number Diff line change
Expand Up @@ -496,11 +496,8 @@ def add_aromatic_sulphur_interactions(
condition2 = resi1 in PI_RESIS and resi2 in SULPHUR_RESIS

if (condition1 or condition2) and resi1 != resi2:
if G.has_edge(resi1, resi2):
G.edges[resi1, resi2]["kind"].add("aromatic_sulphur")
else:
G.add_edge(resi1, resi2, kind={"aromatic_sulphur"})

add_edge(G, resi1, resi2, "aromatic_sulphur")


def add_cation_pi_interactions(
G: nx.Graph, rgroup_df: Optional[pd.DataFrame] = None
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.