In your own code, you should have a system call function, which can be used to run any command in your system. Using C as example, you can write source code like this.
/*******************************************************/ system("g_rms -s xx.tpr -f xx.trr -o rmsd.xvg"); read in file rmsd.xvg to get the RMSD. if(RMSD>3A) system("mdrun -s **********""); else printf("very good, stable MD\n"); /*****************************************************/ dawei On Tue, Jun 12, 2012 at 3:28 PM, Bao Kai <paeanb...@gmail.com> wrote: > Hi, Dawei, > > We have some other codes. Sometimes, we can not know the range of the > physical parameters we need in advance. When we do the simulation, we > may find some required properties are not ready, then we need to run > some MD simulations to get the values of the properties. Then the > simulation can continue. > > We want to do the MD simulations only when necessary and we want to do > the MD simulations automatically. > > So I am wondering if we can complete some MD simulations and get the > required analysis results by calling the functions inside Gromacs > library. > > Thank you very much. > > Best Regards, > Kai > > > >From your description, why not just write a script to run various > Gromacs programs (MD, analysis, etc)? > > dawei > > On Tue, Jun 12, 2012 at 2:43 PM, Bao Kai <paeanball at gmail.com> wrote: >> Hi, all, >> >> I am wondering if Gromacs functions can be called by some other codes. >> I know we get some library files and header files and we can write >> our own analysis tools. >> >> But I still wonder to what extent the gromacs can be coupled to other codes. >> >> For example, can we just generate the topology and .gro and .mdp files >> ( we can write our own code to do that ), then call the the functions >> or procedures in Gromacs library to complete the MD simulation, and >> then call some functions to return the analysis results, such as >> density, viscosity, and etc. >> >> Thank you very much. >> >> Best Regards, >> Kai >> -- >> gmx-users mailing list gmx-users at gromacs.org >> http://lists.gromacs.org/mailman/listinfo/gmx-users >> Please search the archive at >> http://www.gromacs.org/Support/Mailing_Lists/Search before posting! >> Please don't post (un)subscribe requests to the list. Use the >> www interface or send it to gmx-users-request at gromacs.org. >> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists > -- > gmx-users mailing list gmx-users@gromacs.org > http://lists.gromacs.org/mailman/listinfo/gmx-users > Please search the archive at > http://www.gromacs.org/Support/Mailing_Lists/Search before posting! > Please don't post (un)subscribe requests to the list. Use the > www interface or send it to gmx-users-requ...@gromacs.org. > Can't post? Read http://www.gromacs.org/Support/Mailing_Lists -- gmx-users mailing list gmx-users@gromacs.org http://lists.gromacs.org/mailman/listinfo/gmx-users Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/Search before posting! Please don't post (un)subscribe requests to the list. Use the www interface or send it to gmx-users-requ...@gromacs.org. Can't post? Read http://www.gromacs.org/Support/Mailing_Lists