Implicit Membrane Model

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
User avatar
Joshua Adelman
Posts: 20
Joined: Thu Feb 21, 2008 4:42 pm

Implicit Membrane Model

Post by Joshua Adelman » Sun Apr 25, 2010 6:41 pm

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.

User avatar
John Chodera
Posts: 53
Joined: Wed Dec 13, 2006 6:22 pm

RE: Implicit Membrane Model

Post by John Chodera » Tue Apr 27, 2010 5:46 am

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

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

RE: Implicit Membrane Model

Post by Peter Eastman » Fri Apr 30, 2010 5:40 pm

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

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

RE: Implicit Membrane Model

Post by Peter Eastman » Wed May 05, 2010 1:40 pm

Ok, I've just checked in this feature. Give it a try, and please let me know how it works.

Peter

User avatar
Nicholas Schafer
Posts: 26
Joined: Thu Jul 19, 2012 4:24 pm

Re: Implicit Membrane Model

Post by Nicholas Schafer » Tue Sep 25, 2018 3:19 pm

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

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

Re: Implicit Membrane Model

Post by Peter Eastman » Tue Sep 25, 2018 4:19 pm

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

User avatar
Nicholas Schafer
Posts: 26
Joined: Thu Jul 19, 2012 4:24 pm

Re: Implicit Membrane Model

Post by Nicholas Schafer » Tue Sep 25, 2018 4:34 pm

Perfect. Thanks again for your efforts.

Cheers,
Nick

User avatar
Wei Lu
Posts: 45
Joined: Sat Nov 10, 2018 7:54 pm

Re: Implicit Membrane Model

Post by Wei Lu » Fri Jan 11, 2019 11:34 am

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,

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()
But if I comment out one line

Code: Select all

contact.addTabulatedFunction("gamma_ijm", Discrete3DFunction(2, 20, 20, gamma_ijm.T.flatten()))
then no error will occur.

simplified example is attached here, you can run it with

Code: Select all

 python3 mm_run.py 
customGBforce.zip
(47.18 KiB) Downloaded 32 times
Please help.
Thanks a lot.

Wei Lu

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

Re: Implicit Membrane Model

Post by Peter Eastman » Wed Jan 23, 2019 2:11 pm

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

User avatar
Wei Lu
Posts: 45
Joined: Sat Nov 10, 2018 7:54 pm

Re: Implicit Membrane Model

Post by Wei Lu » Wed Jan 30, 2019 11:22 am

It works! thanks a lot!

POST REPLY