lmmentel / colorcif

Render molecular structures from cif files with color coding by symmetry equivalent positions

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

colorcif.py

A small utility python script to generate high-quality images from cif files with symmetry unique atoms colored with different colors

Dependencies

First make sure you have the following dependencies installed:

Installation

After downloading and unpacking or cloning the repository run the standard setuptools command

python setup.py install [--user]

Usage

The scipt takes the following optional arguments that can be display with the standard -h flag:

colorcif.py -h

Examples

  • color all symmetry unique atoms
colorcif.py TON.cif -o ton_default.pov

TON image

  • color only T-atoms using RdYlGn colormap from matplotlib
colorcif.py -T -c RdYlGn -o ton_RdYlGn_T.pov TON.cif

TON image

  • color only oxygen atoms using RdYlBu colormap from matplotlib
colorcif.py -O -c RdYlBu -o ton_RdYlBu_O.pov TON.cif

TON image

  • color only oxygen atoms using gist_rainbow colormap from matplotlib and rotate the unit cell 30 degrees with respect to each (x, y, z) axes
colorcif.py -O -c gist_rainbow -o ton_gist_rainbow_O.pov -x 30 -y 30 -z 30 TON.cif

TON image

  • color only oxygen atoms using gist_rainbow colormap from matplotlib and rotate the unit cell 30 degrees with respect to each (x, y, z) axes and the glass texture

    colorcif.py -O -c gist_rainbow -o ton_gist_rainbow_O.pov -x 30 -y 30 -z 30 -t glass TON.cif

    TON image

Additional info

The script is based on the example from the ase documentation.

About

Render molecular structures from cif files with color coding by symmetry equivalent positions

License:MIT License


Languages

Language:Jupyter Notebook 69.9%Language:Python 30.1%