<!DOCTYPE html> <html class="writer-html5" lang="en" > <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Introduction — pymatgen 2021.3.5 documentation</title> <link rel="stylesheet" href="_static/css/theme.css" type="text/css" /> <link rel="stylesheet" href="_static/pygments.css" type="text/css" /> <link rel="stylesheet" href="_static/css/custom.css" type="text/css" /> <link rel="canonical" href="https://pymatgen.orgindex.html"/> <!--[if lt IE 9]> <script src="_static/js/html5shiv.min.js"></script> <![endif]--> <script type="text/javascript" id="documentation_options" data-url_root="./" src="_static/documentation_options.js"></script> <script src="_static/jquery.js"></script> <script src="_static/underscore.js"></script> <script src="_static/doctools.js"></script> <script type="text/javascript" src="_static/js/theme.js"></script> <link rel="index" title="Index" href="genindex.html" /> <link rel="search" title="Search" href="search.html" /> <link rel="next" title="Introduction" href="introduction.html" /> <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-33990148-1']); _gaq.push(['_trackPageview']); </script> </head> <body class="wy-body-for-nav"> <div class="wy-grid-for-nav"> <nav data-toggle="wy-nav-shift" class="wy-nav-side"> <div class="wy-side-scroll"> <div class="wy-side-nav-search" style="background: linear-gradient(0deg, rgba(23,63,162,1) 0%, rgba(0,70,192,1) 100%)" > <a href="#" class="icon icon-home" alt="Documentation Home"> pymatgen </a> <div class="version"> 2021.3.5 </div> <div role="search"> <form id="rtd-search-form" class="wy-form" action="search.html" method="get"> <input type="text" name="q" placeholder="Search docs" /> <input type="hidden" name="check_keywords" value="yes" /> <input type="hidden" name="area" value="default" /> </form> </div> </div> <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation"> <ul> <li class="toctree-l1"><a class="reference internal" href="introduction.html">Introduction</a></li> <li class="toctree-l1"><a class="reference internal" href="installation.html">Installation</a></li> <li class="toctree-l1"><a class="reference internal" href="change_log.html">Change log</a></li> <li class="toctree-l1"><a class="reference internal" href="compatibility.html">Compatibility</a></li> <li class="toctree-l1"><a class="reference internal" href="usage.html">Usage</a></li> <li class="toctree-l1"><a class="reference internal" href="team.html">Development Team</a></li> <li class="toctree-l1"><a class="reference internal" href="references.html">References</a></li> <li class="toctree-l1"><a class="reference internal" href="modules.html">API Docs</a></li> </ul> </div> </div> </nav> <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"> <nav class="wy-nav-top" aria-label="top navigation"> <i data-toggle="wy-nav-top" class="fa fa-bars"></i> <a href="#">pymatgen</a> </nav> <div class="wy-nav-content"> <div class="rst-content style-external-links"> <div role="navigation" aria-label="breadcrumbs navigation"> <ul class="wy-breadcrumbs"> <li><a href="#" class="icon icon-home"></a> »</li> <li>Introduction</li> <li class="wy-breadcrumbs-aside"> <a href="https://github.com/materialsproject/pymatgen/blob/master/docs_rst/index.rst" class="fa fa-github"> Edit on GitHub</a> </li> </ul> <hr/> </div> <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article"> <div itemprop="articleBody"> <div class="toctree-wrapper compound"> </div> <a class="reference internal image-reference" href="_images/pymatgen.png"><img alt="pymatgen" class="align-center" src="_images/pymatgen.png" style="width: 300px;" /></a> <div class="section" id="introduction"> <h1>Introduction<a class="headerlink" href="#introduction" title="Permalink to this headline">¶</a></h1> <a class="reference external image-reference" href="https://github.com/materialsproject/pymatgen/actions/workflows/test.yml"><img alt="CI Status" src="https://github.com/materialsproject/pymatgen/actions/workflows/test.yml/badge.svg" /></a> <img alt="https://anaconda.org/conda-forge/pymatgen/badges/downloads.svg" src="https://anaconda.org/conda-forge/pymatgen/badges/downloads.svg" /><a class="reference external image-reference" href="https://coveralls.io/github/materialsproject/pymatgen?branch=master"><img alt="Coveralls Coverage Report" src="https://coveralls.io/repos/github/materialsproject/pymatgen/badge.svg?branch=master" /></a> <p>Pymatgen (Python Materials Genomics) is a robust, open-source Python library for materials analysis. These are some of the main features:</p> <ol class="arabic simple"> <li><p>Highly flexible classes for the representation of Element, Site, Molecule, Structure objects.</p></li> <li><p>Extensive input/output support, including support for VASP (<a class="reference external" href="http://cms.mpi.univie.ac.at/vasp/">http://cms.mpi.univie.ac.at/vasp/</a>), ABINIT (<a class="reference external" href="http://www.abinit.org/">http://www.abinit.org/</a>), CIF, Gaussian, XYZ, and many other file formats.</p></li> <li><p>Powerful analysis tools, including generation of phase diagrams, Pourbaix diagrams, diffusion analyses, reactions, etc.</p></li> <li><p>Electronic structure analyses, such as density of states and band structure.</p></li> <li><p>Integration with the Materials Project REST API, Crystallography Open Database and other external data sources.</p></li> </ol> <p>As of 2021, pymatgen only supports Python 3.7 and above. Our support schedule follows closely to the support schedule of the Scientific Python software stack. When packages such as numpy drops support for Python versions, we will drop support for newer versions. Similarly, support for new Python versions will be adopted only when most of the core dependencies support the new Python versions.</p> <p>Pymatgen is free to use. However, we also welcome your help to improve this library by making your own contributions. These contributions can be in the form of additional tools or modules you develop, or feature requests and bug reports. The following are resources for pymatgen:</p> <ul> <li><p>Please report any bugs and issues at pymatgen’s <a class="reference external" href="https://github.com/materialsproject/pymatgen/issues">Github Issues page</a>.</p></li> <li><p>For help with any pymatgen issue, please use the pymatgen <a class="reference external" href="https://discuss.matsci.org/c/pymatgen">Discourse page</a>. Please note that the pymatgen Google group has been deprecated in favor of Discourse.</p></li> <li><p><a class="reference external" href="http://twitter.com/pymatgen">Twitter</a>. Follow to get news and tips.</p></li> <li><p><a class="reference external" href="http://matgenb.materialsvirtuallab.org">matgenb</a>. For example notebooks.</p> <blockquote> <div><p><em>The code is mightier than the pen.</em></p> </div></blockquote> </li> </ul> <div class="section" id="major-announcement-v2022-0-0"> <h2>Major Announcement (v2022.0.0)<a class="headerlink" href="#major-announcement-v2022-0-0" title="Permalink to this headline">¶</a></h2> <p>A <strong>backwards incompatible</strong> change has been introduced in v2020.0.0. Pymatgen root-level convenience imports have been removed from in preparation for a change to a more modular, extensible architecture that will allow more developers to contribute. If your existing code uses <cite>from pymatgen import <something></cite>, you will need to make modifications. MPRester should now be imported from <cite>pymatgen.ext.matproj</cite>. All other convenience objects such as <cite>Element</cite>, <cite>Species</cite>, <cite>Lattice</cite>, <cite>Structure</cite>, etc. should be imported from <cite>pymatgen.core</cite>. The easiest way is to use an IDE such as Pycharm to run a Search and Replace. First, replace any <cite>from pymatgen import MPRester</cite> with <cite>from pymatgen.ext.matproj import MPRester</cite>. Then, replace <cite>from pymatgen import</cite> with <cite>from pymatgen.core import</cite>.</p> <p>Alternatively, if you are using a Mac command line, you can do:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s2">""</span> <span class="s1">'s/from pymatgen import MPRester/from pymatgen.ext.matproj import MPRester/g'</span> <span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s2">""</span> <span class="s1">'s/from pymatgen import/from pymatgen.core import/g'</span> </pre></div> </div> <p>From a Linux command line, you can do:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s1">'s/from pymatgen import MPRester/from pymatgen.ext.matproj import MPRester/g'</span> <span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s1">'s/from pymatgen import/from pymatgen.core import/g'</span> </pre></div> </div> <p>This should resolve most import errors and only a few more modifications may need to be done by hand.</p> <p>Last but not least, one option is to pin to pymatgen==2021.x.x, which is the last version to contain the root-level convenience imports, if you are not planning to use future new pymatgen functionality. The new breaking change will become default from 2022. Backports to 2021.x.x will still occur for critical bug fixes.</p> </div> <div class="section" id="offline-docs"> <h2>Offline docs<a class="headerlink" href="#offline-docs" title="Permalink to this headline">¶</a></h2> <p>If you would like to have an offline version of the docs for reference, there are two options:</p> <ol class="arabic simple"> <li><p>Clone the Github repo and the latest html docs are in the “docs” folder.</p></li> <li><p>In <a class="reference external" href="http://kapeli.com/dash">Dash</a> or <a class="reference external" href="http://zealdocs.org/">Zeal</a>, go to “User Contributed Docsets”, search for pymatgen and install.</p></li> </ol> </div> <div class="section" id="matgenie-examples"> <h2>Matgenie & Examples<a class="headerlink" href="#matgenie-examples" title="Permalink to this headline">¶</a></h2> <p>The <a class="reference external" href="http://www.materialsvirtuallab.org">Materials Virtual Lab</a> has developed a <a class="reference external" href="http://matgenie.materialsvirtuallab.org">matgenie web app</a> which demonstrates some of the basic functionality of pymatgen, as well as a <a class="reference external" href="http://matgenb.materialsvirtuallab.org">matgenb repository</a> of Jupyter notebooks for common and advanced use cases. We have deprecated the pymatgen examples page in favor of this more sustainable approach going forward. One of the ways you can contribute is to fork the matgenb repo and add your own examples.</p> <p>Below are a quick look at some of the graphical output possible.</p> <div class="figure align-center" id="id2"> <a class="reference internal image-reference" href="_images/examples.png"><img alt="Examples" src="_images/examples.png" style="width: 100%;" /></a> <p class="caption"><span class="caption-text">Top: (left) Phase and (right) Pourbaix diagram from the Materials API. Bottom left: Calculated bandstructure plot using pymatgen’s parsing and plotting utilities. Bottom right: Arrhenius plot using pymatgen’s DiffusionAnalyzer.</span><a class="headerlink" href="#id2" title="Permalink to this image">¶</a></p> </div> </div> <div class="section" id="why-use-pymatgen"> <h2>Why use pymatgen?<a class="headerlink" href="#why-use-pymatgen" title="Permalink to this headline">¶</a></h2> <p>There are many materials analysis codes out there, both commercial and free. So you might ask - why should I use pymatgen over others? Pymatgen offer several advantages over other codes out there:</p> <ol class="arabic simple"> <li><p><strong>It is (fairly) robust.</strong> Pymatgen is used by thousands of researchers, and is the analysis code powering the <a class="reference external" href="https://www.materialsproject.org">Materials Project</a>. The analysis it produces survives rigorous scrutiny every single day. Bugs tend to be found and corrected quickly. Pymatgen also uses <a class="reference external" href="https://circleci.com">CircleCI</a> and <a class="reference external" href="https://www.appveyor.com/">Appveyor</a> for continuous integration on the Linux and Windows platforms, respectively, which ensures that every commit passes a comprehensive suite of unittests. The coverage of the unittests can be seen on <a class="reference external" href="https://coveralls.io/github/materialsproject/pymatgen">coveralls.io</a>.</p></li> <li><p><strong>It is well documented.</strong> A fairly comprehensive documentation has been written to help you get to grips with it quickly.</p></li> <li><p><strong>It is open.</strong> You are free to use and contribute to pymatgen. It also means that pymatgen is continuously being improved. We will attribute any code you contribute to any publication you specify. Contributing to pymatgen means your research becomes more visible, which translates to greater impact.</p></li> <li><p><strong>It is fast.</strong> Many of the core numerical methods in pymatgen have been optimized by vectorizing in numpy/scipy. This means that coordinate manipulations are extremely fast and are in fact comparable to codes written in other languages. Pymatgen also comes with a complete system for handling periodic boundary conditions.</p></li> <li><p><strong>It will be around.</strong> Pymatgen is not a pet research project. It is used in the well-established Materials Project. It is also actively being developed and maintained by the <a class="reference external" href="http://www.materialsvirtuallab.org">Materials Virtual Lab</a>, the ABINIT group and many other research groups.</p></li> </ol> <p>Please review the <a class="reference external" href="/contributing">coding guidelines</a>.</p> </div> <div class="section" id="change-log"> <h2>Change log<a class="headerlink" href="#change-log" title="Permalink to this headline">¶</a></h2> <div class="section" id="v2021-3-4"> <h3>v2021.3.4<a class="headerlink" href="#v2021-3-4" title="Permalink to this headline">¶</a></h3> <ul> <li><p><strong>Backwards incompatible</strong>: Pymatgen root imports have been removed from v2021.3.4 in preparation for a change to a more modular, extensible architecture that will allow more developers to contribute.</p> <p>If your existing code uses <cite>from pymatgen import <something></cite>, you will need to make modifications. The easiest way is to use an IDE to run a Search and Replace. First, replace any <cite>from pymatgen import MPRester</cite> with <cite>from pymatgen.ext.matproj import MPRester</cite>. Then, replace <cite>from pymatgen import</cite> with <cite>from pymatgen.core import</cite>. Alternatively, if you are using a Mac command line, you can do:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s2">""</span> <span class="s1">'s/from pymatgen import MPRester/from pymatgen.ext.matproj import MPRester/g'</span> <span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s2">""</span> <span class="s1">'s/from pymatgen import/from pymatgen.core import/g'</span> </pre></div> </div> <p>From a Linux command line, you can do:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s1">'s/from pymatgen import MPRester/from pymatgen.ext.matproj import MPRester/g'</span> <span class="n">find</span> <span class="o">.</span> <span class="o">-</span><span class="n">name</span> <span class="s1">'*.py'</span> <span class="o">|</span> <span class="n">xargs</span> <span class="n">sed</span> <span class="o">-</span><span class="n">i</span> <span class="s1">'s/from pymatgen import/from pymatgen.core import/g'</span> </pre></div> </div> <p>This should resolve most import errors and only a few more modifications may need to be done by hand.</p> <p>Specifically, the following “convenience imports” have been removed in favor of their canonical import:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">Composition</span> <span class="c1"># now "from pymatgen.core.composition import Composition"</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">Lattice</span> <span class="c1"># now "from pymatgen.core.lattice import Lattice"</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">SymmOp</span> <span class="c1"># now "from pymatgen.core.operations import SymmOp"</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">DummySpecie</span><span class="p">,</span> <span class="n">DummySpecies</span><span class="p">,</span> <span class="n">Element</span><span class="p">,</span> <span class="n">Specie</span><span class="p">,</span> <span class="n">Species</span> <span class="c1"># now "from pymatgen.core.periodic_table ..."</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">PeriodicSite</span><span class="p">,</span> <span class="n">Site</span> <span class="c1"># now "from pymatgen.core.sites ..."</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">IMolecule</span><span class="p">,</span> <span class="n">IStructure</span><span class="p">,</span> <span class="n">Molecule</span><span class="p">,</span> <span class="n">Structure</span> <span class="c1"># now "from pymatgen.core.structure ..."</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">ArrayWithUnit</span><span class="p">,</span> <span class="n">FloatWithUnit</span><span class="p">,</span> <span class="n">Unit</span> <span class="c1"># now "from pymatgen.core.units ..."</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">Orbital</span><span class="p">,</span> <span class="n">Spin</span> <span class="c1"># now "from pymatgen.electronic_structure.core ..."</span> <span class="kn">from</span> <span class="nn">pymatgen</span> <span class="kn">import</span> <span class="n">MPRester</span> <span class="c1"># now "from pymatgen.ext.matproj ..."</span> </pre></div> </div> </li> </ul> <p><a class="reference internal" href="change_log.html"><span class="doc">Older versions</span></a></p> </div> </div> <div class="section" id="getting-pymatgen"> <h2>Getting pymatgen<a class="headerlink" href="#getting-pymatgen" title="Permalink to this headline">¶</a></h2> <p>If you are absolutely new to Python and/or are using Windows, the easiest installation process is using <a class="reference external" href="http://conda.pydata.org">conda</a>. If you already have conda installed, pymatgen can be installed from the <a class="reference external" href="https://anaconda.org/conda-forge">conda-forge channel</a> using the following command:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="o">--</span><span class="n">channel</span> <span class="n">conda</span><span class="o">-</span><span class="n">forge</span> <span class="n">pymatgen</span> </pre></div> </div> <p>Note that you might need to ensure a relatively recent version of gcc is available to compile pymatgen. You can use conda to get that:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">install</span> <span class="n">gcc</span> </pre></div> </div> <p>Pymatgen is under active development, and new features are added regularly. To upgrade pymatgen to the latest version, use the following command:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">conda</span> <span class="n">upgrade</span> <span class="n">pymatgen</span> </pre></div> </div> <p>Step-by-step instructions for all platforms are available at the <a class="reference internal" href="installation.html"><span class="doc">installation page</span></a>.</p> <p>The version at the Python Package Index (PyPI) is always the latest stable release that is relatively bug-free. The easiest way to install pymatgen on any system is to use pip:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">pymatgen</span> </pre></div> </div> <p>Wheels for Mac and Windows have been built for convenience. Similarly, you might need to ensure you have a relatively recent version of gcc.</p> <p>To upgrade pymatgen via pip:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">--</span><span class="n">upgrade</span> <span class="n">pymatgen</span> </pre></div> </div> <p>The bleeding edge developmental version is at the pymatgen <a class="reference external" href="https://github.com/materialsproject/pymatgen">Github repo</a>. The developmental version is likely to be more buggy, but may contain new features. The Github version include complete test files. After cloning the source, you can type in the root of the repo:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">.</span> </pre></div> </div> <p>or to install the package in developmental mode:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="o">-</span><span class="n">e</span> <span class="o">.</span> </pre></div> </div> <p>Detailed installation instructions, including installation of option dependencies, set up for POTCAR generation, Materials Project REST interface usage, setup for developers, etc.are given on this <a class="reference internal" href="installation.html"><span class="doc">page</span></a>.</p> <p>For some extras, you can also install the optional dependencies using:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">pymatgen</span><span class="p">[</span><span class="n">extra</span><span class="p">]</span> </pre></div> </div> <p>For an always up-to-date list of extras, consult the <a class="reference external" href="https://github.com/materialsproject/pymatgen/blob/master/setup.py">setup.py’s extras_require</a>.</p> <p>If you are installing pymatgen on shared computing clusters, e.g., the XSEDE or NERSC resources in the US, the best way is to use conda to perform a local install. This guarantees the right version of python and all dependencies:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span>wget https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh bash Miniconda3-latest-Linux-x86_64.sh -b # Reload bash profile. source $HOME/.bashrc source $HOME/.bash_profile # Install numpy and other pydata stack packages via conda. conda install --yes numpy scipy pandas conda install --yes --channel conda-forge pymatgen </pre></div> </div> </div> <div class="section" id="usage"> <h2>Usage<a class="headerlink" href="#usage" title="Permalink to this headline">¶</a></h2> <div class="figure align-center" id="id3"> <a class="reference internal image-reference" href="_images/overview.jpg"><img alt="pymatgen overview" src="_images/overview.jpg" style="width: 100%;" /></a> <p class="caption"><span class="caption-text">Overview of a typical workflow for pymatgen.</span><a class="headerlink" href="#id3" title="Permalink to this image">¶</a></p> </div> <p>The figure above provides an overview of the functionality in pymatgen. A typical workflow would involve a user converting data (structure, calculations, etc.) from various sources (first principles calculations, crystallographic and molecule input files, Materials Project, etc.) into Python objects using pymatgen’s io packages, which are then used to perform further structure manipulation or analyses.</p> <p>Useful aliases for commonly used objects are now provided. Supported objects include Element, Composition, Structure, Molecule, Spin and Orbital. Here are some quick examples of the core capabilities and objects:</p> <div class="highlight-pycon notranslate"><div class="highlight"><pre><span></span><span class="gp">>>> </span><span class="kn">import</span> <span class="nn">pymatgen</span> <span class="k">as</span> <span class="nn">mg</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="n">si</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Element</span><span class="p">(</span><span class="s2">"Si"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">si</span><span class="o">.</span><span class="n">atomic_mass</span> <span class="go">28.0855</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">si</span><span class="o">.</span><span class="n">melting_point</span><span class="p">)</span> <span class="go">1687.0 K</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="n">comp</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Composition</span><span class="p">(</span><span class="s2">"Fe2O3"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">comp</span><span class="o">.</span><span class="n">weight</span> <span class="go">159.6882</span> <span class="gp">>>> </span><span class="c1"># Note that Composition conveniently allows strings to be treated just</span> <span class="gp">>>> </span><span class="c1"># like an Element object.</span> <span class="gp">>>> </span><span class="n">comp</span><span class="p">[</span><span class="s2">"Fe"</span><span class="p">]</span> <span class="go">2.0</span> <span class="gp">>>> </span><span class="n">comp</span><span class="o">.</span><span class="n">get_atomic_fraction</span><span class="p">(</span><span class="s2">"Fe"</span><span class="p">)</span> <span class="go">0.4</span> <span class="gp">>>> </span><span class="n">lattice</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Lattice</span><span class="o">.</span><span class="n">cubic</span><span class="p">(</span><span class="mf">4.2</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">structure</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">Structure</span><span class="p">(</span><span class="n">lattice</span><span class="p">,</span> <span class="p">[</span><span class="s2">"Cs"</span><span class="p">,</span> <span class="s2">"Cl"</span><span class="p">],</span> <span class="gp">... </span> <span class="p">[[</span><span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">],</span> <span class="p">[</span><span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">,</span> <span class="mf">0.5</span><span class="p">]])</span> <span class="gp">>>> </span><span class="n">structure</span><span class="o">.</span><span class="n">volume</span> <span class="go">74.088000000000008</span> <span class="gp">>>> </span><span class="n">structure</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="go">PeriodicSite: Cs (0.0000, 0.0000, 0.0000) [0.0000, 0.0000, 0.0000]</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># You can create a Structure using spacegroup symmetry as well.</span> <span class="gp">>>> </span><span class="n">li2o</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Structure</span><span class="o">.</span><span class="n">from_spacegroup</span><span class="p">(</span><span class="s2">"Fm-3m"</span><span class="p">,</span> <span class="n">mg</span><span class="o">.</span><span class="n">Lattice</span><span class="o">.</span><span class="n">cubic</span><span class="p">(</span><span class="mi">3</span><span class="p">),</span> <span class="go"> ["Li", "O"],</span> <span class="go"> [[0.25, 0.25, 0.25], [0, 0, 0]])</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Integrated symmetry analysis tools from spglib.</span> <span class="gp">>>> </span><span class="kn">from</span> <span class="nn">pymatgen.symmetry.analyzer</span> <span class="kn">import</span> <span class="n">SpacegroupAnalyzer</span> <span class="gp">>>> </span><span class="n">finder</span> <span class="o">=</span> <span class="n">SpacegroupAnalyzer</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">finder</span><span class="o">.</span><span class="n">get_space_group_symbol</span><span class="p">()</span> <span class="go">'Pm-3m'</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Convenient IO to various formats. You can specify various formats.</span> <span class="gp">>>> </span><span class="c1"># Without a filename, a string is returned. Otherwise,</span> <span class="gp">>>> </span><span class="c1"># the output is written to the file. If only the filenmae is provided,</span> <span class="gp">>>> </span><span class="c1"># the format is intelligently determined from a file.</span> <span class="gp">>>> </span><span class="n">structure</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="n">fmt</span><span class="o">=</span><span class="s2">"poscar"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">structure</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s2">"POSCAR"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">structure</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="n">filename</span><span class="o">=</span><span class="s2">"CsCl.cif"</span><span class="p">)</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Reading a structure is similarly easy.</span> <span class="gp">>>> </span><span class="n">structure</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Structure</span><span class="o">.</span><span class="n">from_str</span><span class="p">(</span><span class="nb">open</span><span class="p">(</span><span class="s2">"CsCl.cif"</span><span class="p">)</span><span class="o">.</span><span class="n">read</span><span class="p">(),</span> <span class="n">fmt</span><span class="o">=</span><span class="s2">"cif"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">structure</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Structure</span><span class="o">.</span><span class="n">from_file</span><span class="p">(</span><span class="s2">"CsCl.cif"</span><span class="p">)</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Reading and writing a molecule from a file. Supports XYZ and</span> <span class="gp">>>> </span><span class="c1"># Gaussian input and output by default. Support for many other</span> <span class="gp">>>> </span><span class="c1"># formats via the optional openbabel dependency (if installed).</span> <span class="gp">>>> </span><span class="n">methane</span> <span class="o">=</span> <span class="n">mg</span><span class="o">.</span><span class="n">core</span><span class="o">.</span><span class="n">Molecule</span><span class="o">.</span><span class="n">from_file</span><span class="p">(</span><span class="s2">"methane.xyz"</span><span class="p">)</span> <span class="gp">>>> </span><span class="n">mol</span><span class="o">.</span><span class="n">to</span><span class="p">(</span><span class="s2">"methane.gjf"</span><span class="p">)</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Pythonic API for editing Structures and Molecules (v2.9.1 onwards)</span> <span class="gp">>>> </span><span class="c1"># Changing the specie of a site.</span> <span class="gp">>>> </span><span class="n">structure</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"F"</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="go">Structure Summary (Cs1 F1)</span> <span class="go">Reduced Formula: CsF</span> <span class="go">abc : 4.200000 4.200000 4.200000</span> <span class="go">angles: 90.000000 90.000000 90.000000</span> <span class="go">Sites (2)</span> <span class="go">1 Cs 0.000000 0.000000 0.000000</span> <span class="go">2 F 0.500000 0.500000 0.500000</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Changes species and coordinates (fractional assumed for structures)</span> <span class="gp">>>> </span><span class="n">structure</span><span class="p">[</span><span class="mi">1</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"Cl"</span><span class="p">,</span> <span class="p">[</span><span class="mf">0.51</span><span class="p">,</span> <span class="mf">0.51</span><span class="p">,</span> <span class="mf">0.51</span><span class="p">]</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="go">Structure Summary (Cs1 Cl1)</span> <span class="go">Reduced Formula: CsCl</span> <span class="go">abc : 4.200000 4.200000 4.200000</span> <span class="go">angles: 90.000000 90.000000 90.000000</span> <span class="go">Sites (2)</span> <span class="go">1 Cs 0.000000 0.000000 0.000000</span> <span class="go">2 Cl 0.510000 0.510000 0.510000</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Replaces all Cs in the structure with K</span> <span class="gp">>>> </span><span class="n">structure</span><span class="p">[</span><span class="s2">"Cs"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"K"</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="go">Structure Summary (K1 Cl1)</span> <span class="go">Reduced Formula: KCl</span> <span class="go">abc : 4.200000 4.200000 4.200000</span> <span class="go">angles: 90.000000 90.000000 90.000000</span> <span class="go">Sites (2)</span> <span class="go">1 K 0.000000 0.000000 0.000000</span> <span class="go">2 Cl 0.510000 0.510000 0.510000</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Replaces all K in the structure with K: 0.5, Na: 0.5, i.e.,</span> <span class="gp">>>> </span><span class="c1"># a disordered structure is created.</span> <span class="gp">>>> </span><span class="n">structure</span><span class="p">[</span><span class="s2">"K"</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"K0.5Na0.5"</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="go">Full Formula (K0.5 Na0.5 Cl1)</span> <span class="go">Reduced Formula: K0.5Na0.5Cl1</span> <span class="go">abc : 4.209000 4.209000 4.209000</span> <span class="go">angles: 90.000000 90.000000 90.000000</span> <span class="go">Sites (2)</span> <span class="go"> # SP a b c</span> <span class="go">--- ----------------- --- --- ---</span> <span class="go"> 0 K:0.500, Na:0.500 0 0 0</span> <span class="go"> 1 Cl 0.5 0.5 0.5</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Because structure is like a list, it supports most list-like methods</span> <span class="gp">>>> </span><span class="c1"># such as sort, reverse, etc.</span> <span class="gp">>>> </span><span class="n">structure</span><span class="o">.</span><span class="n">reverse</span><span class="p">()</span> <span class="gp">>>> </span><span class="nb">print</span><span class="p">(</span><span class="n">structure</span><span class="p">)</span> <span class="go">Structure Summary (Cs1 Cl1)</span> <span class="go">Reduced Formula: CsCl</span> <span class="go">abc : 4.200000 4.200000 4.200000</span> <span class="go">angles: 90.000000 90.000000 90.000000</span> <span class="go">Sites (2)</span> <span class="go">1 Cl 0.510000 0.510000 0.510000</span> <span class="go">2 Cs 0.000000 0.000000 0.000000</span> <span class="go">>>></span> <span class="gp">>>> </span><span class="c1"># Molecules function similarly, but with Site and cartesian coords.</span> <span class="gp">>>> </span><span class="c1"># The following changes the C in CH4 to an N and displaces it by 0.01A</span> <span class="gp">>>> </span><span class="c1"># in the x-direction.</span> <span class="gp">>>> </span><span class="n">methane</span><span class="p">[</span><span class="mi">0</span><span class="p">]</span> <span class="o">=</span> <span class="s2">"N"</span><span class="p">,</span> <span class="p">[</span><span class="mf">0.01</span><span class="p">,</span> <span class="mi">0</span><span class="p">,</span> <span class="mi">0</span><span class="p">]</span> <span class="go">>>></span> </pre></div> </div> <p>The above illustrates only the most basic capabilities of pymatgen. Users are strongly encouraged to explore the <a class="reference internal" href="usage.html"><span class="doc">usage pages</span></a> (toc given below).</p> <p>For detailed documentation of all modules and classes, please refer to the <a class="reference internal" href="modules.html"><span class="doc">API docs</span></a>.</p> <p>The founder and maintainer of pymatgen, Shyue Ping Ong, has conducted several workshops (together with Anubhav Jain) on how to effectively use pymatgen (as well as the extremely useful <a class="reference external" href="https://pypi.python.org/pypi/custodian">custodian</a> error management and <a class="reference external" href="https://materialsproject.github.io/fireworks">FireWorks</a> workflow software. The slides for these workshops are available on the <a class="reference external" href="http://www.materialsvirtuallab.org">Materials Virtual Lab</a>.</p> <p>To demonstrate the capabilities of pymatgen and to make it easy for users to quickly use the functionality, pymatgen comes with a set of useful scripts that utilize the library to perform all kinds of analyses. These are installed to your path by default when you install pymatgen through the typical installation routes.</p> <p>Here, we will discuss the most versatile of these scripts, known as pmg. The typical usage of pmg is:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pmg</span> <span class="p">{</span><span class="n">setup</span><span class="p">,</span> <span class="n">config</span><span class="p">,</span> <span class="n">analyze</span><span class="p">,</span> <span class="n">plotdos</span><span class="p">,</span> <span class="n">plotchgint</span><span class="p">,</span> <span class="n">convert</span><span class="p">,</span> <span class="n">symm</span><span class="p">,</span> <span class="n">view</span><span class="p">,</span> <span class="n">compare</span><span class="p">}</span> <span class="n">additional_arguments</span> </pre></div> </div> <p>At any time, you can use <code class="docutils literal notranslate"><span class="pre">"pmg</span> <span class="pre">--help"</span></code> or <code class="docutils literal notranslate"><span class="pre">"pmg</span> <span class="pre">subcommand</span> <span class="pre">--help"</span></code> to bring up a useful help message on how to use these subcommands. With effect from v4.6.0, <code class="docutils literal notranslate"><span class="pre">pmg</span></code> also supports bash completion using argcomplete, which is useful given the many options available in the cli tool. To enable argcomplete, <code class="docutils literal notranslate"><span class="pre">pip</span> <span class="pre">install</span> <span class="pre">argcomplete</span></code> and either follow argcomplete’s instructions for enabling global completion, or add the following line to your <code class="docutils literal notranslate"><span class="pre">.bash_profile</span></code> (this method usually works more reliably):</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="nb">eval</span> <span class="s2">"$(register-python-argcomplete pmg)"</span> </pre></div> </div> <p>Here are a few examples of typical usages:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Parses all vasp runs in a directory and display the basic energy</span> <span class="c1"># information. Saves the data in a file called vasp_data.gz for subsequent</span> <span class="c1"># reuse.</span> <span class="n">pmg</span> <span class="n">analyze</span> <span class="o">.</span> <span class="c1"># Plot the dos from the vasprun.xml file.</span> <span class="n">pmg</span> <span class="n">plot</span> <span class="o">--</span><span class="n">dos</span> <span class="n">vasprun</span><span class="o">.</span><span class="n">xml</span> <span class="c1"># Convert between file formats. The script attempts to intelligently</span> <span class="c1"># determine the file type. Input file types supported include CIF,</span> <span class="c1"># vasprun.xml, POSCAR, CSSR. You can force the script to assume certain file</span> <span class="c1"># types by specifying additional arguments. See pmg convert -h.</span> <span class="n">pmg</span> <span class="n">structure</span> <span class="o">--</span><span class="n">convert</span> <span class="o">--</span><span class="n">filenames</span> <span class="n">input_filename</span> <span class="n">output_filename</span><span class="o">.</span> <span class="c1"># Obtain spacegroup information using a tolerance of 0.1 angstroms.</span> <span class="n">pmg</span> <span class="n">structure</span> <span class="o">--</span><span class="n">symmetry</span> <span class="mf">0.1</span> <span class="o">--</span><span class="n">filenames</span> <span class="n">filename1</span> <span class="n">filename2</span> <span class="c1"># Visualize a structure. Requires VTK to be installed.</span> <span class="n">pmg</span> <span class="n">view</span> <span class="n">filename</span> <span class="c1"># Compare two structures for similarity</span> <span class="n">pmg</span> <span class="n">structure</span> <span class="o">--</span><span class="n">group</span> <span class="n">element</span> <span class="o">--</span><span class="n">filenames</span> <span class="n">filename1</span> <span class="n">filename2</span> <span class="c1"># Generate a POTCAR with symbols Li_sv O and the PBE functional</span> <span class="n">pmg</span> <span class="n">potcar</span> <span class="o">--</span><span class="n">symbols</span> <span class="n">Li_sv</span> <span class="n">O</span> <span class="o">--</span><span class="n">functional</span> <span class="n">PBE</span> </pre></div> </div> <p>Some add-ons are available for pymatgen today:</p> <ol class="arabic simple"> <li><p>The <a class="reference external" href="https://pypi.python.org/pypi/pymatgen-db">pymatgen-db</a> add-on provides tools to create databases of calculated run data using pymatgen.</p></li> <li><p>The <a class="reference external" href="https://pypi.python.org/pypi/custodian">custodian</a> package provides a JIT job management and error correction for calculations.</p></li> <li><p>The <a class="reference external" href="https://pypi.python.org/pypi/pymatgen-diffusion">pymatgen-diffusion</a> by the <a class="reference external" href="http://www.materialsvirtuallab.org">Materials Virtual Lab</a> provides additional useful analyses for diffusion in materials.</p></li> </ol> </div> <div class="section" id="contributing"> <h2>Contributing<a class="headerlink" href="#contributing" title="Permalink to this headline">¶</a></h2> <p>Pymatgen is developed by a team of volunteers. It is started by a team comprising of MIT and Lawrence Berkeley National Laboratory staff to be a robust toolkit for materials researchers to perform advanced manipulations of structures and analyses.</p> <p>For pymatgen to continue to grow in functionality and robustness, we rely on other volunteers to develop new analyses and report and fix bugs. We welcome anyone to use our code as-is, but if you could take a few moment to give back to pymatgen in some small way, it would be greatly appreciated. A benefit of contributing is that your code will now be used by other researchers who use pymatgen, and we will include an acknowledgement to you (and any related publications) in pymatgen.</p> <div class="section" id="reporting-bugs"> <h3>Reporting bugs<a class="headerlink" href="#reporting-bugs" title="Permalink to this headline">¶</a></h3> <p>A simple way that anyone can contribute is simply to report bugs and issues to the developing team. Please report any bugs and issues at pymatgen’s <a class="reference external" href="https://github.com/materialsproject/pymatgen/issues">Github Issues page</a>. For help with any pymatgen issue, consult <a class="reference external" href="https://stackoverflow.com/questions/tagged/pymatgen">Stack Overflow</a> and if you cannot find an answer, please post a question with the tag <cite>pymatgen</cite>.</p> </div> <div class="section" id="developing-new-functionality"> <h3>Developing new functionality<a class="headerlink" href="#developing-new-functionality" title="Permalink to this headline">¶</a></h3> <p>Another way to contribute is to submit new code/bugfixes to pymatgen. The best way for anyone to develop pymatgen is by adopting the collaborative Github workflow (see <a class="reference external" href="/contributing">contributing page</a>).</p> </div> </div> <div class="section" id="how-to-cite-pymatgen"> <h2>How to cite pymatgen<a class="headerlink" href="#how-to-cite-pymatgen" title="Permalink to this headline">¶</a></h2> <p>If you use pymatgen in your research, please consider citing the following work:</p> <blockquote> <div><p>Shyue Ping Ong, William Davidson Richards, Anubhav Jain, Geoffroy Hautier, Michael Kocher, Shreyas Cholia, Dan Gunter, Vincent Chevrier, Kristin A. Persson, Gerbrand Ceder. <em>Python Materials Genomics (pymatgen) : A Robust, Open-Source Python Library for Materials Analysis.</em> Computational Materials Science, 2013, 68, 314–319. <a class="reference external" href="http://dx.doi.org/10.1016/j.commatsci.2012.10.028">doi:10.1016/j.commatsci.2012.10.028</a></p> </div></blockquote> <p>In addition, some of pymatgen’s functionality is based on scientific advances / principles developed by various scientists. Please refer to the <a class="reference internal" href="references.html"><span class="doc">references page</span></a> for citation info.</p> </div> <div class="section" id="license"> <h2>License<a class="headerlink" href="#license" title="Permalink to this headline">¶</a></h2> <p>Pymatgen is released under the MIT License. The terms of the license are as follows:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">The</span> <span class="n">MIT</span> <span class="n">License</span> <span class="p">(</span><span class="n">MIT</span><span class="p">)</span> <span class="n">Copyright</span> <span class="p">(</span><span class="n">c</span><span class="p">)</span> <span class="mi">2011</span><span class="o">-</span><span class="mi">2012</span> <span class="n">MIT</span> <span class="o">&</span> <span class="n">The</span> <span class="n">Regents</span> <span class="n">of</span> <span class="n">the</span> <span class="n">University</span> <span class="n">of</span> <span class="n">California</span><span class="p">,</span> <span class="n">through</span> <span class="n">Lawrence</span> <span class="n">Berkeley</span> <span class="n">National</span> <span class="n">Laboratory</span> <span class="n">Permission</span> <span class="ow">is</span> <span class="n">hereby</span> <span class="n">granted</span><span class="p">,</span> <span class="n">free</span> <span class="n">of</span> <span class="n">charge</span><span class="p">,</span> <span class="n">to</span> <span class="nb">any</span> <span class="n">person</span> <span class="n">obtaining</span> <span class="n">a</span> <span class="n">copy</span> <span class="n">of</span> <span class="n">this</span> <span class="n">software</span> <span class="ow">and</span> <span class="n">associated</span> <span class="n">documentation</span> <span class="n">files</span> <span class="p">(</span><span class="n">the</span> <span class="s2">"Software"</span><span class="p">),</span> <span class="n">to</span> <span class="n">deal</span> <span class="ow">in</span> <span class="n">the</span> <span class="n">Software</span> <span class="n">without</span> <span class="n">restriction</span><span class="p">,</span> <span class="n">including</span> <span class="n">without</span> <span class="n">limitation</span> <span class="n">the</span> <span class="n">rights</span> <span class="n">to</span> <span class="n">use</span><span class="p">,</span> <span class="n">copy</span><span class="p">,</span> <span class="n">modify</span><span class="p">,</span> <span class="n">merge</span><span class="p">,</span> <span class="n">publish</span><span class="p">,</span> <span class="n">distribute</span><span class="p">,</span> <span class="n">sublicense</span><span class="p">,</span> <span class="ow">and</span><span class="o">/</span><span class="ow">or</span> <span class="n">sell</span> <span class="n">copies</span> <span class="n">of</span> <span class="n">the</span> <span class="n">Software</span><span class="p">,</span> <span class="ow">and</span> <span class="n">to</span> <span class="n">permit</span> <span class="n">persons</span> <span class="n">to</span> <span class="n">whom</span> <span class="n">the</span> <span class="n">Software</span> <span class="ow">is</span> <span class="n">furnished</span> <span class="n">to</span> <span class="n">do</span> <span class="n">so</span><span class="p">,</span> <span class="n">subject</span> <span class="n">to</span> <span class="n">the</span> <span class="n">following</span> <span class="n">conditions</span><span class="p">:</span> <span class="n">The</span> <span class="n">above</span> <span class="n">copyright</span> <span class="n">notice</span> <span class="ow">and</span> <span class="n">this</span> <span class="n">permission</span> <span class="n">notice</span> <span class="n">shall</span> <span class="n">be</span> <span class="n">included</span> <span class="ow">in</span> <span class="nb">all</span> <span class="n">copies</span> <span class="ow">or</span> <span class="n">substantial</span> <span class="n">portions</span> <span class="n">of</span> <span class="n">the</span> <span class="n">Software</span><span class="o">.</span> <span class="n">THE</span> <span class="n">SOFTWARE</span> <span class="n">IS</span> <span class="n">PROVIDED</span> <span class="s2">"AS IS"</span><span class="p">,</span> <span class="n">WITHOUT</span> <span class="n">WARRANTY</span> <span class="n">OF</span> <span class="n">ANY</span> <span class="n">KIND</span><span class="p">,</span> <span class="n">EXPRESS</span> <span class="n">OR</span> <span class="n">IMPLIED</span><span class="p">,</span> <span class="n">INCLUDING</span> <span class="n">BUT</span> <span class="n">NOT</span> <span class="n">LIMITED</span> <span class="n">TO</span> <span class="n">THE</span> <span class="n">WARRANTIES</span> <span class="n">OF</span> <span class="n">MERCHANTABILITY</span><span class="p">,</span> <span class="n">FITNESS</span> <span class="n">FOR</span> <span class="n">A</span> <span class="n">PARTICULAR</span> <span class="n">PURPOSE</span> <span class="n">AND</span> <span class="n">NONINFRINGEMENT</span><span class="o">.</span> <span class="n">IN</span> <span class="n">NO</span> <span class="n">EVENT</span> <span class="n">SHALL</span> <span class="n">THE</span> <span class="n">AUTHORS</span> <span class="n">OR</span> <span class="n">COPYRIGHT</span> <span class="n">HOLDERS</span> <span class="n">BE</span> <span class="n">LIABLE</span> <span class="n">FOR</span> <span class="n">ANY</span> <span class="n">CLAIM</span><span class="p">,</span> <span class="n">DAMAGES</span> <span class="n">OR</span> <span class="n">OTHER</span> <span class="n">LIABILITY</span><span class="p">,</span> <span class="n">WHETHER</span> <span class="n">IN</span> <span class="n">AN</span> <span class="n">ACTION</span> <span class="n">OF</span> <span class="n">CONTRACT</span><span class="p">,</span> <span class="n">TORT</span> <span class="n">OR</span> <span class="n">OTHERWISE</span><span class="p">,</span> <span class="n">ARISING</span> <span class="n">FROM</span><span class="p">,</span> <span class="n">OUT</span> <span class="n">OF</span> <span class="n">OR</span> <span class="n">IN</span> <span class="n">CONNECTION</span> <span class="n">WITH</span> <span class="n">THE</span> <span class="n">SOFTWARE</span> <span class="n">OR</span> <span class="n">THE</span> <span class="n">USE</span> <span class="n">OR</span> <span class="n">OTHER</span> <span class="n">DEALINGS</span> <span class="n">IN</span> <span class="n">THE</span> <span class="n">SOFTWARE</span><span class="o">.</span> </pre></div> </div> </div> <div class="section" id="about-the-team"> <h2>About the Team<a class="headerlink" href="#about-the-team" title="Permalink to this headline">¶</a></h2> <p>Shyue Ping Ong of the <a class="reference external" href="http://www.materialsvirtuallab.org">Materials Virtual Lab</a> started Pymatgen in 2011, and is still the project lead.</p> <p>The Pymatgen Development Team is the set of all contributors to the pymatgen project, including all subprojects.</p> <p>The full list of contributors are listed in the <a class="reference internal" href="team.html"><span class="doc">team page</span></a>.</p> </div> <div class="section" id="copyright-policy"> <h2>Copyright Policy<a class="headerlink" href="#copyright-policy" title="Permalink to this headline">¶</a></h2> <p>Pymatgen uses a shared copyright model. Each contributor maintains copyright over their contributions to pymatgen. But, it is important to note that these contributions are typically only changes to the repositories. Thus, the pymatgen source code, in its entirety is not the copyright of any single person or institution. Instead, it is the collective copyright of the entire pymatgen Development Team. If individual contributors want to maintain a record of what changes/contributions they have specific copyright on, they should indicate their copyright in the commit message of the change, when they commit the change to one of the pymatgen repositories.</p> <p>With this in mind, the following banner should be used in any source code file to indicate the copyright and license terms:</p> <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="c1"># Copyright (c) Pymatgen Development Team.</span> <span class="c1"># Distributed under the terms of the MIT License.</span> </pre></div> </div> </div> <div class="section" id="indices-and-tables"> <h2>Indices and tables<a class="headerlink" href="#indices-and-tables" title="Permalink to this headline">¶</a></h2> <ul class="simple"> <li><p><a class="reference internal" href="genindex.html"><span class="std std-ref">Index</span></a></p></li> <li><p><a class="reference internal" href="py-modindex.html"><span class="std std-ref">Module Index</span></a></p></li> <li><p><a class="reference internal" href="search.html"><span class="std std-ref">Search Page</span></a></p></li> </ul> </div> </div> </div> </div> <footer> <hr/> <div role="contentinfo"> <p> © Copyright 2011, Pymatgen Development Team </p> </div> Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>. </footer> </div> </div> </section> </div> <script type="text/javascript"> jQuery(function () { SphinxRtdTheme.Navigation.enable(true); }); </script> <div class="footer">This page uses <a href="http://analytics.google.com/"> Google Analytics</a> to collect statistics. You can disable it by blocking the JavaScript coming from www.google-analytics.com. <script type="text/javascript"> (function() { var ga = document.createElement('script'); ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; ga.setAttribute('async', 'true'); document.documentElement.firstChild.appendChild(ga); })(); </script> </div> </body> </html>