Can I get the minimized energy by increasing steps?

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
POST REPLY
User avatar
Emilson Gomes
Posts: 5
Joined: Tue Sep 24, 2024 12:56 pm

Can I get the minimized energy by increasing steps?

Post by Emilson Gomes » Tue Sep 24, 2024 1:15 pm

I'd like to get minimized energy from pdb file. I want to get this as soon as possible, and the result should be the minimized one.

My questions are
1. Can i get this by just increasing steps?
2. Which machine works best for pdb file simulation?
3. Is multi-gpu helpful?
4. Is multi-node linked gpus helpful?

Thanks

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

Re: Can I get the minimized energy by increasing steps?

Post by Peter Eastman » Tue Sep 24, 2024 1:55 pm

If you want the minimized energy, call

Code: Select all

simulation.minimizeEnergy()
energy = simulation.context.getState(getEnergy=True).getPotentialEnergy()
Which machine works best for pdb file simulation?
It depends on the number of atoms in your system. Unless it's very small, a good GPU is strongly recommended.
Is multi-gpu helpful?
For a very large system, multiple GPUs might help.
Is multi-node linked gpus helpful?
OpenMM doesn't support splitting this operation across multiple nodes.

User avatar
Emilson Gomes
Posts: 5
Joined: Tue Sep 24, 2024 12:56 pm

Re: Can I get the minimized energy by increasing steps?

Post by Emilson Gomes » Tue Sep 24, 2024 6:19 pm

1. May I ask which program language performs best please? c++?

2. And what is the maxIteration argument in minimizeEnergy function?

3. what is the difference between maxIteration(in minimizeEnergy function) and nsteps (in simulation.step())

4. And which function actuall starts simulation? minimizeEnergy function or simulation.step function?

5. I am testing villin.pdb
The potential energy in step 100 was -159639.356052708, but after 100000 steps it is -140284.60014755663. The starting potential energy was minimized one? Why further steps get bigger potential energy?

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

Re: Can I get the minimized energy by increasing steps?

Post by Peter Eastman » Fri Sep 27, 2024 5:07 pm

May I ask which program language performs best please? c++?
C++ is faster than Python, but it might or might not matter depending on what you're doing. If most time is spent inside OpenMM routines, there won't be much benefit.
And what is the maxIteration argument in minimizeEnergy function?
It's the maximum number of iterations of L-BFGS minimization to perform. See the API documentation.
what is the difference between maxIteration(in minimizeEnergy function) and nsteps (in simulation.step())
They're unrelated. minimizeEnergy() performs energy minimization with the L-BFGS algorithm. step() integrates the equations of motion to run a simulation.
The starting potential energy was minimized one? Why further steps get bigger potential energy?
You're sampling the potential energy surface. If the starting point had unusually low energy (which is what you expect if it was energy minimized), then the simulation will spend most of its time in states with higher energy.

User avatar
Emilson Gomes
Posts: 5
Joined: Tue Sep 24, 2024 12:56 pm

Re: Can I get the minimized energy by increasing steps?

Post by Emilson Gomes » Thu Oct 10, 2024 10:51 am

Thanks, I am going to write script to find global minima of potential energy for any protein.
I find that minimize function just found local minima. Is there any module or function that i can use for the global minima with openmm?

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

Re: Can I get the minimized energy by increasing steps?

Post by Peter Eastman » Thu Oct 10, 2024 11:05 am

Global minimization is a very, very hard problem. For a system as large and complicated as a protein, there's no known way to find the global minimum. Instead you have to settle for conformational search methods that search for as long as you're willing to let them search, and find the lowest energy state they find.

Usually you care about the free energy minimum rather than the potential energy minimum. That's a related but different problem.

OpenMM includes a few methods that can be used to explore the free energy landscape: simulated tempering, metadynamics, and aMD. Other methods can be found in other libraries, such as openmmtools which includes replica exchange.

User avatar
Emilson Gomes
Posts: 5
Joined: Tue Sep 24, 2024 12:56 pm

Re: Can I get the minimized energy by increasing steps?

Post by Emilson Gomes » Thu Oct 10, 2024 4:47 pm

If I find the minimized the solution, and run the simulation.step(), that potential energy increases rapidly over the steps. I 'd like to find the potential energy minima, where the potential energy doesn't increase over the step.

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

Re: Can I get the minimized energy by increasing steps?

Post by Peter Eastman » Thu Oct 10, 2024 5:29 pm

If you start from any energy minimum and then move in any direction, the energy will increase. That's what a minimum means! If the energy doesn't immediately increase, that means you didn't start from a minimum.

User avatar
Emilson Gomes
Posts: 5
Joined: Tue Sep 24, 2024 12:56 pm

Re: Can I get the minimized energy by increasing steps?

Post by Emilson Gomes » Sun Oct 13, 2024 8:38 am

yeah, whta a silly question. What I should ask is to find the minima where the increasing gradient is not that big and sharp. But got very small gradient.

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

Re: Can I get the minimized energy by increasing steps?

Post by Peter Eastman » Mon Oct 14, 2024 8:15 am

That's a global minimization problem, which as noted above is really hard. LocalEnergyMinimizer does a local minimization, which is easy. Just follow the gradient downhill until it stops changing. You're guaranteed to end up at a minimum if you do it long enough, but it could be any minimum. You want to know what other minima may exist elsewhere in the energy landscape, and you want it to find the "best" one by some criteria. That requires thorough searching of the landscape.

POST REPLY