Gallicchio-Lab / AToM-OpenMM

OpenMM-based framework for absolute and relative binding free energy calculations with the Alchemical Transfer Method
Other
118 stars 31 forks source link

Speed, accurracy, etc.. Different setups to test #7

Closed Oulfin closed 1 year ago

Oulfin commented 2 years ago

Hi Emilio, again.

I am opening this issue because I will run more pair of ligands with PTP1B for testing. Please, I would like to test different setups to see the influence of accuracy and speed, but not sure how much is possible to change for that.

Does hydrogenMass partition and time step size in the integrator has any influence in the speed of the simulation?

In OpenMM MD simulation, I normally used hydrogenMass=1.5amu and in the integration 0.004picoseconds time step.

Do you know which parameters are worth to play with to see the effect in energy and speed? or where I can find that information. Maybe everything was tested already in your publication.

Cool tool! Congrats to the team!

egallicc commented 2 years ago

We have not really tested hydrogen mass repartitioning yet. But it is something that we would love to have. Try it by turning on HMR here

 self.system = self.prmtop.createSystem(nonbondedMethod=PME, nonbondedCutoff=0.9*nanometer,
                                               constraints=HBonds)
Oulfin commented 2 years ago

I tried checking with PTP1B, changing to hydrogenMass=1.5*amu and checking speed in this file cntxt_localhost_0_0/ptp1b-lig_23471-lig_23468.log, there is no change ~60 ns/day.

Here the cntl file used: ptp1b-lig_23471-lig_23468_asyncre.txt

I was wondering for a standard system where you want to run fep with your method. What is the standard protocol? How many cycles/samples should be collected to have a converged/semi-converged deltaG value? Is it enough to run 8 hours? I read 24h in some cases, which is quite a lot. Which parameters are possible to change to get more cycles/samples? Does it make sense to do this?

Thanks!

egallicc commented 2 years ago

With hydrogen mass repartitioning you should be able to increase the MD time-step without dire consequences. Try TIME_STEP = 0.004 in the control file for example to run with a 4 fs time-step instead of 2 fs.

egallicc commented 2 years ago

The issue of simulation time length has been discussed a bit here. Fundamentally, in my opinion, there is no reasonable set time to reach convergence. Each system behaves differently and convergence can be ensured only by a careful analysis. Slow conformational rearrangements are the typical bottlenecks. Monitoring convergence is hard to do on a large scale. Often, the runtime is imposed by the available hardware, the time allotted for the project, and the number of calculations required by the project.

I would say that a wall-clock time of 24 hours per calculation is typical. The amount of data collected during this time depends on the number of GPUs assigned to the job. The more the better. Increasing the time-step like you are attempting is another very effective way to increase throughput, if it works. Free energy calculations are expensive.

Oulfin commented 1 year ago

Thanks for your comments regarding the length of the simulation.

When I tried TIME_STEP = 0.004 in the control file for example to run with a 4 fs time-step instead of 2 fs, I got ~90 ns/day, compared with the ~60 ns/day I got before with TIME_STEP = 0.002.

Thank you for your help,

egallicc commented 1 year ago

Thank you. Is this with hydrogen mass repartitioning? Can you share the corresponding modifications/settings?

egallicc commented 1 year ago

Addressed by c3aa1e700590c17c0d5dc1ef600d37b79469950e

The control file now accepts an HMASS option.

These settings have worked for us in limited testing:

HMASS = 1.5 TIME_STEP = 0.004

(50% increase in hydrogen mass + 4 fs MD time-step)