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.
POST REPLY
User avatar
Wei Lu
Posts: 31
Joined: Sat Nov 10, 2018 7:54 pm

Can CustomHbondForce have more than 3 donors and acceptors?

Post by Wei Lu » Sat May 25, 2019 2:58 pm

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

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

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

Post by Peter Eastman » Mon May 27, 2019 1:36 pm

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

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

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

Post by Wei Lu » Tue May 28, 2019 11:31 am

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!

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

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

Post by Peter Eastman » Thu May 30, 2019 1:26 pm

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.

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

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

Post by Wei Lu » Thu May 30, 2019 7:45 pm

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.)

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

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

Post by Peter Eastman » Fri May 31, 2019 9:51 am

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.

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

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

Post by Wei Lu » Fri May 31, 2019 11:55 am

Thanks. I will take a look of the plugin.

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

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

Post by Wei Lu » Fri Jun 14, 2019 12:31 pm

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?

POST REPLY