All Projects → PytLab → Vaspy

PytLab / Vaspy

Licence: mit
Manipulating VASP files with Python.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Vaspy

Mdsplus
The MDSplus data management system
Stars: ✭ 47 (-74.59%)
Mutual labels:  data-processing, data-visualization
Data Science On Gcp
Source code accompanying book: Data Science on the Google Cloud Platform, Valliappa Lakshmanan, O'Reilly 2017
Stars: ✭ 864 (+367.03%)
Mutual labels:  data-processing, data-visualization
Chembl webresource client
Official Python client for accessing ChEMBL API.
Stars: ✭ 165 (-10.81%)
Mutual labels:  chemistry
Texar
Toolkit for Machine Learning, Natural Language Processing, and Text Generation, in TensorFlow. This is part of the CASL project: http://casl-project.ai/
Stars: ✭ 2,236 (+1108.65%)
Mutual labels:  data-processing
Eegrunt
A Collection Python EEG (+ ECG) Analysis Utilities for OpenBCI and Muse
Stars: ✭ 171 (-7.57%)
Mutual labels:  data-visualization
Calendar Heatmap
A d3 heatmap for representing time series data similar to github's contribution chart
Stars: ✭ 1,985 (+972.97%)
Mutual labels:  data-visualization
Pubchempy
Python wrapper for the PubChem PUG REST API.
Stars: ✭ 171 (-7.57%)
Mutual labels:  chemistry
Countly Sdk Web
Countly Product Analytics SDK for websites and web applications
Stars: ✭ 165 (-10.81%)
Mutual labels:  data-visualization
Semiotic
A data visualization framework combining React & D3
Stars: ✭ 2,207 (+1092.97%)
Mutual labels:  data-visualization
Data Science Resources
👨🏽‍🏫You can learn about what data science is and why it's important in today's modern world. Are you interested in data science?🔋
Stars: ✭ 171 (-7.57%)
Mutual labels:  data-visualization
Fun
操作系统,数据结构,网络,python,go,web
Stars: ✭ 181 (-2.16%)
Mutual labels:  data-visualization
Data Science Toolkit
Collection of stats, modeling, and data science tools in Python and R.
Stars: ✭ 169 (-8.65%)
Mutual labels:  data-visualization
Dabestr
Data Analysis with Bootstrap Estimation in R
Stars: ✭ 169 (-8.65%)
Mutual labels:  data-visualization
Graphic
A Flutter data visualization library based on Grammar of Graphics.
Stars: ✭ 173 (-6.49%)
Mutual labels:  data-visualization
Slopegraph
Edward Tufte-Inspired Slopegraphs
Stars: ✭ 166 (-10.27%)
Mutual labels:  data-visualization
Collapse
Advanced and Fast Data Transformation in R
Stars: ✭ 184 (-0.54%)
Mutual labels:  data-processing
Avogadrolibs
Avogadro libraries provide 3D rendering, visualization, analysis and data processing useful in computational chemistry, molecular modeling, bioinformatics, materials science, and related areas.
Stars: ✭ 164 (-11.35%)
Mutual labels:  chemistry
Easycharts
Excel Chart Plugin
Stars: ✭ 170 (-8.11%)
Mutual labels:  data-visualization
Programming Languages Influence
Code to retrieve data for the programming languages influence visualizations from Freebase
Stars: ✭ 171 (-7.57%)
Mutual labels:  data-visualization
Superset Ui
Apache Superset UI packages
Stars: ✭ 183 (-1.08%)
Mutual labels:  data-visualization

===== VASPy

.. image:: https://travis-ci.org/PytLab/VASPy.svg?branch=master :target: https://travis-ci.org/PytLab/VASPy :alt: Build Status

.. image:: https://landscape.io/github/PytLab/VASPy/master/landscape.svg?style=flat :target: https://landscape.io/github/PytLab/VASPy/master :alt: Code Health

.. image:: https://img.shields.io/codecov/c/github/PytLab/VASPy/master.svg :target: https://codecov.io/gh/PytLab/VASPy

.. image:: https://img.shields.io/badge/python-3.5, 2.7-green.svg :target: https://www.python.org/downloads/release/python-351/ :alt: platform

