Implicit Membrane Model
- Joshua Adelman
- Posts: 20
- Joined: Thu Feb 21, 2008 4:42 pm
Implicit Membrane Model
I was wondering if it was possible to access the Z coordinate in the CustomGBForce class (or if there are future plans to allow users to access it), in order to implement a implicit membrane model. I have not played around with this class, but it does not appear possible given the current API.
- John Chodera
- Posts: 53
- Joined: Wed Dec 13, 2006 6:22 pm
RE: Implicit Membrane Model
I'll second the request for this! The implicit membrane GB models from Michael Feig and Charlie Brooks might be good ones to look at for examples of what might be allowed by the CustomGBForce class.
See, for example, the references under "Implicit Models of Heterogeneous Dielectric Environments" at the bottom of this page:
http://feig.bch.msu.edu/main-research-methodology.html
See, for example, the references under "Implicit Models of Heterogeneous Dielectric Environments" at the bottom of this page:
http://feig.bch.msu.edu/main-research-methodology.html
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Implicit Membrane Model
What would be required to support the models you're interested in? How about if computed values and energy terms of type SingleParticle (but *not* particle pair ones) could depend on the (x, y, z) coordinates of the particle?
Peter
Peter
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
RE: Implicit Membrane Model
Ok, I've just checked in this feature. Give it a try, and please let me know how it works.
Peter
Peter
- Nicholas Schafer
- Posts: 26
- Joined: Thu Jul 19, 2012 4:24 pm
Re: Implicit Membrane Model
Hi Peter -
I'm interested in having a ParticlePair CustomGBForce that depends on the z-coordinates of the interacting particles. Is it possible to implement such a force by using SingleParticle computed values that depend on the z-values of the interacting pair of particles inside the energy expression of a ParticlePair force?
Best,
Nick
I'm interested in having a ParticlePair CustomGBForce that depends on the z-coordinates of the interacting particles. Is it possible to implement such a force by using SingleParticle computed values that depend on the z-values of the interacting pair of particles inside the energy expression of a ParticlePair force?
Best,
Nick
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Implicit Membrane Model
Yes, that ought to work. You can have a SingleParticle computed value that depends on z. A ParticlePair energy term can then depend on the values of that computed value for the two particles.
Peter
Peter
- Nicholas Schafer
- Posts: 26
- Joined: Thu Jul 19, 2012 4:24 pm
Re: Implicit Membrane Model
Perfect. Thanks again for your efforts.
Cheers,
Nick
Cheers,
Nick
Re: Implicit Membrane Model
I got an error
(OpenCL Error : clEnqueueNDRangeKernel failed: kernel_arg 6 has not yet been initialized) using openCL
(CUDA_ERROR_INVALID_VALUE) using CUDA, no error using CPU.
when I tried to implement this implicit membrane model,
But if I comment out one line
then no error will occur.
simplified example is attached here, you can run it with
Please help.
Thanks a lot.
Wei Lu
(OpenCL Error : clEnqueueNDRangeKernel failed: kernel_arg 6 has not yet been initialized) using openCL
(CUDA_ERROR_INVALID_VALUE) using CUDA, no error using CPU.
when I tried to implement this implicit membrane model,
Code: Select all
contact = CustomGBForce()
gamma_ijm = np.zeros((2, 20, 20))
contact.addTabulatedFunction("gamma_ijm", Discrete3DFunction(2, 20, 20, gamma_ijm.T.flatten()))
contact.addComputedValue("rho", f"1", CustomGBForce.ParticlePair)
contact.addComputedValue("alpha", f"z", CustomGBForce.SingleParticle)
for i in range(pdb.topology.getNumAtoms()):
contact.addParticle()
Code: Select all
contact.addTabulatedFunction("gamma_ijm", Discrete3DFunction(2, 20, 20, gamma_ijm.T.flatten()))
simplified example is attached here, you can run it with
Code: Select all
python3 mm_run.py
Thanks a lot.
Wei Lu
- Peter Eastman
- Posts: 2564
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Implicit Membrane Model
I just posted a pull request with the fix. Could you try it out and see whether it now works for you?
https://github.com/pandegroup/openmm/pull/2248
https://github.com/pandegroup/openmm/pull/2248
Re: Implicit Membrane Model
It works! thanks a lot!