How to superpose structures first before calculating the potential?

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Xinyu Gu
Posts: 7
Joined: Thu Jun 06, 2019 9:09 am

How to superpose structures first before calculating the potential?

Post by Xinyu Gu » Fri Aug 14, 2020 3:53 pm

Dear all,

Hope you all are doing well!

I'm wondering if there is a way to superpose structures first before calculating a specific potential. I have a reference structure and I'd like to superpose structures to it and then use the superposed coordinates to calculate a certain potential.

Your helps and ideas would be greatly appreciated!!

Best,
Xinyu


User avatar
Xinyu Gu
Posts: 7
Joined: Thu Jun 06, 2019 9:09 am

Re: How to superpose structures first before calculating the potential?

Post by Xinyu Gu » Fri Aug 14, 2020 4:19 pm

Dear Peter,

Thank you so much for your quick reply. I'd love to use mdtraj but I'm wondering how to use it in a force field function - I'm writing a cartesian principal component biased potential, like V=k*(pc-pc0)^2. But I need to superpose structures when computing "pc" for each structure during the simulation. And I'd like to know how to use mdtraj.superpose() in openmm force field. I'll sincerely appreciate it if you could help me figure it out.

Thank you again for your time! Hope you stay well and safe :-)


Best,
Xinyu

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

Re: How to superpose structures first before calculating the potential?

Post by Peter Eastman » Sat Aug 15, 2020 5:24 pm

If you want the superposition to be built into the force field, that's much more complicated. Am I correct in understanding you want to create a potential that is totally invariant to global rotations and translations? Whatever coordinates you give it, the potential should be computed from coordinates that have been transformed to superpose the system on a reference structure?

In principle you should be able to write a plugin to do that, but it's certainly going to be complicated. Every atom will affect the transformed position of every other atom, so your energy will have the form

E(r) = E'(T(r) r)

where r is the vector of coordinates, T(r) is the transformation matrix (which itself depends on r), and E'(r) is the "ordinary" potential function you evaluate after transforming the coordinates. The force is then F = -dE/dr, which will involve a lot of complicated chain rule terms, and every single atom will exert a force on every other atom.

User avatar
Xinyu Gu
Posts: 7
Joined: Thu Jun 06, 2019 9:09 am

Re: How to superpose structures first before calculating the potential?

Post by Xinyu Gu » Sat Aug 15, 2020 6:15 pm

Dear Peter,

Thank you very much for your reply. And yes, your understanding is correct. I know it's complicated and I have no idea about how to compute the transformation matrix in an openmm force field - I didn't find a way to read the coordinates of a whole structure during openmm simulation. I was writing to ask if there is a convenient way in openmm to do this. But if it's really complicated, I'll try to find an alternative way to conduct my simulations.

Thank you again for your time, I sincerely appreciate it!!


Best,
Xinyu

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

Re: How to superpose structures first before calculating the potential?

Post by Peter Eastman » Sat Aug 15, 2020 9:26 pm

You would need to write a plugin to implement a new type of force. The developer guide describes how to do this: http://docs.openmm.org/latest/developerguide/index.html

POST REPLY