Coder Social home page Coder Social logo

vaspposcarmayavi's Introduction

Mview

Mview is a 3D visulization script written in python to view the molecular structures contained in files like VASP POSCAR. The script utilizes ASE to read the structural information from input files, therefore, the input file formats are not limited to VASP POSCAR. In principle, any file format that can be recognized by ASE can be used as input. For 3D visulization, it utilizes mayavi to do the plotting work.

In addition, the script can also plot the vibration mode with arrows if the vibrational modes are provided.

Prerequisites

The following python library must be installed to run the script

Examples

For a compliete list of functions, please refer to the help message by mview -h. The following line shows the possible usage of the script:

  1. designate the input files by -i POSCAR
  2. make a 2x2x1 supercell by -r 2 2 1
  3. set the background color to black by -bg 0 0 0, where 0 0 0 is the RGB triplet, each with value in [0,255]
  4. save the figure -o out.png. The output image format is determined by the suffix of the output file name. use -s width height to change the size of the output image.
  5. show the second vibration mode with arrows -n 2. The OUTCAR containing the normal mode should be designated by -outcar /path/to/OUTCAR.
  6. set the azimuth and elevation view angle by -phi and -theta.
  7. do not show the mayavi UI -q
mview -i POSCAR -r 2 2 1 -bg 0 0 0 -o out.png -n 2 -phi 0 -theta 90 -q

The resulting image looks like this:

mview_example

vaspposcarmayavi's People

Contributors

qijingzheng avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.