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.
As with most my scripts, further instructions of usage may be found trough the “-h” option.
shrink_traj v 0.4 help:
-h: print this help
-v: print version
-f: name of trajectory file (def. TRAJEC.xyz)
-s: step (every how many steps does it store a frame. Def. 3)
-o: output name (def. smallTRAJEC.xyz)
-cc: Cell Vectors for for Cubic Cell as: a b c (in Angstroms)
-cv: Cell Vectors as: a b c alpha beta gamma (in Ansgtroms and degrees)
-ej: Extra Jmol arguments (Def. “”)
Example: shrink_traj -s 50 -f TRAJEC.xyz -o smallTRAJEC.xyz -cv 5.50 5.50 9.4 90.0 90.0 90.0 -ej “background white; center”
The script can be found after this link: shrink_traj-v0.4