Kind of my extended memory with thoughts mostly on Linux and related technologies. You might also find some other stuff, a bit of SF, astronomy as well as old (quantum) chemistry posts.
Search This Blog
Saturday, December 17, 2005
Energy converter for chemists
I found a nice Energy Converter which can be useful for chemists.
Labels:
chemistry,
links,
quantum chemistry
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:
#!/usr/bin/python from sys import * def change(a,linia): return float(linia.split()[a]) def reading (file_inp): factor=1 a_number=int(file_inp.readline()) file_inp.readline() for i in range (a_number): linia=file_inp.readline() atom.append(linia.split()[0]) x.append(change(1,linia)*factor) y.append(change(2,linia)*factor) z.append(change(3,linia)*factor) file_inp.close return(atom,x,y,z,a_number) atom=[] x=[] y=[] z=[] atom,x,y,z,a_number=reading(open(argv[1])) print('$title') print(argv[1]) print('$coord') for n in range(a_number): print('%14.4f %10.4f %10.4f %7c'% (x[n],y[n],z[n],atom[n])) print('$end')To use it you have to copy xyz.py 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/xyz.py '%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).
- 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
- Now, we are creating swap on our file:
mkswap /swapfile
- Next we have to edit the /etc/fstab file, by adding:
/swapfile none swap defaults 0 0
- After that, we can easily turn on our swapfile:
swapon -a
- 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.
- At thbeginningng it's good to turn on Options--Learning messages.
- It's much better to download the latest snapshot, than the EasyChem from SF.
- If you want include LaTeX fonts into your file, you should change locales before starting EasyChem:
export LANG=C; easychemAt 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.
- You choose any of application and setting Default for all windows in"Window Specification" in Attributes.
- Next setting "No application icon" to Yes (Application Specific).
- 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).
- 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.
- 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.
- You can now restart your WindowMaker.
Linux4Chemistry
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
Labels:
computing,
Gaussian,
linux,
quantum chemistry,
shell
Subscribe to:
Posts (Atom)