Archive for October 2009

Python and pizza.py


Pizza.py is a post-processing tool package for lammps – a MD package. I downloaded it and unpacked in a local directory. Each time I have to start it with a command like “python -f abs_path/pizza.py” where the abs_path is the absolute path to pizza.py source directory. However this directory is very long on my computer and it’s not a directory recognized by python. I found a convenient way to make the call easier. Just add the abs_path to a system environment variable named “PYTHONPATH” (if you have no such env variable, create it), then to use pizza.py we can start python as usual by typing “python” and then type in “import pizza” (no .py suffix!), then we have all the module defined in pizza at the interactive command line no matter what is your current working directory. PYTHONPATH will be add to the search path for modules if it’s not empty. I also add the abs_path to the PATH system environment variable, which makes I could type “pizza.py -f ***.py” directly in any working directory. Continue reading ‘Python and pizza.py’ »

Hard disk clone using dd command

A neat description of the several ways to use ‘dd’ command — see here

Keywords highlight and auto-completion for lammps input file in Notepad++

Lammps is a powerful multi-purpose  simulation software. To run a simulation with lammps, one needs to prepare an input script file in which commands are issued to control the work flow. There are MANY commands  and lots of keywords supported by lammps. I found it’s good if there is a text editor capable of highlighting the keywords and keyword auto-completion. Notepad++ is one of the best free text editor. To add support of highlighting and auto-completion is pretty easy in Notepad++ cause it has a user-friendly interface (a dialog) to allow user to define new keywords, symbols, comments, operators for a new language. I just made the support  for lammps commands. Continue reading ‘Keywords highlight and auto-completion for lammps input file in Notepad++’ »

调整(放大或缩小)chm文件字体的方法

chm格式的电子书想必每个人都会看一些吧,自从升级到IE8以后,chm阅读器的界面上没有调整字体大小的按钮了。如果制作chm时作者没使用css还好,如果用了则ctrl+鼠标滚轮方式也不能调整文字大小。看书那叫一个累!(你的电脑越高级越累,因为分辨率太高字体就小了。)不过下面链接的内容告诉你解决办法:就是在IE选项中禁止使用网页中指定的文字大小。 Continue reading ‘调整(放大或缩小)chm文件字体的方法’ »

O3D and missing atlbase.h

Followed the installation instruction given by O3D, I could not compile it still. The compiler complaint a missing “atlbase.h”. According to this link http://benjamin.smedbergs.us/blog/tag/atlbaseh/ , this header file is not available because I have just VS2008 Express version installed. And this file is not included in the Windows 2008 SDK. Apparently, Google guys assumed people should have VS professional version and SDK installed.:) But I’m not that rich yet. Looking for a solution!

Continue reading ‘O3D and missing atlbase.h’ »