Skip to content

Commit

Permalink
Fix acceptor SMARTS for halogen bond (#190)
Browse files Browse the repository at this point in the history
* New acceptor SMARTS for halogen bond
* add tests, update changelog and docstring

---------

Co-authored-by: Cédric Bouysset <[email protected]>
  • Loading branch information
asiomchen and cbouy authored Mar 10, 2024
1 parent 492b303 commit 507280b
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Fixed

- The SMARTS pattern for halogen bond acceptors was not allowing carbonyles and other
groups with double bonds to match (PR #190 by @asiomchen).

## [2.0.2] - 2024-03-01

Expand Down
6 changes: 5 additions & 1 deletion prolif/interactions/interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,15 @@ class XBAcceptor(DoubleAngle):
``axd_angles`` and ``xar_angles`` parameters renamed to ``AXD_angle`` and
``XAR_angle``.
.. versionchanged:: 2.0.3
Fixed the SMARTS pattern for acceptors that was not allowing carbonyles and
other groups with double bonds to match.
"""

def __init__(
self,
acceptor="[#7,#8,P,S,Se,Te,a;!+{1-}][*]",
acceptor="[#7,#8,P,S,Se,Te,a;!+{1-}]!#[*]",
donor="[#6,#7,Si,F,Cl,Br,I]-[Cl,Br,I,At]",
distance=3.5,
AXD_angle=(130, 180),
Expand Down
2 changes: 2 additions & 0 deletions tests/test_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,8 @@ def test_vdwcontact_vdwradii_update(self, any_mol, any_other_mol):
("XBAcceptor.lig_pattern", "[NH3]", 3),
("XBAcceptor.lig_pattern", "[NH+]C", 0),
("XBAcceptor.lig_pattern", "c1ccccc1", 12),
("XBAcceptor.lig_pattern", "C(=O)C", 1),
("XBAcceptor.lig_pattern", "C#N", 0),
("Cationic.lig_pattern", "[NH4+]", 1),
("Cationic.lig_pattern", "[Ca+2]", 1),
("Cationic.lig_pattern", "CC(=[NH2+])N", 2),
Expand Down

0 comments on commit 507280b

Please sign in to comment.