-
|
Hello, I am new to this package and was wondering if anyone has a modification/suggestion on how to do cation bridging interactions. This would be similar to the water bridging, but would allow for: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Hi @sarahvs99, The bridged interactions are still a feature in development so we haven't really generalised the concept to other interactions in a user-friendly way. With that being said, you could try something like the following:
from prolif.interactions.interactions import HBAcceptor
from prolif.interactions.water_bridge import WaterBridge as BaseWaterBridge
# create a new interaction for cation-water
# derives from HBondAcceptor as the WaterBridge has some hardcoded logic based on it
class CationWater(HBAcceptor):
def __init__(self):
super().__init__(
acceptor="[+{1-},$([NX3&!$([NX3]-O)]-[C]=[NX3+])]",
donor="[OH2]-[H]",
distance=3.5,
# disable angle checks
DHA_angle=(0, 180),
)
WaterCation = CationWater.invert_role("WaterCation", "")
# overwrite WaterBridge interaction
class WaterBridge(BaseWaterBridge):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.water_fp = plf.Fingerprint(
interactions=["HBDonor", "HBAcceptor", "Anionic", "Cationic", "CationWater", "WaterCation"],
count=self.water_fp.count,
)
fp = plf.Fingerprint(
["WaterBridge"], parameters={"WaterBridge": {"water": water_selection, "order": 3}}
)The resulting interactions will be named "WaterBridge" and will also include bridged interactions that don't involve ions at all, you'd have to do some processing on the Feel free to reopen the issue if you have more related questions |
Beta Was this translation helpful? Give feedback.
Hi @sarahvs99,
The bridged interactions are still a feature in development so we haven't really generalised the concept to other interactions in a user-friendly way. With that being said, you could try something like the following:
fp.runorfp.run_from_iterable