Metadata-Version: 2.1
Name: molgif
Version: 0.0.6
Summary: creates smooth gifs of rotating molecules
Home-page: https://www.github.com/michael-cowan/molgif
Author: Michael Cowan
License: UNKNOWN
Description: # molgif
        
        create smooth gifs of rotating molecules
        
        
        ## Examples
        
        ### Automatically rotate molecule for better view
        
            import molgif
            import ase.build
        
            # load in molecule (ase.Atoms object)
            molecule = ase.build.molecule('biphenyl')
        
            # specify save path
            save_path = 'biphenyl.gif'
        
            # create rotating gif with rot_gif function
            molgif.rot_gif(molecule, save_path, auto_rotate=True)
        
        
        ### Adjust loop time and FPS
        
            # time to complete one rotation (seconds)
            loop_time = 2
        
            # frames per second
            fps = 60
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           loop_time=loop_time, fps=fps)
        
        
        ### Turn off bonds and scale atomic sizes
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           add_bonds=False, scale=0.9)
        
        
        ### Switch rotation axis
        
            # switch between x, y (Default), or z
            rot_axis='z'
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           rot_axis=rot_axiz)
        
        
        ### Switch rotation direction and adjust bond widths
        
            # counterclockwise (ccw)[Default] or clockwise (cw)
            # based on rot_axis
            # 'x': view from left
            # 'y': view from top
            # 'z': view into screen
            direction = 'cw'
        
            # specify bond width in Angstrom
            bond_width = 0.4
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           direction=direction, bond_width=bond_width)
        
        
        ### Visualize charges and include a colorbar
        
            import random
        
            # random charges [-1, 1]
            chgs = [-1 + 2 * random.random() for i in molecule]
        
            molecule.set_initial_charges(chgs)
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           use_charges=True)
        
        
        ### Specify color of each atom
        
            # can be a string for one color or a list of custom colors
            rainbow = ['red', 'orange', 'yellow', 'green', 'blue', 'violet'] * 4
        
            # list much match number of atoms
            rainbow = rainbow[:len(molecule)]
        
            molgif.rot_gif(molecule, save_path, auto_rotate=True,
                           colors=rainbow)
        
        
        ## Requirements
        
        - ase
        - matplotlib
        - ImageMagick (command line tools must be installed)
        
Platform: UNKNOWN
Requires-Python: >=2.7
Description-Content-Type: text/markdown
