Installation problems

The functionality of OpenMM will (eventually) include everything that one would need to run modern molecular simulation.
User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 11:26 am

Hi

I'm trying to install OpenMM, but there are no Installation instructions anywhere in the source, or a list of dependencies (like Cmake-2.6, we have 2.4, will it still work?). I get an error message like
***********************************************
siddharth@littleyerry ~/Downloads/OpenMMPreview2-Source/src/build $ cmake ../
WARNING: This project requires version 2.6 of CMake. You are running version 2.4.8.

-- Cannot determine repository type. Please set UPDATE_TYPE to 'cvs' or 'svn'. CTest update will not work.
CMake Error: Specify CUDA_INSTALL_PREFIX
-- Configuring done
***********************************************
but where do I set these env variables? Simply exporting them as bash env variables does not seem to work...

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

RE: Installation problems

Post by Peter Eastman » Tue Mar 10, 2009 11:30 am

Hi Siddharth,

No, the message means exactly what it says: CMake 2.6 is required.

Have you tried the precompiled binaries? You may not need to recompile it from source.

Peter

User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

RE: Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 11:33 am

I should be more specific, we run Gentoo Linux, and I wanted to play around with OpenMM. I assume that all I need is the CUDA SDK, can I run it in emulation mode, or do I actually need to have the graphics card installed along with the drivers?

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

RE: Installation problems

Post by Peter Eastman » Tue Mar 10, 2009 11:36 am

The CUDA code won't work in emulation mode, but OpenMM includes a reference implementation written in C/C++. It's slow, but it works fine for just trying out the API and seeing how it works.

Peter

User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

RE: Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 11:59 am

Thanks for the quick response. I was following the Gromacs presentation where it used OpenMM, and I thought about trying it out to see if I can use it for our own home-grown MD engine.
If I use the precompiled binaries, in order to get started, I still need to include "OpenMMContext.h" somehow, right, thats the place to start setting up and defining my System, Forces etc?

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

RE: Installation problems

Post by Peter Eastman » Tue Mar 10, 2009 12:37 pm

Correct. You'll need to include the header files for all the classes you use (OpenMMContext.h, System.h, etc.).

We hope to make a lot of these things easier in the next version.

Peter

User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

RE: Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 1:52 pm

So I tried working with the recompiled libraries, and it creates the
.
|-- libOpenMM.so
`-- libOpenMMCuda.so

as expected, however I cant seem to get it to incorporate into my code, I keep getting errors of the type

src/openmm.cc:1:27: error: OpenMMContext.h: No such file or directory
src/openmm.cc:2:20: error: System.h: No such file or directory
I added the path to the libraries in my Makefile, any idea how I can get my sample code to find these? Actually an example of a Makefile from your end would be very useful in using these precompiled libraries..

User avatar
Peter Eastman
Posts: 2588
Joined: Thu Aug 09, 2007 1:25 pm

RE: Installation problems

Post by Peter Eastman » Tue Mar 10, 2009 2:00 pm

You need to include the openmmapi/include folder from the source code in your include path. With gcc, you do that using the -I flag.

Peter

User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

RE: Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 4:14 pm

I got it to compile (in certain cases). My sample file looks like
*******
#include <openmm.h> // My own header file

#include "CMMotionRemover.h"
#include "GBSAOBCForce.h"
#include "HarmonicAngleForce.h"
#include "HarmonicBondForce.h"
#include "NonbondedForce.h"
#include "OpenMMContext.h"
#include "OpenMMException.h"
#include "PeriodicTorsionForce.h"
#include "RBTorsionForce.h"
#include "System.h"
#include "Vec3.h"

using namespace OpenMM;

static
void openmm_init (void)
{
System *openmm_sys = new System(10,5);
}

void openmm_setup (void)
{
printf ("in setup\n");
openmm_init();
}
*************
This fails with
----
./src/openmm.o: In function `openmm_init()':
openmm.cc:(.text+0x26): undefined reference to `OpenMM::System::System(int, int)'
collect2: ld returned 1 exit status
----
But if I comment out the openmm_init() function, it compiles fine, any suggestions?

User avatar
Siddharth Srinivasan
Posts: 223
Joined: Thu Feb 12, 2009 6:49 pm

RE: Installation problems

Post by Siddharth Srinivasan » Tue Mar 10, 2009 4:17 pm

I should say "If I comment out the call to openmm_init() in openmm_setup(), it compiles fine". I want the openmm_setup() function to be specific to my applications datastructures, do all the translating, and then call openmm_init() with generic datatypes to setup the OpenMM datastructures.

POST REPLY