Quantum Chemistry and Cloud Computing scripts and tips

Monthly Archives: October 2013

One of the limitations of xyz coordinate format is generally the lack of extra information, such as the unit cell dimensions or lattice vectors. This can become annoying when we are working with solids, or we want to check whether our molecule has enough space around, in order avoid interaction with its own periodic replicas.
The new shrink_traj v0.4, includes the possibility to include the Jmol readable unit cell info the second line of the xyz file. This way, we can shrink a trajectory (or keep it as it is), and generate a new one which allows us to visualize the unit cell.

It also contains an option to insert Jmol commands directly into the xyz file, such as “background white”, which enables the possibility to customize the view of the structure/trajectory. Continue reading →

Some people seem to think that xmgrace is somehow cool, maybe because it contains an “x” on its name. Y personally prefer gnuplot or mathplotlib, but I got recently some “.agr” files I had to edit, and I finally decided to write a python script called agr2gpt, which makes a simple conversion from xmgrace files to gnuplot script, and extracts the data to different files (one per curve).

This is just the first version, so it just handles basic 2D graphs with several curves.
Besides the x and y data for each curve (unlimited amount of curves), it also parses the “xlabel” the “ylabel” and the legend of each curve.

As in most of my scripts, the “-h” option will provide some extra information about the usage, but in this first version, there are only two options: “-f” for the file name, and “-pl” if you want the pylab window to pop up with the image. Continue reading →