{ "info": { "author": "Andrey Sobolev", "author_email": "andrey.n.sobolev@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Science/Research", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Scientific/Engineering :: Chemistry", "Topic :: Scientific/Engineering :: Physics" ], "description": "=================\nQuantum Esperanto\n=================\n\n*Quantum Esperanto* is a fast parser of XML files output by DFT codes (*vasp* as of now) written in Cython.\nIt takes advantage of lxml, a Python wrapper around libxml2 library, and its Cython interface.\nXML files are parsed to a Python dictionary in a transparent way. It is really fast, up to 10 times faster than the\nparser used by pymatgen_ project.\n\nInstallation\n------------\n\nAs Quantum Esperanto is not yet on PyPI, it can be installed from GitHub_:\n\n::\n\n $ git clone https://github.com/tilde-lab/quantum_esperanto\n $ cd quantum_esperanto\n $ pip install .\n\nThe Python prerequisites for the package are ``numpy`` and ``lxml`` (should be installed automatically with ``pip``).\nAlso, C compiler such as ``gcc`` must be present in the system.\n\nIt is possible to install the package in development mode. This will install ``Cython`` as well as ``nose`` test suite.\nTo do it issue the following command after cloning the repository and changing the directory:\n\n::\n\n $ cd quantum_esperanto\n $ pip install -e .[dev]\n\nAfter install it is possible to run several tests to check if the installation was completed successfully. It can be\ndone with the following commands in ``quantum_esperanto`` directory:\n\n::\n\n $ python setup.py test\n\nIf everything is OK, you're all set to start using the package.\n\nUsage\n-----\n\nThe parser can be used in a very simple way. First, the parser has to be instantiated, and then the ``parse_file``\nmethod of the parser returns the dictionary of parsed values:\n\n.. code:: python\n\n from quantum_esperanto.vasp import VaspParser\n parser = VaspParser()\n d = parser.parse_file('vasprun.xml')\n\nThe possible arguments for the parser are:\n\n**recover**\n (boolean, default: *True*) a flag that allows recovering broken XML. It is very useful in case of unfinished\n calculations; however, it exits on the first XML error and the returned dictionary contains parsed values up to the\n first XML error only. When XML recovery is needed, a warning is printed to stderr.\n\n**whitelist**\n (list, default: *None*) the list of parent tag names that are only needed to parsed. If None, then all tags are parsed.\n\nParsing result\n--------------\n\nThe result of parsing is a dictionary that follows the structure of ``vasprun.xml``. The keys of the dictionary are\neither tag names (for ``i``, ``v``, ``varray`` tags), or ``tag:tag name`` construction (for tags that do have name\nattribute), or just tags themselves. The values are either tag contents converted to the right type (specified by ``type``\ntag attribute) or (in case of varrays and sets) Numpy arrays. Fortran overflows (denoted by `*****`) are converted to\nNaNs in case of float values and to MAXINT in case of integer values.\n\n**Example**:\n\n*xml file*\n\n.. code:: xml\n\n \n \n \n 1.43300000 1.43300000 1.43300000 \n 1.43300000 -1.43300000 -1.43300000 \n -1.43300000 1.43300000 -1.43300000 \n \n 11.77059895 \n \n 0.34891835 0.34891835 0.00000000 \n 0.34891835 -0.00000000 -0.34891835 \n -0.00000000 0.34891835 -0.34891835 \n \n \n \n 0.00000000 0.00000000 0.00000000 \n \n \n\n*resulting dictionary* (printed with *pprint*):\n\n.. code:: python\n\n {'structure:primitive_cell': {'crystal': {'basis': array([[ 1.433, 1.433, 1.433],\n [ 1.433, -1.433, -1.433],\n [-1.433, 1.433, -1.433]]),\n 'rec_basis': array([[ 0.34891835, 0.34891835, 0. ],\n [ 0.34891835, -0. , -0.34891835],\n [-0. , 0.34891835, -0.34891835]]),\n 'volume': 11.77059895},\n 'positions': array([[ 0., 0., 0.]])}}\n\nLicense\n-------\n\nQuantum Esperanto is licensed under MIT license.\n\n.. _GitHub: http://www.github.com/tilde-lab/quantum_esperanto\n.. _pymatgen: https://pymatgen.org\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/tilde-lab/quantum_esperanto", "keywords": "", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "quantum_esperanto", "package_url": "https://pypi.org/project/quantum_esperanto/", "platform": "", "project_url": "https://pypi.org/project/quantum_esperanto/", "project_urls": { "Homepage": "https://github.com/tilde-lab/quantum_esperanto" }, "release_url": "https://pypi.org/project/quantum_esperanto/0.2/", "requires_dist": null, "requires_python": "", "summary": "A fast parser of XML files output by VASP DFT code written in Cython.", "version": "0.2" }, "last_serial": 3309927, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b7d1207bd88ac1f01d7db876f2c189b3", "sha256": "f485bd38a2fab599a3379aecae7914a5275adfc0a2c3c809384b74c326e79c7b" }, "downloads": -1, "filename": "quantum_esperanto-0.2.tar.gz", "has_sig": false, "md5_digest": "b7d1207bd88ac1f01d7db876f2c189b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148109, "upload_time": "2017-11-05T17:47:47", "url": "https://files.pythonhosted.org/packages/ee/a2/84e83630e506ace5c694a70c4e3ffaa921d2af987a91be86047b4a9d51b8/quantum_esperanto-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b7d1207bd88ac1f01d7db876f2c189b3", "sha256": "f485bd38a2fab599a3379aecae7914a5275adfc0a2c3c809384b74c326e79c7b" }, "downloads": -1, "filename": "quantum_esperanto-0.2.tar.gz", "has_sig": false, "md5_digest": "b7d1207bd88ac1f01d7db876f2c189b3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 148109, "upload_time": "2017-11-05T17:47:47", "url": "https://files.pythonhosted.org/packages/ee/a2/84e83630e506ace5c694a70c4e3ffaa921d2af987a91be86047b4a9d51b8/quantum_esperanto-0.2.tar.gz" } ] }