Hi,
I'm wondering if OpenMM has C++ public API for reading CHARMM force field and PSF file to set up the system in OpenMM, like the Python API functions CharmmPsfFile() and CharmmParameterSet(). I looked in the C++ API documentation and didn't find it.
I want to use OpenMM simulation in my C++ application with CHARMM force field. If there aren't such C++ APIs, do I have to write them myself or is there other way to do it? Any help is greatly appreciated.
Thanks,
Xinqiang
Is there a C++ API for read CHARMM force field and psf file?
- Xinqiang Ding
- Posts: 33
- Joined: Tue May 05, 2015 2:27 pm
- Jason Swails
- Posts: 47
- Joined: Mon Jan 07, 2013 5:11 pm
Re: Is there a C++ API for read CHARMM force field and psf f
No, there is no C++ API for working with force field files. It basically just has the library for actually running molecular mechanical calculations -- nothing for setup or analysis (for instance, there is no trajectory writer, either!).
If you want to work with CHARMM files, you will need to write your own C++ classes to deal with it. If you are OK using Amber files, you can use the C++ code I've written as well: https://github.com/swails/omm_cphmd
It doesn't do CpHMD like I had intended, but it does have the basic app-layer classes in C++ for dealing with Amber files.
If you want to work with CHARMM files, you will need to write your own C++ classes to deal with it. If you are OK using Amber files, you can use the C++ code I've written as well: https://github.com/swails/omm_cphmd
It doesn't do CpHMD like I had intended, but it does have the basic app-layer classes in C++ for dealing with Amber files.
- Peter Eastman
- Posts: 2593
- Joined: Thu Aug 09, 2007 1:25 pm
Re: Is there a C++ API for read CHARMM force field and psf f
Something you can do, though, is to use the Python API for reading the CHARMM files, then save the System it creates to an XML file with XMLSerializer. You can then load that file into your C++ program and simulate it there.
Peter
Peter
- Xinqiang Ding
- Posts: 33
- Joined: Tue May 05, 2015 2:27 pm
Re: Is there a C++ API for read CHARMM force field and psf f
Thanks for your response, Jason and Peter. It's very helpful. I guess I will first try to use the XMLSerializer, which sounds easier, to test my application. I can probably write a C++ function to do this at the end if it is necessary.
Xinqiang
Xinqiang