Asymmetrical Passing

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Yan Zhang
Posts: 38
Joined: Mon Dec 19, 2016 2:39 pm

Asymmetrical Passing

Post by Yan Zhang » Thu Jun 22, 2017 8:24 am

How to design a forcefield/mechanism in openMM to allow, say, particle A to pass through particle B (which has its orientation) from one direction but not the opposite?

Thanks,
Yan

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

Re: Asymmetrical Passing

Post by Peter Eastman » Thu Jun 22, 2017 10:40 am

Could you explain what you mean in more detail? What sort of physical system are you modelling? What do you want the potential function to look like?

Peter

User avatar
Yan Zhang
Posts: 38
Joined: Mon Dec 19, 2016 2:39 pm

Re: Asymmetrical Passing

Post by Yan Zhang » Fri Jun 23, 2017 12:23 pm

Say we have two particles A and B. A has an orientation. when B is colliding A from the front, it is allowed to pass (e.g. through a softened LJ potential), but when B is colliding A from the back, it is blocked (e.g. through a repulsive LJ potential). Is it possible to implement a forcefield like this? In my mind the force field of B is something like a waterfall where the potential on one side is higher than the other.

I think the first problem is that I'm not sure how to implement an "orientation" for particle B. Perhaps I can attach another "virtual" particle to it? But when implementing the force field, how could I access the coordinate of the virtual particle?

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

Re: Asymmetrical Passing

Post by Peter Eastman » Fri Jun 23, 2017 3:53 pm

GayBerneForce can apply a non-isotropic LJ-like force based on orientation, so that's the closest thing. But the behavior you described doesn't correspond to any kind of potential function. If you want the force to be different depending on which direction the particles are moving in, there's no way to write that as the gradient of a potential function that depends on the particles' positions and orientations.

You could implement it with a plugin, if you want. But be aware that it won't be a conservative force. Are you sure that's what you want?

User avatar
Yan Zhang
Posts: 38
Joined: Mon Dec 19, 2016 2:39 pm

Re: Asymmetrical Passing

Post by Yan Zhang » Fri Jun 23, 2017 9:27 pm

Yes, a non-conservative force will do the trick. May I know the name of the plugin?

Also, is there anyway to define an orientation for a particle in openmm? Or, alternatively, is there a way to pass the coordinate of a third particle as a parameter in a non-bonded force?

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

Re: Asymmetrical Passing

Post by Peter Eastman » Sun Jun 25, 2017 8:54 am

There isn't an existing plugin that does what you want. You would need to write it. See the developer guide for information on how to write plugins: http://docs.openmm.org/7.1.0/developerguide/index.html

Take a look at GayBerneForce for an example of a force that has orientations for particles. It defines them based on the positions of one or two other particles.

User avatar
Yan Zhang
Posts: 38
Joined: Mon Dec 19, 2016 2:39 pm

Re: Asymmetrical Passing

Post by Yan Zhang » Sun Jun 25, 2017 2:47 pm

I see. So to implement something like Gay-Berne force in OpenMM, I should use <CustomManyParticleForce>, right?

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

Re: Asymmetrical Passing

Post by Peter Eastman » Mon Jun 26, 2017 8:46 am

I'm not sure what you mean by that. GayBerneForce and CustomManyParticleForce are both existing classes, but neither one can do exactly what you want. So you'll need to create a new plugin that implements a new Force class that does what you want.

User avatar
Yan Zhang
Posts: 38
Joined: Mon Dec 19, 2016 2:39 pm

Re: Asymmetrical Passing

Post by Yan Zhang » Wed Jun 28, 2017 9:07 am

I want to have a forcefield with 3 parameters: the position of particle A, the position of particle B, and the orientation of particle A. Since the orientation of A can only be calculated based on the position of another particle C, so I don't think it can be implemented using a <CustomNonbondedForce>. But a <CustomManyParticleForce> might be good enough because I can have the position of all three particles.

User avatar
web design
Posts: 10
Joined: Fri Aug 18, 2017 12:43 pm

Re: Asymmetrical Passing

Post by web design » Fri Aug 18, 2017 1:08 pm

The information in posts was awesome

POST REPLY