• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

src/github.com/ilyak/molgif/H03-May-2022-

LICENSEH A D08-Jan-2018727 1411

README.mdH A D08-Jan-20182.5 KiB9764

adenine.xyzH A D08-Jan-2018574 1816

benzene.xyzH A D08-Jan-2018352 1513

caffeine.xyzH A D08-Jan-2018916 2725

fullerene.xyzH A D08-Jan-20182 KiB6361

guanine.xyzH A D08-Jan-2018484 1917

molgif.goH A D08-Jan-201818.1 KiB840775

nanotube.xyzH A D08-Jan-20186.3 KiB149147

tnt.xyzH A D08-Jan-2018697 2422

water.xyzH A D08-Jan-20181.2 KiB2625

README.md

1# Molgif
2
3Molgif is an easy-to-use tool for creating
4[GIF](https://en.wikipedia.org/wiki/GIF) animations of molecules. Thanks to the
5widespread support of [GIF](https://en.wikipedia.org/wiki/GIF) file format,
6animations can be easily embedded into presentations, websites, wikipedia, and
7so forth.
8
9![caffeine](caffeine.gif)
10![fullerene](fullerene.gif)
11![benzene](benzene.gif)
12
13### Installation
14
15Molgif works on Linux, BSD, OSX, Windows operating systems. Molgif requires
16[Go](https://golang.org) version 1.5 or later. To download and compile
17the code, issue:
18
19    go get github.com/ilyak/molgif
20
21Molgif has no external dependencies and uses only [Go](https://golang.org)
22standard library. Animation rendering is performed using ray-tracing. Rendering
23is done in parallel using multiple CPUs available on the system.
24
25### Usage
26
27List of available command-line flags with documentation can be obtained with
28`molgif -help`:
29
30    -X            rotate along x axis in reverse
31    -Y            rotate along y axis in reverse
32    -Z            rotate along z axis in reverse
33    -a float      atom size (default 0.4)
34    -b uint       background color blue component
35    -d float      bond size (default 0.2)
36    -e string     cpu profiling data file name
37    -g uint       background color green component
38    -h int        output image height (default 256)
39    -l            hide molgif banner
40    -o string     output file name
41    -p            render image in png format
42    -r uint       background color red component
43    -t int        animation loop time in seconds (default 3)
44    -w int        output image width (default 256)
45    -x            rotate along x axis
46    -y            rotate along y axis
47    -z            rotate along z axis
48
49### Samples
50
51Below is a list of sample animations along with the molgif command used to
52create them.
53
54###### Caffeine molecule
55
56    molgif caffeine.xyz
57
58![caffeine](caffeine.gif)
59
60###### Benzene molecule
61
62    molgif -X -a 0.2 benzene.xyz
63
64![benzene](benzene.gif)
65
66###### Carbon nanotube
67
68    molgif -w 500 -t 5 nanotube.xyz
69
70![nanotube](nanotube.gif)
71
72###### Water cluster
73
74    molgif -Y -t 5 -r 80 -g 80 -b 80 water.xyz
75
76![water](water.gif)
77
78###### TNT molecule
79
80    molgif -r 220 -g 220 tnt.xyz
81
82![tnt](tnt.gif)
83
84###### Fullerene molecule
85
86    molgif -Y -t 8 -g 100 -b 100 -a 0.3 fullerene.xyz
87
88![fullerene](fullerene.gif)
89
90###### Adenine and Guanine nucleobases
91
92    molgif -t 8 adenine.xyz
93    molgif -t 4 guanine.xyz
94
95![adenine](adenine.gif)
96![guanine](guanine.gif)
97