Standalone FORTRAN program for potential energy and forces

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Ommair Ishaque
Posts: 11
Joined: Sun Feb 18, 2018 10:22 am

Standalone FORTRAN program for potential energy and forces

Post by Ommair Ishaque » Tue May 05, 2020 2:36 pm

Hi,

I have written fortran 90 program for calculation of potential energies and forces. I have test it in my MD code written locally. Now I want to perform MD using openmm using my program for potential energies and forces.

Potential energy function I am using is develop for water simulation only and expensive.

So my question is what should be the key steps to make interface of my code with openmm.

1) Should I follow hello_sodium_chloride written in fortran?
2) Can we perform rigid body dynamics?

Best
Ommair

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

Re: Standalone FORTRAN program for potential energy and forces

Post by Peter Eastman » Wed May 13, 2020 10:48 am

Sorry for the delay in replying! This got lost in my inbox.

Could you elaborate on what you want to do? Do you want to use OpenMM only for integration, and have your own code do all the force and energy computations? Or do you also want to use force computations from OpenMM, adding in your own force along with the standard ones? What kind of force are you computing?

User avatar
Ommair Ishaque
Posts: 11
Joined: Sun Feb 18, 2018 10:22 am

Re: Standalone FORTRAN program for potential energy and forces

Post by Ommair Ishaque » Sun May 17, 2020 9:02 pm

Hi Peter,

1) Yes basically I want to do integration using openmm because mycode can do force and energy calculation. Mycode can also handle rigid body dynamics using quanternions. Is it possible in openmm?

2) Second thing I would like to cross check mycode forces, so it will be great to if openmm can calculate forces and do MD. My code can calculate interaction energies. it will be great to add my own force along with the standard ones

3) I am studying water potential developed in our group. It has Vdw, induction energy from induced dipole and three body interactions. Functional form of the potential is expensive.

Best
Ommair

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

Re: Standalone FORTRAN program for potential energy and forces

Post by Peter Eastman » Mon May 18, 2020 3:40 pm

That sounds like several very different projects. Taking them one at a time.

OpenMM doesn't do rigid body integration, though we do have a Python script you can use to build rigid bodies out of constraints and virtual sites: https://simtk.org/svn/pyopenmm/trunk/si ... s/rigid.py

The cleanest way to integrate your own force calculation routines into OpenMM is by writing a plugin. This is documented in the developer guide: http://docs.openmm.org/latest/developerguide/index.html. Plugins can only be written in C++, not Fortran.

You say you want to cross check the forces you compute by having OpenMM compute them as well. That implies it already supports the same calculation done by your code? If so, why not just use its existing implementation directly? Or if it doesn't already support that calculation, how can you use it to cross check your code?

User avatar
Michal Krompiec
Posts: 21
Joined: Tue Jul 02, 2019 1:17 pm

Re: Standalone FORTRAN program for potential energy and forces

Post by Michal Krompiec » Wed Jun 03, 2020 12:47 pm

Hi, I suggest considering Atomic Simulation Environment (ASE) as the MD driver. It is interfaced to several compute codes via a Calculator object, which computes energy and forces - you would need to implement your own Calculator which would communicate with your Fortran code.
Best,
Michal

POST REPLY