<commit_before>VASPy
========
[![Build Status](https://travis-ci.org/PytLab/VASPy.svg?branch=master)](https://travis-ci.org/PytLab/VASPy)
[![platform](https://img.shields.io/badge/python-2.6-green.svg)](https://www.python.org/download/releases/2.6.9/)
[![platform](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-2710/)
[![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![versions](https://img.shields.io/badge/versions%20-%20%200.2.1-blue.svg)](https://github.com/PytLab/VASPy)

###An **object-oriented** VASP file processing library.

Make it **easier** to process VASP files.

处理VASP文件从未如此 **灵活** **简单**

命令行处理DOS文件使用举例：

    #处理分割好的DOS文件
    >>> from vaspy.electro import DosX
    >>> a = DosX('DOS1')
    >>> b = DosX('DOS8')
    
    #分波态密度合并
    >>> c = a
    >>> c.reset_data()              # 初始化DOS数据
    >>> for i in xrange(1, 10):
    >>>    c += DosX('DOS'+str(i))  # 循环合并DOS数据
    >>> ...
    >>> c.data                      # 以float矩阵显示合并后的数据
                                    # 可直接进行计算等操作
    >>> c.tofile()                  # 生成新的合并后的DOS文件
    
    #绘图
    >>> c.plotsum(0, (5, 10))       # 绘制d轨道pDOS图
    
绘制结果:

![](https://github.com/PytLab/VASPy/blob/dev/pic/pDOS.png)

处理ELFCAR举例:

    >>> from vaspy.electro import ElfCar
    >>> a = ElfCar() 
    >>> a.plot_contour()   # 绘制等高线图
    >>> a.plot_mcontour()  # 使用mlab绘制等高线图(需安装Mayavi)

绘制结果:

![](https://github.com/PytLab/VASPy/blob/dev/pic/contour2d.png)

![](https://github.com/PytLab/VASPy/blob/dev/pic/surface3d.png)

![](https://github.com/PytLab/VASPy/blob/dev/pic/mcontour3d.png)

使用者可以编写自己的脚本来批处理VASP文件

###更新日志
<table>
    <tbody>
        <tr>
            <td><strong>日期</strong></td>
            <td><strong>版本</strong></td>
            <td><strong>内容</strong></td>
        </tr>
        <tr>
            <td>2015-09-13</td>
            <td>0.2.1</td>
            <td>新增mlab绘制contour</td>
        </tr>
        <tr>
            <td>2015-09-13</td>
            <td>0.2.0</td>
            <td>新增ELFCAR图像绘制</td>
        </tr>
        <tr>
            <td>2015-09-12</td><commit_msg>put 2 3dplot in a line<commit_after>VASPy
========
[![Build Status](https://travis-ci.org/PytLab/VASPy.svg?branch=master)](https://travis-ci.org/PytLab/VASPy)
[![platform](https://img.shields.io/badge/python-2.6-green.svg)](https://www.python.org/download/releases/2.6.9/)
[![platform](https://img.shields.io/badge/python-2.7-green.svg)](https://www.python.org/downloads/release/python-2710/)
[![Software License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
[![versions](https://img.shields.io/badge/versions%20-%20%200.2.1-blue.svg)](https://github.com/PytLab/VASPy)

###An **object-oriented** VASP file processing library.

Make it **easier** to process VASP files.

处理VASP文件从未如此 **灵活** **简单**

命令行处理DOS文件使用举例：

    #处理分割好的DOS文件
    >>> from vaspy.electro import DosX
    >>> a = DosX('DOS1')
    >>> b = DosX('DOS8')
    
    #分波态密度合并
    >>> c = a
    >>> c.reset_data()              # 初始化DOS数据
    >>> for i in xrange(1, 10):
    >>>    c += DosX('DOS'+str(i))  # 循环合并DOS数据
    >>> ...
    >>> c.data                      # 以float矩阵显示合并后的数据
                                    # 可直接进行计算等操作
    >>> c.tofile()                  # 生成新的合并后的DOS文件
    
    #绘图
    >>> c.plotsum(0, (5, 10))       # 绘制d轨道pDOS图
    
绘制结果:

![](https://github.com/PytLab/VASPy/blob/dev/pic/pDOS.png)

处理ELFCAR举例:

    >>> from vaspy.electro import ElfCar
    >>> a = ElfCar() 
    >>> a.plot_contour()   # 绘制等高线图
    >>> a.plot_mcontour()  # 使用mlab绘制等高线图(需安装Mayavi)

绘制结果:

![](https://github.com/PytLab/VASPy/blob/dev/pic/contour2d.png)

![](https://github.com/PytLab/VASPy/blob/dev/pic/surface3d.png)
![](https://github.com/PytLab/VASPy/blob/dev/pic/mcontour3d.png)

使用者可以编写自己的脚本来批处理VASP文件

###更新日志
<table>
    <tbody>
        <tr>
            <td><strong>日期</strong></td>
            <td><strong>版本</strong></td>
            <td><strong>内容</strong></td>
        </tr>
        <tr>
            <td>2015-09-13</td>
            <td>0.2.1</td>
            <td>新增mlab绘制contour</td>
        </tr>
        <tr>
            <td>2015-09-13</td>
            <td>0.2.0</td>
            <td>新增ELFCAR图像绘制</td>
        </tr>
        <tr>
            <td>2015-09-12</td>
{'fraction_non_alphanumeric': 0.20734542073454207, 'fraction_numerical': 0.029288702928870293, 'mean_word_length': 2.232907588279489, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 163, 'https://': 26, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '387999', 'n_tokens_mistral': 2024, 'n_tokens_neox': 1961, 'n_words': 194}