.. image:: https://img.shields.io/badge/pypi-v0.8.12-blue.svg :target: https://pypi.python.org/pypi/vaspy/ :alt: versions

Introduction

VASPy is a pure Python library designed to make it easy and quick to manipulate VASP files.

You can use VASPy to manipulate VASP files in command lins or write your own python scripts to process VASP files and visualize VASP data.

In /scripts <https://github.com/PytLab/VASPy/tree/master/scripts>_ , there are some scripts written by me for daily use.

More interfaces examples in Jupyter Notebook format are in /examples <https://github.com/PytLab/VASPy/tree/master/examples>_. Any contribution is welcomed!

Installation

  1. Via pip(recommend)::

    pip install vaspy

  2. Via easy_install::

    easy_install vaspy

  3. From source::

    python setup.py install

If you want to use mayavi to visualize VASP data, it is recommened to install Canopy environment <https://store.enthought.com/downloads/#default>_ on your device instead of installing it manually.

After installing canopy, you can set corresponding aliases, for example:

.. code-block:: shell

alias canopy='/Users/<yourname>/Library/Enthought/Canopy/edm/envs/User/bin/python'
alias canopy-pip='/Users/<yourname>/Library/Enthought/Canopy/edm/envs/User/bin/pip'
alias canopy-ipython='/Users/<yourname>/Library/Enthought/Canopy/edm/envs/User/bin/ipython'
alias canopy-jupyter='/Users/<yourname>/Library/Enthought/Canopy/edm/envs/User/bin/jupyter'

Then you can install VASPy to canopy::

canopy-pip install vaspy

Examples

manipulate splited DOS file in command-line


.. code-block:: python

    # Manipulate splited DOS files.
    >>> from vaspy.electro import DosX
    >>> a = DosX('DOS1')
    >>> b = DosX('DOS8')
    
    # Merge DOS data.
    >>> c = a
    >>> c.reset_data()              # Initialize DOS data
    >>> for i in range(1, 10):
    >>>    c += DosX('DOS'+str(i))  # Merge DOS data.
    >>> ...
    >>> c.data                      # Get data(numpy array/matrix)
    >>> c.tofile()                  # Get new DOS file with merged data
    
    # Plot.
    >>> c.plotsum(0, (5, 10))

**Output**

.. image:: https://github.com/PytLab/VASPy/blob/dev/pic/pDOS.png

Visualize ELFCAR
~~~~~~~~~~~~~~~~

.. code-block:: python

    >>> from vaspy.electro import ElfCar
    >>> a = ElfCar() 
    >>> a.plot_contour()   # Plot coutour
    >>> a.plot_mcontour()  # Plot coutour using mlab(with Mayavi installed)
    >>> a.plot_contour3d() # Plot 3D coutour
    >>> a.plot_field()     # Plot scalar field

**Output**

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/contour2d.png

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/contours.png

**3D contour**

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/contour3d.png

**Scalar field**

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/field.png

Charge difference (Use ChgCar class)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/contourf.png

Manipulate XDATCAR:
~~~~~~~~~~~~~~~~~~~

.. code-block:: python

    >>> from vaspy.atomco import XdatCar
    >>> xdatcar = XdatCar()
    >>> # Get Cartisan coordinates and step number in XDATCAR.
    >>> for item in xdatcar:
    >>>     print(item.step)
    >>>     print(xdatcar.dir2cart(xdatcar.bases, item.coordinates))

    >>> python xdatcar_to_arc.py

**animation**

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/sn2_my.gif


Process animation file:
~~~~~~~~~~~~~~~~~~~~~~~

Now VASPy can manipulate animation files to get more realistice results like atom trajectories or 2D/3D probability distribution.

.. image:: https://github.com/PytLab/VASPy/blob/master/pic/pd.png


**You can write your OWN script to process VASP files**

From the author
---------------
Welcome to use **VASPy**  (●'◡'●)ノ♥

- If you find any bug, please report it to me by opening a issue.
- **VASPy** needs to be improved, your contribution will be welcomed.

Important update log
--------------------

.. csv-table::
    :header: "Date", "Version", "Description"

    "2016-08-08", "0.7.0", "Enhance universality"
    "2016-07-15", "0.6.0", "Compatible with python 3"
    "2015-08-04", "0.1.0", "Initial version"

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].