Molgif is an easy-to-use tool for creating GIF animations of molecules. Thanks to the widespread support of GIF file format, animations can be easily embedded into presentations, websites, wikipedia, and so forth.
Molgif works on Linux, BSD, OSX, Windows operating systems. Molgif requires Go version 1.5 or later. To download and compile the code, issue:
go get github.com/ilyak/molgif
Molgif has no external dependencies and uses only Go standard library. Animation rendering is performed using ray-tracing. Rendering is done in parallel using multiple CPUs available on the system.
List of available command-line flags with documentation can be obtained with
molgif -help
:
-X rotate along x axis in reverse
-Y rotate along y axis in reverse
-Z rotate along z axis in reverse
-a float atom size (default 0.4)
-b uint background color blue component
-d float bond size (default 0.2)
-e string cpu profiling data file name
-g uint background color green component
-h int output image height (default 256)
-l hide molgif banner
-o string output file name
-p render image in png format
-r uint background color red component
-t int animation loop time in seconds (default 3)
-w int output image width (default 256)
-x rotate along x axis
-y rotate along y axis
-z rotate along z axis
Below is a list of sample animations along with the molgif command used to create them.
molgif caffeine.xyz
molgif -X -a 0.2 benzene.xyz
molgif -w 500 -t 5 nanotube.xyz
molgif -Y -t 5 -r 80 -g 80 -b 80 water.xyz
molgif -r 220 -g 220 tnt.xyz
molgif -Y -t 8 -g 100 -b 100 -a 0.3 fullerene.xyz
molgif -t 8 adenine.xyz
molgif -t 4 guanine.xyz