Metadata-Version: 2.1
Name: molgif
Version: 0.1.5
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
        
        ### Use auto_rotate to find the best viewing angle
        
            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)
        
        
        ### Add a legend
        
            molgif.rot_gif(molecule, save_path, add_legend=True)
        
        
        ### Specify the 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, colors=rainbow)
        
        
        ### Use a dictionary to quickly color by atom type
        
            # default colors will be used for types not specified
            molgif.rot_gif(molecule, save_path, colors=dict(C='hotpink'),
                           add_legend=True)
        
        
        ### Anchor an atom to be at the center of rotation
        
            # define index of atom to anchor
            anchor = 3
        
            colors = ['white'] * len(molecule)
            colors[anchor] = '#0892d0'
        
            molgif.rot_gif(molecule, save_path, colors=colors,
                           anchor=anchor)
        
        
        ### Adjust loop time and FPS
        
            # loop_time = time to complete one rotation (seconds)
            molgif.rot_gif(molecule, save_path, loop_time=2, fps=60)
        
        
        ### Turn off bonds and scale atomic sizes
        
            molgif.rot_gif(molecule, save_path, add_bonds=False,
                           scale=0.9)
        
        
        ### Change rotation axis
        
            # switch between x, y (Default), or z
            molgif.rot_gif(molecule, save_path, rot_axis='z')
        
        
        ### Switch rotation direction
        
            # counterclockwise (ccw)[Default] or clockwise (cw)
            # based on rot_axis
            # 'x': view from left
            # 'y': view from top
            # 'z': view into screen
            molgif.rot_gif(molecule, save_path, direction='cw')
        
        
        ### Visualize charges
        
            import random
        
            # random charges [-1, 1]
            chgs = [-1 + 2 * random.random() for i in molecule]
        
            # manually set the colorbar range (optional)
            cb_range = (-1, 1)
        
            molecule.set_initial_charges(chgs)
        
            molgif.rot_gif(molecule, save_path, use_charges=True,
                           cb_range=cb_range)
        
        
        ## Requirements
        
        - ase
        - matplotlib
        - ImageMagick (command line tools must be installed)
        
Platform: UNKNOWN
Requires-Python: >=2.7
Description-Content-Type: text/markdown
