createExceptionsFromBonds method in CustomNonBonded Class

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Gaetano Calabro'
Posts: 24
Joined: Fri Feb 24, 2012 11:48 am

createExceptionsFromBonds method in CustomNonBonded Class

Post by Gaetano Calabro' » Mon Oct 14, 2013 6:17 am

Hi There,

I would like to extend the CustomNonBonded Force class to support the createExceptionsFromBonds() method. My idea is to copy and adapt the needed code from the standard NonBonded class which presents this method. Are there technical issues that I should be aware before embarking in this extension?

Cheers,

Gaetano

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

Re: createExceptionsFromBonds method in CustomNonBonded Clas

Post by Peter Eastman » Mon Oct 14, 2013 10:02 am

Hi Gaetano,

For the most part that should be straightforward. The one issue of course is that CustomNonbondedForce doesn't have exceptions, just exclusions. So it can exclude the interactions between nearby atoms, but it won't be able to implement a reduced interaction for 1-4 pairs. You could do that with a CustomBondedForce, of course.

Peter

User avatar
Gaetano Calabro'
Posts: 24
Joined: Fri Feb 24, 2012 11:48 am

Re: createExceptionsFromBonds method in CustomNonBonded Clas

Post by Gaetano Calabro' » Mon Oct 14, 2013 3:52 pm

Hi Peter,

Thanks for your prompt reply. What can I do if I want to scale the 1-4 interactions and I cannot use the CustomBonded class because of the lack of PBC conditions? Is there an easy way?

Thanks a lot

Gaetano

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

Re: createExceptionsFromBonds method in CustomNonBonded Clas

Post by Peter Eastman » Mon Oct 14, 2013 4:27 pm

Are you sure that's a problem? Regular 1-4 interactions don't use periodic boundary conditions. The scaling is applied because the atoms are covalently bonded to each other, so it always uses two atoms that are in the same molecule. Even if a different periodic copy managed to get closer, it would be wrong to use the scaled interaction for it, because it's not covalently bonded.

Peter

User avatar
Gaetano Calabro'
Posts: 24
Joined: Fri Feb 24, 2012 11:48 am

Re: createExceptionsFromBonds method in CustomNonBonded Clas

Post by Gaetano Calabro' » Mon Oct 21, 2013 2:07 am

Hi Peter,
Thanks for your reply. Yes you're right I was trying to make something wrong.
Cheers,
Gaetano

POST REPLY