Installing MPB

I wanted to try MPB also, it’s a photonic bandgap simulator by MIT. So I downloaded the package and tried to install in my office workstation. The config stage couldn’t pass since it didn’t find the FFTW library, though I have one installed. It turns out that mine is fftw3 while MPB is not compatible with fftw3 yet. So I have to installed fftw2 into my local directory. The installation for fftw2 is pretty straightforward. Now I need to specify both fftw2, libctl and HDF5 location into the configure of MPB (you may want to refer to Meep installation also, it’s quite similar). This is what I typed to configure MPB.


./configure --prefix=/scratch/kurniawano/local LDFLAGS="-L/scratch/kurniawano/local/fftw2/lib -L/scratch/kurniawano/Download/hdf5/lib" CPPFLAGS="-I/scratch/kurniawano/local/fftw2/include -I/scratch/kurniawano/Download/hdf5/include" --with-libctl=/scratch/kurniawano/local/share/libctl

However, when I typed make, it gives me an error, from this page, I found out that the problem is that I am using HDF5 version 1.8, so I needed to pass through the option -DH5_USE_16_API=1 in the CPPFLAGS. After adding this, my installation works fine 🙂

Nice bibliographic tool for researchers

I found Zotero as a nice and easy to use bibliographic tool, it is integrated with firefox browser, and runs in a browser. To add a bibliographic, you simply click the icon at the address bar. Easy to use.

http://www.zotero.org/

Database of refractive index of materials

SOPRA has kindly provided database for various materials. You can download from the website, by clicking “Download center” at the right hand top, and then click “N&K database” at the left menu. You will have to register before you can download. It’s free!

I also downloaded FreeSnell to query the database. Anyway the database is a textfile, you can open it without any other software. But the program “nk” provided by FreeSnell makes things easier.

Download the files and unzip it. You will need to change the $(prefix) variable from each Makefile to change to your preferred installation location. The installation steps is given in the link above. If you install on other directories, you will need to modify the script “nk” and specify the location of “scm”. After this you will be able to run nk.

Before querying database, you will need to add the files into the database. Look at this page on how to do it.

and from the manual:
$ nk co .3.um .5.um 1.3.eV
co: 1.218+2.11i 300.nm (4.13.eV) (33333.3.cm^-1)
co: 2.025+3.72i 500.nm (2.48.eV) (20000.cm^-1)
co: 3.85+4.77i (954.nm) 1.3.eV (10485.2.cm^-1)
$ nk Al 400.cm^-1
al: 75.77+1.7e+02i (25.0.um) (0.0496.eV) 400.cm^-1

The `–plot’ option creates an encapsulated PostScript graph of n and k/n for the material specified.

nk –plot co

NOTE: in order to plot you need to have “gv”.

Octave C++ Quick Reference

I found the Octave Wiki which provides a quick reference how to port Octave code to its C++ using Octave’s library. But somehow, recently I can’t access the wiki. Luckily, I can still find it in the Google’s cache search.

You can see it here:
OctCppQuickRef.pdf

UPDATE:
Now I can access the page again. it’s here:
http://wiki.octave.org/wiki.pl?CPPQuickReference

Tools to convert various different Bibliography format

I found this tool Bibutils to convert various bibliography format, such as from RIS to Bibtex, or Endnote, etc.

Mostly we need to convert to intermediate xml format first before we convert to other formats. For example to convert from ris to bibtex, we do


% ris2xml mybib.ris > mybib.xml
% xml2bib mybib.xml > mybib.bib

Installing Wikindx in Kubuntu Hardy

from the website:

WIKINDX is a free bibliographic and quotations/notes management and article authoring system designed either for single use (on a variety of operating sytems) or multi-user collaborative use across the internet.

To install Wikindx in Kubuntu Hardy, we need first to install Apache, MySQL, and PHP. To do this, type:

%sudo apt-get install apache2 mysql-server php5

From the internet, I found a blog describing a more detail steps to do the post-install configuration. Basically, we need to:

  1. clear our cache in firefox
  2. edit php5.conf in /etc/apache2/mods-available
  3. restart apache server

Once all these installed, we are ready to install Wikindx. You can check this installation page or the one from linux.com.

To install Wikindx, we will need to create a Database. To do this install mysql-admin to make it easy:

% sudo apt-get install mysql-admin

Let’s create a database “wikindx3” for the apps.

% mysql -uroot -p<your root password>

mysql> create database wikindx3;

mysql> exit

then run mysql-admin from K-> Development->MySQL Administrator

login as root, and click “user management”

create new user “wikindx”

click the “wikindx” (usually blank and no names), and click the host name anywhere @. Assign all privileges to this user on wikindx3 database.

Now untar the Wikindx source file and copy the untarred folder to /var/www/. Then we need to restart the web server

% sudo /etc/init.d/apache2 restart

open the browser and go to http://localhost/wikindx3/

This will show the configuration page. You can create more users in the admin tab. That’s all!