Question about integrator

Hi developers,

i have some question about the usage of gromacs.

recently my team have made a new integrator. i want to put the new integrator into gromacs. and my question is, could i use gromacs as a “force engine” and only use python or cpp API to achieve the function without recompiling and rewriting the source codes of gromacs?

i would appreciate it if you reply to me.
thank you so much.

another question is that, i’ve read tutorial about nb-lib. but i found that the sample given in document have some problem.
for example, in this sample, there is a line (#include "nblib/forcecalculator.h" ), but i don’t find the forcecalculator.h file in the nblib folder.
is there any tutorial else about nb-lib?

Hi! I moved your post to “Developer discussions”, since its more fitting there.

thank you, al42and. do i need to redescribe my questions after that?

No need to repeat yourself, the text is still here. I just changed the post category.

You need to modify GROMACS code to add a new integrator. The easiest way to add a new integrator is through the “modular simulator” framework. Here you can relatively easy plug in function do the differences steps of the integration. You also need to add a new enum value to the IntegrationAlgorithm enum to be able to choose the new integrator.

Thank you very much, hess.

Could i use other methods like using nblib to implement it without recompiling the code? because it’s often recompiling source code after modifying GROMACS code, which spends lots of time and debugging is a bit troublesome process.

On the other hands, i’m highly interested in nblib package and i would like to put the package into something such as machine learning assisted molecule dynamics. could you give me some example about nblib?

Yes, you can use nblib. There are examples in the documentation.

But if you recompile GROMACS only files that are affected by changes need to be recompiled. This will mostly be a handful when you are implementing an integrator.

i’ve read the chapter about nblib. examples in the documentation have some problem for me (maybe my overlooking).

first of all, In section “Global Definitions”, there is a line #include "nblib/forcecalculator.h. i try to search for this file using linux command and other way but i don’t find this head file named forcecalculator in nblib folder of the source code.

secondly, i have no idea that how to use the package, including importing and compiling this package.

I would apprecate it if you solve my problem.

Nblib is part of GROMACS, so you need to compiler GROMACS.

The file you are looking for seems to have been renamed to gmxcalculatorcpu.h