openmm-cookbook icon indicating copy to clipboard operation
openmm-cookbook copied to clipboard

Run a REST simulation and write a trajectory file

Open gitkol opened this issue 1 year ago • 4 comments

Hi, I have been using successfully the code in the REST tutorial, many thanks for that, but I am having a most likely trivial problem. I'd like to write a trajectory file of the thermodynamic state configurations for analysis, but I just couldn't figure out how to do this. Can you show me an example? Thank you very much, Istvan

gitkol avatar Aug 08 '23 14:08 gitkol

@zhang-ivy who wrote the REST tutorial might be able to help with this?

sef43 avatar Aug 21 '23 10:08 sef43

To extract trajectories for each thermodynamic state, you'll need to pull out the positions from the checkpoint file using openmmtools.

Here is a script from my recent paper that does this. The script is written for alchemical free energy calculations (where there is a hybrid topology that corresponds to old and new residues, aka two sets of positions). You'll need to adapt the script to handle a vanilla topology (and one set of positions). You'll also need to make sure to set state to the index of the thermodynamic state you're interested in pulling positions from and replica_id=None (the script as is currently writes out trajectories per replica using replica_id.) https://github.com/choderalab/perses-barnase-barstar-paper/blob/main/scripts/05_analyze/run_make_traj_per_replica.py

zhang-ivy avatar Aug 21 '23 13:08 zhang-ivy

Thank you Ivy, I can start from here. Appreciate it.

Best regards,

Istvan

On Mon, Aug 21, 2023 at 9:07 AM Ivy Zhang @.***> wrote:

To extract trajectories for each thermodynamic state, you'll need to pull out the positions from the checkpoint file using openmmtools.

Here is a script from my recent paper that does this. The script is written for alchemical free energy calculations (where there is a hybrid topology that corresponds to old and new residues). You'll need to adapt the script to handle a vanilla topology (and one set of positions).

https://github.com/choderalab/perses-barnase-barstar-paper/blob/main/scripts/05_analyze/run_make_traj_per_replica.py

— Reply to this email directly, view it on GitHub https://github.com/openmm/openmm-cookbook/issues/32#issuecomment-1686296083, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDNJ2TMGTGCAWM2UKVKCP3XWNMRRANCNFSM6AAAAAA3ISDBYQ . You are receiving this because you authored the thread.Message ID: @.***>

gitkol avatar Aug 21 '23 13:08 gitkol

Thanks again, Ivy. I finally had time to try this and it works. :) Just one question, running REST on a single GPU is obviously pretty slow, I can see that. Is there a way to run these simulations on multiple GPUs if they are on the same machine?

Thanks and best regards,

Istvan

On Mon, Aug 21, 2023 at 9:47 AM Istvan Kolossvary @.***> wrote:

Thank you Ivy, I can start from here. Appreciate it.

Best regards,

Istvan

On Mon, Aug 21, 2023 at 9:07 AM Ivy Zhang @.***> wrote:

To extract trajectories for each thermodynamic state, you'll need to pull out the positions from the checkpoint file using openmmtools.

Here is a script from my recent paper that does this. The script is written for alchemical free energy calculations (where there is a hybrid topology that corresponds to old and new residues). You'll need to adapt the script to handle a vanilla topology (and one set of positions).

https://github.com/choderalab/perses-barnase-barstar-paper/blob/main/scripts/05_analyze/run_make_traj_per_replica.py

— Reply to this email directly, view it on GitHub https://github.com/openmm/openmm-cookbook/issues/32#issuecomment-1686296083, or unsubscribe https://github.com/notifications/unsubscribe-auth/AKDNJ2TMGTGCAWM2UKVKCP3XWNMRRANCNFSM6AAAAAA3ISDBYQ . You are receiving this because you authored the thread.Message ID: @.***>

gitkol avatar Mar 08 '24 18:03 gitkol