Sunday, June 28, 2009

Eclipse Galileo

Eclipse continues it's annual eclipse release, this year with Galileo. Available to download from here.

33 projects have released new updates, so something for everyone. Of particular note for Mac users, is the option for Cocoa, the successor to the Carbon API. (Pick when you download).

I've tried a handful of plugins and they all seem to work fine:
  • Subclipse
  • CDT (new release)
  • PyDev
  • Aptana Studio

You can find numerous reviews on the eclipse website.

Sunday, June 14, 2009

Eclipse with Django

Django is popular web framework written in Python. For Python users it is an obvious choice to deploy web applications. Once again I return to my favourite IDE to develop with Django - Eclipse.

Two plugins are needed to bring Django support to Eclipse. The second handles the Django template language. Grab the plugins:
  1. PyDev (Python)
  2. Aptana Studio (Python + Django)
Both plugins are from Aptana, PyDev is a plugin to their IDE. Thankfully, both work through Eclipse as well.

Monday, June 1, 2009

Eclipse with C++/OEChem


The final post in this series, allowing you to develop your OpenEye applications using Eclipse.

First off you will need to ensure the CDT plugin is installed, or download Eclipse for C++ developers.

Now we are set to go. Create a new C++ Project (Executable > Hello World). Edit/Add C++ files to the source folder. Next we need to inform the project about OpenEye.

  • Open your project properties (Project > Properties).
  • Pick C/C++ Build > Settings
  • Edit [ All Configurations ] (by default Debug and Release)
  • Set include paths (-I) under GCC C++ Compiler > Directories > Include paths
  • Add $OE_DIR/toolkits/include
  • Set library paths (-L) under GCC C++ Linker > Libraries > Library search path
  • Add $OE_DIR/toolkits/lib
  • Set specific libraries (-l) under GCC C++ Linker > Libraries > Libraries
  • Add oeplatform, oesystem, oechem, m, z, pthread
  • You can set further Makefile details from this panel (optimisation etc)
If you have multiple versions of the toolkit you can create a configuration for each one.

Between C++/Java/Python you should be able to code away happily within Eclipse.

Friday, May 1, 2009

Eclipse with Java/OEChem


java.com - Check out Java in Action


Following up from a previous post, here I present the settings required to get Eclipse running with the OEChem Java wrapper.

Make sure you have Eclipse and and working OpenEye installation setup and running first.

  1. Create a regular Java Project
  2. Configure your build path to add:
  3. a) Under sources add a linked source $OE_DIR/java/libs
  4. b) Under libraries add external jars, $OE_DIR/java/*.jar (add them all)
  5. Run your OEChem program, if you get license errors edit the run configuration; under environment add OE_LICENSE, with $OE_DIR/etc/oe_license.txt; OE_HOME with $OE_DIR and OEJAVA with $OE_DIR/java

Obviously substitute $OE_DIR with your actual absolute file path.

Now Eclipse's CDT can be used to use the C++ toolkit direct, so I'll post that - once I've started to use it!

Saturday, April 18, 2009

Eclipse with Python/OEChem

Eclipse is an excellent IDE. Alas it doesn't have support for Python - fear not the PyDev plugin comes to the rescue. (Installation information here).

While that now works like a charm, if you have an OpenEye license to hand (academics see this post) if would be great to use the Python toolkit through Eclipse.

Follow these steps to make your Python project OEChem ready:

Window > Preferences > Pydev > Interpreter - Python.
To Libraries add your $OE_DIR/python folder.
To Environment add OE_LICENSE and OE_DIR, with their respective locations.
Create a new PyDev project and it should have OE capability by default.

Java users don't worry, I'll cover OEChem/Java in my next post.

Thursday, April 16, 2009

GCC 4.3 on RHEL4

There comes a time when you'll need the latest (or newer compilers). Unfortunately they are not always easy to upgrade.

Here I've installed GCC 4.3 on RHEL4.4, but in principle should work for any distribution.

Download the latest version of these:

Compile binutils first

./configure --prefix=/home/craigb/binutils
make
make install

Add your new binaries to your PATH (export PATH=/home/craigb/binutils/bin:$PATH) and libraries to LD_LIBRARY_PATH (export LD_LIBRARY_PATH=/home/craigb/binutils/lib:$LD_LIBRARY_PATH) next compile GMP

./configure --prefix=/home/craigb/gmp
make
make install

Add these libraries to your LD_LIBRARY_PATH (export LD_LIBRARY_PATH=/home/craigb/gmp/lib:$LD_LIBRARY_PATH), next compile MPFR

Download the latest patches first
./configure --prefix=/home/craigb/mpfr
make
make install

Add these libraries to your LD_LIBRARY_PATH (like above), now compile GCC

cd /home/craigb/gcc-build (Note not the same folder as the source)
/home/craigb/gcc-4.3.3/configure --prefix=/home/craigb/gcc --with-gmp=/home/craigb/gmp --with-mpfr=/home/craigb/mpfr
make
make install

You should find GCC in /home/craigb/gcc/bin!

It is good practise to read the INSTALL and/or README files for all the applications before running the generic configure, make, make install above. If make check or make test is available do that as well.

Friday, April 3, 2009

Install CPMD

CPMD is massively parallel code. There is little point running it serially as it will literally take forever to do anything useful. I'm providing the instructions I used to compile the parallel version on our HPC facility, therefore they may need altering for your computer.

Some technical details:
  • CPMD 3.13.1
  • Intel compilers/MKL 10.1
  • openSUSE 10.3, 64-bit
cd SOURCE
./mkconfig.sh IFORT-AMD64-MPI > Makefile

# In Makefile alter
FFLAGS = -pc64 -O2 -unroll
LFLAGS = -L/opt/intel/mkl/10.0.3.020/lib/em64t -lmkl_intel_lp64 -lmkl_sequential -lmkl_core
CC = mpicc -cc=icc
FC = mpif90 -fc=ifort -c
LD = mpif90 -fc-ifort -i-static

Run make, hopefully it will compile happily, copy cpmd.x to somewhere on your $PATH.

It would be wise to test your binary. First download cpmd-test.tar.gz from the contrib section of the downloads (tests are not included with the source). Run as mpisub 5x2 cpmd.x inp-1 or similiar depending on your setup. This command would use 5 dual processor computers.