Coder Social home page Coder Social logo

wangvei / edp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ifilot/edp

0.0 2.0 0.0 1.71 MB

Electron Density Plotter

Home Page: http://www.ivofilot.nl/posts/view/27/Visualising+the+electron+density+of+the+binding+orbitals+of+the+CO+molecule+using+VASP

License: GNU General Public License v3.0

CMake 2.68% C++ 97.32%

edp's Introduction

EDP

Introduction

Electron density plotter is a tiny tool for generating electron density plots from VASP output.

CO orbitals generated using EDP

Figure: Four molecular orbitals of CO as generated by EDP.

Obtaining EDP from the repository

Install the GPG key

wget -O - http://www.zuidcoach.nl/repos/apt/conf/ivofilotsoftware.gpg.key|sudo apt-key add -

Add repository

echo "deb http://zuidcoach.nl/repos/apt/debian/ ivofilot-software main" | sudo tee -a /etc/apt/sources.list.d/ivofilot-software.list

Update apt sources and install edp

sudo apt-get update
sudo apt-get install edp

Compilation

EDP depends on a couple of libraries, which are normally directly available by your favorite package manager.

  • Boost
  • GLM
  • Cairo
  • TCLAP

Compilation is done using CMake

mkdir build
cd build
cmake ../src
make -j5

Usage

To run EDP to construct a contour plane, use something like the command below

./edp -i <PATH_TO_CHGCAR> -v <v1,v2,v3> -w <w1,w2,w3> -p <p1,p2,p3> -o plot.png

where v and w correspond to two vectors that will span the plane and p corresponds to a position on that plane. Additionally, you can supply -s to indicate a scaling in pixels/angstrom. Instead of supplying vectors, you can also supply two atoms for the vectors v and w and a single atom for the position p. For example:

./edp -i CHGCAR -v 1-2 -w 0,0,1 -p 1 -o plot.png

There are 16 different color schemes built into EDP, which you can choose using the -c directive. If there are negative values in the density file, use the -n directive. Finally, to create a legend, use the -l directive.

To obtain a concise overview of all the command line directives, you can run

./edp --help

Color schemes

The following color schemes are built into EDP

Color schemes supported by EDP

Tutorial

A short tutorial on using the program is provided in this blog post.

Projections

To obtain an meaningful plane projection, the vectors v and w should be orthogonal to each other. When you are using atoms instead of vectors as input to -v and -w, this is not always the case. Hence, the option to project vector v on w according to the Gram-Schmidt process is provided. To do so, simply add -g as an input directive.

Line extraction

A recently requested feature was to not only construct contour planes from a scalar field, but also allow to project the scalar values onto a line to make a simple graph. To do so, you can use the -e command line parameter followed by either two atoms or a vector. On the line as indicated by the vector and the point supplied by p, the scalar field will be projected and written to the textfile line_extraction.txt which you can then plot. In the file line_extraction.txt, there are four columns which are the Cartesian x,y,z positions and the value at that point.

Below, an example graph is provided which shows the electron density of the 5 sigma orbital of CO projected on the line that crosses both atoms. The x-axis presents the z-position in the unit cell. The C and O atoms are placed at z = 5.00A and z = 6.15A, respectively.

Electron density graph of 5 sigma orbital of CO

References

Color schemes have been taken from the following sources. Details can be found in plotter.cpp.

edp's People

Contributors

ifilot avatar

Watchers

James Cloos avatar Vei Wang 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.