Skip to content

Commit

Permalink
add test for vdw preset
Browse files Browse the repository at this point in the history
  • Loading branch information
cbouy committed Oct 24, 2024
1 parent cc3100a commit 026a865
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test_interactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from prolif.fingerprint import Fingerprint
from prolif.interactions import VdWContact
from prolif.interactions.base import _INTERACTIONS, Interaction, get_mapindex
from prolif.interactions.constants import VDW_PRESETS

# disable rdkit warnings
lg = RDLogger.logger()
Expand Down Expand Up @@ -183,6 +184,18 @@ def test_vdwcontact_vdwradii_update(self, any_mol, any_other_mol):
metadata = vdw.detect(any_mol[0], any_other_mol[0])
assert next(metadata, None) is None

@pytest.mark.parametrize(
("any_mol", "any_other_mol"),
[("benzene", "cation")],
indirect=["any_mol", "any_other_mol"],
)
@pytest.mark.parametrize("preset", ["mdanalysis", "rdkit", "csd"])
def test_vdwcontact_preset(self, any_mol, any_other_mol, preset):
vdw = VdWContact(preset=preset)
metadata = vdw.detect(any_mol[0], any_other_mol[0])
assert next(metadata, None) is not None
assert vdw.vdwradii == VDW_PRESETS[preset]

@pytest.mark.parametrize(
("interaction_qmol", "smiles", "expected"),
[
Expand Down

0 comments on commit 026a865

Please sign in to comment.