PME with CustomNonbondedForce and 14scale fcator

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
User avatar
Peter Eastman
Posts: 2577
Joined: Thu Aug 09, 2007 1:25 pm

Re: PME with CustomNonbondedForce and 14scale fcator

Post by Peter Eastman » Wed Dec 17, 2014 4:06 pm

Hi Joe,

The easiest way to do that is probably to use lookup tables for the parameters. Specifically:

1. Create a per-particle parameter called "type" that is 0 for O and 1 for H.
2. Create three tabulated functions for the three parameters. They should be of class Discrete2DFunction.
3. In the custom force, get the parameter values from the tables: epsilon(type1, type2).

All of this should be straightforward to do in the XML file.

Peter

User avatar
Joe Napoli
Posts: 23
Joined: Fri Aug 09, 2013 12:09 pm

Re: PME with CustomNonbondedForce and 14scale fcator

Post by Joe Napoli » Wed Dec 17, 2014 4:37 pm

I'll give that a shot. Thank you!

-Joe

User avatar
Joe Napoli
Posts: 23
Joined: Fri Aug 09, 2013 12:09 pm

Re: PME with CustomNonbondedForce and 14scale fcator

Post by Joe Napoli » Wed Jan 07, 2015 6:42 pm

Hi Peter,

If I only want the CustomNonbondedForce to act between oxygen atoms in the system, would I still implement this as a lookup table?

Thank you,
Joe

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

Re: PME with CustomNonbondedForce and 14scale fcator

Post by Peter Eastman » Mon Jan 12, 2015 1:47 pm

That would be one way to do it. But if you just want to turn it off for everything except pairs of oxygens, it would be more efficient to just have an "isoxygen" parameter that is 1 for oxygen and 0 for anything else. Then multiply your force by isoxygen1*isoxygen2.

Peter

POST REPLY