Asymmetrical Passing
Asymmetrical Passing
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
Thanks,
Yan
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Asymmetrical Passing
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
Peter
Re: Asymmetrical Passing
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?
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?
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Asymmetrical Passing
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?
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?
Re: Asymmetrical Passing
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?
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?
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Asymmetrical Passing
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.
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.
Re: Asymmetrical Passing
I see. So to implement something like Gay-Berne force in OpenMM, I should use <CustomManyParticleForce>, right?
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Asymmetrical Passing
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.
Re: Asymmetrical Passing
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.
- web design
- Posts: 10
- Joined: Fri Aug 18, 2017 12:43 pm
Re: Asymmetrical Passing
The information in posts was awesome