Archive for the ‘Modeling & Simulation’ Category.
November 10, 2011, 2:41 am
The key steps
1. Create a folder named “~/python-packages”, then create a path “~/python-packages/lib/python2.6/site-packages/” with
1
| mkdir -p python-packages/lib/python2.6/site-packages/ |
The above path containing the version number of Python should be adjust accordingly base on the actual Python version you are using.
This step sets up a directory structure that is needed by python modules.
Continue reading ‘Install Python modules as non-root user on HPC cluster’ »
November 8, 2011, 12:19 pm
To create more than one window in a gnuplot script could be necessary if you have many data series to plot. The following code snippet shows how:
1 2 3 4 5 6 7 8
| set term wxt 0
set grid xtics ytics
plot 'prop_stat.txt' u 1:2 ti "rg" w l , \
'prop_stat.txt' u 1:3 ti "rg^2" w l , \
'prop_stat.txt' u 1:4 ti "e2e^2 " w l
set term wxt 1
set grid xtics ytics
plot 'prop_stat.txt' u 1:5 ti "/" w l |
The essential point here is to use twice(or more times) “set term” commands with different window ID.
Continue reading ‘Multiple windows with gnuplot’ »
May 27, 2010, 9:18 pm
Just some notes:
1. manually download and install fftw3. Do not use the cgywin package, or the path will not be recognized by Gromacs.
2. Needed Cygwin packages: lapack, gcc, g77, make and nasm. nasm is required for both fftw and Gromacs in order to compile the assembly codes.
April 30, 2010, 12:31 am
1. by default, while using cff91, 1-2, 1-3 pairs are excluded. But 1-4 pair is considered as nonbond pairs. This is valid for both vdW and electrostatic interactions.
Continue reading ‘Nonbond interactions in Materials Studio and unit conversion’ »
March 10, 2010, 7:07 pm
An alternative and better ways is to use the ‘distance’, ‘angle’ and ‘dihedral’ commands of ‘cmd’ object. Note not using ‘get_distance’, ‘get_angle’ and ‘get_dihedral’, they are for different purpose. The syntax is e.g. ‘dihedral dih_obj_name, id 1, id 2, id 3, id4’, i.e. giving an object name and four atom selections. (In this example, we use atom IDs for atom selections. Other syntax for atom selection should work too.) Using this method, the measurement will be automatically updated while playing the movie
February 4, 2010, 11:58 am
According to this thread, LAMMPS has no API document available for developers, which is a pity! Similar discuss can be found for Gromacs here, which tells there is no API document neither. Both of them are powerful simulation codes and can be used as libraries, but apparently this is not the encouraged usage. Although in the official user manuals, extending methods are discussed more or less, but those are far from enough to fully get the ideas of the design and architecture of the sophisticated packages. People (developers) often have to turn to the mailing lists and hope to get peer help from other users, which can be misleading without the help from the original software designers. On the other hand, if complete API documents are available for the end users, I believe the community and the software itself will thrive rapidly and become much stronger.
January 12, 2010, 2:42 pm
This is just a rough comparison of the influence of compilers on the performance of lammps code on a VIC3.
Continue reading ‘Lammps performance with different compilers’ »
January 12, 2010, 11:34 am
Since October of 2009, many new features have been added to lammps, a powerful simulation software developed at Sandia national laboratories. I can’t list all of them, but you can find a patch list at here. Data manipulation and output for diagnostic or analysis purposes has been improved by introducing some new computes, such as compute */local, compute */molecule, compute reduce, fix ave/histo. New feature for visualizer interaction (fix imd) has been implemented. This promotes lammps to be an dispensable simulation engine in the tool chain of simulation work. New algorithms were also integrated, such as PRD and hessian free energy minimizer. The development of lammps keeps very active. It’s absolutely the first choice for my work.
October 27, 2009, 3:33 pm

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’ »
October 18, 2009, 8:07 pm
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++’ »