I have tried to implement a CustomNonbondedForce in an xml file. I'd like the NonbondedForce of my system to handle just electrostatic interactions, so I've set epsilon = 0 for each particle in NonbondedForce in restrict NonbondedForce to computing electrostatic interactions.
I'd like interactions of the CustomNonbondedForce to be restricted to Oxygen atoms of my system, so I have specified it as:
Code: Select all
<CustomNonbondedForce energy="2*epsilon/(1-3/(gamma+3))*(sigma^6/(sigma^6+r^6))*(3/(gamma+3)*exp(gamma*(1-r/sigma))-1); sigma=0.5*(sigma1+sigma2); epsilon=sqr t(epsilon1*epsilon2); gamma=gamma1+gamma2">
<PerParticleParameter name="epsilon"/>
<PerParticleParameter name="gamma"/>
<PerParticleParameter name="sigma"/>
<Atom class="OW" epsilon="1.0334" gamma="6.628" sigma="0.36174"/>
<Atom class="HW" epsilon="0" gamma="1" sigma="1"/>
<Atom class="MW" epsilon="0" gamma="1" sigma="1"/>
</CustomNonbondedForce>
Hence I've set epsilon = 0 for "HW" and "MW" atoms in order to eliminate interactions involving those atoms. My system is generated using:
Code: Select all
system = forcefield.createSystem(pdb.topology, nonbondedMethod=PME, nonbondedCutoff=0.85*nanometer, constraints=None, rigidWater=False)
My issue is that an exception is thrown that says that the energy is infinite, but it is unclear to me why this would be the case as the CustomNonbondedForce as written and with the above parameters is similar in form to the standard LJ potential. Therefore something must be wrong with my specification of the force, but I am at a loss as to what the issue is. Any input would be greatly appreciated.
Thank you,
Joe