kassonlab / gmxapi

(outdated) fork of https://gitlab.com/gromacs/gromacs
http://gmxapi.org/
Other
52 stars 13 forks source link

How to control the operation of MD by output conformation #273

Closed ShenWenHuibit closed 1 year ago

ShenWenHuibit commented 1 year ago

Hello developers:

I am new to gmxapi, I hope to control the operation of MD through the conformation generated during the MD run. For example, I have a reference configuration ref.gro and an initial configuration init.gro, and then start running MD with init.gro,I hope to calculate the rmsd value between the current configuration and ref.gro at regular intervals during the running. When the rmsd<threshold value, stop the run and re-run the MD simulation with init.gro.

I wonder if such process can be achieved by gmxapi? If possible, I hope you can give some suggestions.

thank you very much!

eirrgang commented 1 year ago

Thank you for writing.

I think you will find that the example script at https://github.com/kassonlab/gmxapi-tutorials/blob/main/examples/fs-peptide.py does something very similar to what you are asking in the figure1c function.

That example was last tested with a thread-MPI build of GROMACS 2022 and gmxapi 0.3. I will be retesting and updating those examples shortly for an OpenMPI build of GROMACS 2023 and gmxapi 0.4, for eventual inclusion in the main GROMACS tutorials. Please let me know if you find the example buggy or inadequate.

Also, please consider using the gmxapi tag in the GROMACS user forums for follow-up questions so that the conversation is visible to the most people.

I hope that helps. Cheers!