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
PME with CustomNonbondedForce and 14scale fcator
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
- Joe Napoli
- Posts: 23
- Joined: Fri Aug 09, 2013 12:09 pm
Re: PME with CustomNonbondedForce and 14scale fcator
I'll give that a shot. Thank you!
-Joe
-Joe
- Joe Napoli
- Posts: 23
- Joined: Fri Aug 09, 2013 12:09 pm
Re: PME with CustomNonbondedForce and 14scale fcator
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
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
- Peter Eastman
- Posts: 2588
- Joined: Thu Aug 09, 2007 1:25 pm
Re: PME with CustomNonbondedForce and 14scale fcator
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
Peter