Search This Blog

Saturday, December 17, 2005

Energy converter for chemists

I found a nice Energy Converter which can be useful for chemists.

My ports for Crux

You can find the list my ports hear. There are some programs which can be helpful for chemists: OpenBabel, EasyChem, Molden, ViewMol, ChemTool, gChemPaint and Povray. The last one can be also useful for others. I also added Polish dictionary for aspell, it have alt(ernative) in the name, but it is the official dictionary now. There are also my version of Gajim (with speller), Mutt with sidebr patch and WmCalClock (fixed problems with download). Recently, I added nice tool to creating static html image galleries - igal.

Tuesday, December 06, 2005

Viewmol filter for xyz files

I created the filter which allow to load files with Cartesian geometry into viewmol. These files have a number of atoms in the first line and comments in the second one. Next description of all atoms goes. In each line there are: symbol of element and location of atom (x,y and z vectors). You can obtained this kind of files i.e. from molden program. The filter script is written in python:
from sys import *
def change(a,linia):   
 return float(linia.split()[a])
def reading (file_inp):
 for i in range (a_number):
for n in range(a_number):
 print('%14.4f %10.4f %10.4f %7c'%  (x[n],y[n],z[n],atom[n]))
To use it you have to copy file into your $VIEWMOLPATH (usually in /usr/lib/viewmol), and modify your viewmolrc file (it should be located in your $VIEWMOLPATH). You have to add one line :
option xyz $VIEWMOLPATH/ '%s' "SCF Done"
Now you can read your xyz file into viewmol using commandline option:
viewmol -xyz name_of_file

Monday, November 28, 2005

[Not only] Crux and swapfile

I prefer swapfile to swap partition in Linux. The file is much more flexible and have the same performance (in 2.6 kernel). The way to create swapfile in Crux is standard, but you have to hack /etc/rc file to make in turning on in the system start sequence (see point 5).
  1. First you have to create the file. The size of a swap should be equal to a memory size (of course if you have a lot of memory you don't need swap). In example, we are creating 256Mb swapfile:
    dd if=/dev/zero of=/swapfile bs=1M count=256
  2. Now, we are creating swap on our file:
    mkswap /swapfile
  3. Next we have to edit the /etc/fstab file, by adding:
     /swapfile  none   swap   defaults  0 0
  4. After that, we can easily turn on our swapfile:
    swapon -a
  5. It will be nice to have swap turning on it the time of system start. To get this we have to edit the /etc/rc. In the standard Crux configuration a swap is turn on before mounting filesystems. To change it we move
    # Activate swap
    /sbin/swapon -a
    after lines which mounting partition where our swapfile is:
    # Mount local filesystems
    /bin/mount -n -o remount,rw /
    /bin/rm -f /etc/mtab*
    /bin/mount -a -O no_netdev

Thursday, November 24, 2005

EasyChem - to drawing chemical structures

I found very nice soft to drawing chemical structures. It's name is EasyChem and is made by Francois-Xavier Coudert. One of the most interesting feature is that you can use LaTeX commands. There are things you should to now.
  1. At thbeginningng it's good to turn on Options--Learning messages.
  2. It's much better to download the latest snapshot, than the EasyChem from SF.
  3. If you want include LaTeX fonts into your file, you should change locales before starting EasyChem:
           export LANG=C; easychem
At the very end I would like to write, that at the moment I miss only one thing. There are no ornament with symbol of current (for ions, zwitterions).

Monday, November 21, 2005

WindowMaker without DockApps

One of the most annoying thinks in WMakera, are IconApps. Theoretical you can easily turn them off, but you turn off a lot of useful DockApps too. One of the strategy is choosing one application after another and changing to Yes its "No application icon" attribute, but is annoying too. Therefore I was looking for another method. And I found something.
  1. You choose any of application and setting Default for all windows in"Window Specification" in Attributes.
  2. Next setting "No application icon" to Yes (Application Specific).
  3. No you have to open terminal and lists all running applications (your applications). For example ps -u $USER. From this list you have write down all of your dockapps (i.e. wmcalclock, wmnet, wmsysmon, docker).
  4. Now you have to find what its WM_CLASS attribute. You can use xprop command to do this, i.e.: xprop -name wmnet In this case you should get two string wmnet and WMNET.
  5. After you write down all of this information you need to edit ~/GNUstep/Defaults/WMWindowAttributes file. You have to turn on AppIcon for chooses application. In our example you have to add this code: wmnet.WMNET = { NoAppIcon = No;}; For other applications you have to write theirs WM_CLASSes at the beginning of line.
  6. You can now restart your WindowMaker.
You should keep in mind that when you find new interesting DockApp it doesn't appear on your desktop, but it not a big problem. You have to find his WM_CLASSes and once more edit WMWindowAttributes file, and of course restart your WindowMaker.


I've just hit the very interesting website, where many chemistry related programs are listed.

Saturday, November 19, 2005

WindowMaker and Docker

Docker is very nice DockApp which simulate KDE/Gnome system tray. I found that the Docker work much nicer in WindowMaker with options -wmaker (obvious) and -vertical (not so clear).

Wednesday, November 16, 2005

When ports building fails

Sometime port failed to build. It would be nice to see what wrong with source, but working directory disappear... I was wondering if it possible to save source file, and finally find fitting option. You need to use pkgmk -kw (kw from keep working).

Massive jobs starting in queue system

Quite often we need to start many jobs in a supercomputer center. In this example I have to submit Gaussian files with com extension. All of them are in one directory. (I have my own script g03-test to start Gaussian). We can do it in a one line:

for i in *.com ; do g03-test "$i"; done