## Can CustomHbondForce have more than 3 donors and acceptors?

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

### Can CustomHbondForce have more than 3 donors and acceptors?

I'm implementing a HBond like potential. But instead of just depending on donor i, it also depends on the atom from neighboring residues. So I plan to add them also as donors, but it seems CustomHbondForce can only have 3 donors(I need 5.) Is there a work around? Thanks.

Wei

Peter Eastman
Posts: 1901
Joined: Thu Aug 09, 2007 1:25 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

What's the functional form you want to implement? How does it depend on the five atoms?

Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

My current implementation has 3 donors and 3 acceptors.
The potential depends on the distance of (a1,d1), (a1,d2), (d3,a2), (d3,a3).
I want to add a4, a5 and d4, d5. The new potential will additional depend on distances of (a4,a5), and (d4,d5). (nothing else).

Thanks!

Peter Eastman
Posts: 1901
Joined: Thu Aug 09, 2007 1:25 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

So it depends on the distance between two atoms that are both in the donor? Does that distance change with time or is it mostly constant? (Usually the atoms within the donor or within the acceptor are all bonded to each other.) If that distance just varies between donors, but is mostly constant with time for each one, you could make it into a per-donor parameter. Likewise for the one involving two acceptor atoms.

Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

Right. Sadly I think they change over time.(because actually I want to use the distance between atom of residue i-2 and of i+2 for donor residue i.)

Peter Eastman
Posts: 1901
Joined: Thu Aug 09, 2007 1:25 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

You won't be able to do that with CustomHbondForce. If you want a force with that functional form, I think you'll need to write a plugin.

Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

Thanks. I will take a look of the plugin.

Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

### Re: Can CustomHbondForce have more than 3 donors and acceptors?

Hello Peter,
will you consider it is a good starting project to implement a new CustomHbondForce that support adding "a4, a5", "d4, d5" as fourth and fifth acceptors and donors? Or you think this is will be more complicate? It feels like all I need is adding those a4,a5 into every place you had a1,a2,a3. for example "https://github.com/pandegroup/openmm/bl ... ndForce.cu", "https://github.com/pandegroup/openmm/bl ... ceImpl.cpp", "https://github.com/pandegroup/openmm/bl ... dForce.cpp" and .h files.
Is that right?