Skip to content

Commit

Permalink
Merge branch 'master' into synthesis
Browse files Browse the repository at this point in the history
  • Loading branch information
shyuep committed Dec 20, 2018
2 parents 3a47da1 + 15bacce commit 189c0e6
Show file tree
Hide file tree
Showing 890 changed files with 54,271 additions and 10,829 deletions.
6 changes: 6 additions & 0 deletions .circleci/config.yml
Expand Up @@ -4,6 +4,8 @@ jobs:
working_directory: ~/pymatgen
docker:
- image: materialsvirtuallab/circle-ci-pmg-py3:0.0.2
environment:
PMG_MAPI_ENDPOINT: https://zola.lbl.gov/rest/v2
parallelism: 4
steps:
- checkout
Expand Down Expand Up @@ -37,6 +39,10 @@ jobs:
export PATH=$HOME/miniconda3/bin:$PATH
export GULP_LIB=`pwd`/cmd_line/gulp/Libraries
export MPLBACKEND=Agg
# Only do matproj and other ext API tests once every five random runs or so.
# The parallelism is 4. If 1/20 we have to run, that measn the probability of a matproj test running is 1-(1-0.05)**4 = 0.18.
if [ "$(( RANDOM % 20 ))" -ne "0" ]; then export NOSE_EXCLUDE_TESTS="pymatgen.ext.tests.test_matproj.MPResterTest;pymatgen.analysis.tests.test_pourbaix_diagram.PourbaixDiagramTest;pymatgen.tests.test_init.SettingsTestCase"; fi
echo "NOSE_EXCLUDE_TESTS=$NOSE_EXCLUDE_TESTS"
source activate test_env
pip install --quiet -e .
nosetests --config=nose.cfg --processes=4 --process-timeout=600 --cover-html --cover-html-dir=coverage_reports --with-timer --timer-top-n 30
Expand Down
5 changes: 4 additions & 1 deletion .travis.yml
Expand Up @@ -9,6 +9,8 @@ env:
- PATH=$PATH:`pwd`/cmd_line/bader/Linux_64bit:`pwd`/cmd_line/aconvasp/Linux_64bit:`pwd`/cmd_line/boltztrap/Linux_64bit
- GULP_LIB=`pwd`/cmd_line/gulp/Libraries
- MPLBACKEND=Agg
- PMG_MAPI_ENDPOINT=https://zola.lbl.gov/rest/v2
- NOSE_EXCLUDE_TESTS="pymatgen.ext.tests.test_matproj.MPResterTest;pymatgen.analysis.tests.test_pourbaix_diagram.PourbaixDiagramTest;pymatgen.tests.test_init.SettingsTestCase"
# command to install dependencies
sudo: false
install:
Expand All @@ -25,7 +27,8 @@ install:
before_script:
- python setup.py --quiet develop
# command to run tests, e.g. python setup.py test
script: travis_wait 28800 nosetests --with-timer --timer-top-n 30 pymatgen
script:
- travis_wait 28800 nosetests --with-timer --timer-top-n 30 pymatgen
notifications:
email:
recipients:
Expand Down
17 changes: 17 additions & 0 deletions CHANGES.rst
@@ -1,6 +1,23 @@
Change log
==========

v2018.12.12
-----------
* Support for IUPAC ordering of elements in Composition formulae (@utf)
* Various bug fixes including returning integer miller indices, catching negative values in Composition and fixes to graph analysis (@utf), fix to Composition serialization (@jmmshen), defect analysis (@HanmeiTang), removing sites in surfaces (@yiming-xu), and fix to support the new PROCAR format in VASP (@dkorotin)
* `PMG_MAPI_ENDPOINT` environment variable added to support different endpoints for the Materials Project REST interface (@mkhorton)

v2018.11.30
-----------
* MPRester.query now supports bulk queries for large scale requests.
(@dwinston)
* MVLRelax52Set which uses VASP 52 pseudopotentials. (@HanmeiTang)
* EPH calculations in ABINIT (@gmatteo)
* New ScaleToRelaxedTransformation (@richardtran415)
* New dimensionality finder, and consolidation of existing algorithms (@utf)
* New dopant predictor built on structure predictor (@utf)
* Misc bug fixes (@HanmeiTang, @utf, @tamuhey, @mkhorton, @yiming-xu, @richardtran415)

v2018.11.6
----------
* Ionic radius based CrystalNN (@computron)
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Expand Up @@ -13,11 +13,14 @@ environment:
SPLIT_RUN: "FALSE"
PMG_MAPI_KEY:
secure: XIbk1W27nucVUHTVpIL2B+FodL9w2Efyw5PqTdnfbHg=
PMG_MAPI_ENDPOINT: https://zola.lbl.gov/rest/v2
PYPIPWD:
secure: QPpXonUAeLJ8p3f936jh7g==
install:
# Add the paths
- 'set PATH=%PYTHON%;%PYTHON%\Library\bin;%PYTHON%\Scripts;%PATH%'
- 'set MPLBACKEND=Agg'
- 'set NOSE_EXCLUDE_TESTS="pymatgen.ext.tests.test_matproj.MPResterTest;pymatgen.analysis.tests.test_pourbaix_diagram.PourbaixDiagramTest;pymatgen.tests.test_init.SettingsTestCase"'
# Check that we have the expected version and architecture for Python
# - 'python --version'
# - 'python -c "import struct; print(struct.calcsize(''P'') * 8)"'
Expand Down
49 changes: 49 additions & 0 deletions dev_scripts/update_pt_data.py
Expand Up @@ -7,9 +7,16 @@

from __future__ import division
import json
from itertools import product

import ruamel.yaml as yaml
import re

from monty.serialization import loadfn

from pymatgen import Element
from pymatgen.core.periodic_table import get_el_sp

__author__ = "Shyue Ping Ong"
__copyright__ = "Copyright 2011, The Materials Project"
__version__ = "0.1"
Expand Down Expand Up @@ -216,6 +223,48 @@ def gen_periodic_table():
json.dump(data, f)


def gen_iupac_ordering():
periodic_table = loadfn("periodic_table.json")
order = [([18], range(6, 0, -1)), # noble gasses
([1], range(7, 1, -1)), # alkali metals
([2], range(7, 1, -1)), # alkali earth metals
(range(17, 2, -1), [9]), # actinides
(range(17, 2, -1), [8]), # lanthanides
([3], (5, 4)), # Y, Sc
([4], (6, 5, 4)), # Hf -> Ti
([5], (6, 5, 4)), # Ta -> V
([6], (6, 5, 4)), # W -> Cr
([7], (6, 5, 4)), # Re -> Mn
([8], (6, 5, 4)), # Os -> Fe
([9], (6, 5, 4)), # Ir -> Co
([10], (6, 5, 4)), # Pt -> Ni
([11], (6, 5, 4)), # Au -> Cu
([12], (6, 5, 4)), # Hg -> Zn
([13], range(6, 1, -1)), # Tl -> B
([14], range(6, 1, -1)), # Pb -> C
([15], range(6, 1, -1)), # Bi -> N
([1], [1]), # Hydrogen
([16], range(6, 1, -1)), # Po -> O
([17], range(6, 1, -1))] # At -> F

order = sum([list(product(x, y)) for x, y in order], [])
iupac_ordering_dict = dict(zip(
[Element.from_row_and_group(row, group) for group, row in order],
range(len(order))))

# first clean periodic table of any IUPAC ordering
for el in periodic_table:
periodic_table[el].pop('IUPAC ordering', None)

# now add iupac ordering
for el in periodic_table:
if 'IUPAC ordering' in periodic_table[el]:
# sanity check that we don't cover the same element twice
raise KeyError("IUPAC ordering already exists for {}".format(el))

periodic_table[el]['IUPAC ordering'] = iupac_ordering_dict[get_el_sp(el)]


if __name__ == "__main__":
parse_shannon_radii()
#gen_periodic_table()
34 changes: 12 additions & 22 deletions docs/_modules/collections.html
Expand Up @@ -4,27 +4,16 @@

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="X-UA-Compatible" content="IE=Edge" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title>collections &#8212; pymatgen 2018.11.6 documentation</title>

<title>collections &#8212; pymatgen 2018.12.12 documentation</title>
<link rel="stylesheet" href="../_static/proBlue.css" type="text/css" />
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />

<script type="text/javascript">
var DOCUMENTATION_OPTIONS = {
URL_ROOT: '../',
VERSION: '2018.11.6',
COLLAPSE_INDEX: false,
FILE_SUFFIX: '.html',
HAS_SOURCE: true,
SOURCELINK_SUFFIX: '.txt'
};
</script>
<script type="text/javascript" id="documentation_options" data-url_root="../" src="../_static/documentation_options.js"></script>
<script type="text/javascript" src="../_static/jquery.js"></script>
<script type="text/javascript" src="../_static/underscore.js"></script>
<script type="text/javascript" src="../_static/doctools.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<script async="async" type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.1/MathJax.js?config=TeX-AMS-MML_HTMLorMML"></script>
<link rel="shortcut icon" href="../_static/favicon.ico"/>
<link rel="index" title="Index" href="../genindex.html" />
<link rel="search" title="Search" href="../search.html" />
Expand All @@ -35,8 +24,7 @@
_gaq.push(['_trackPageview']);
</script>

</head>
<body>
</head><body>
<div class="related" role="navigation" aria-label="related navigation">
<h3>Navigation</h3>
<ul>
Expand All @@ -46,7 +34,7 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen 2018.11.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen 2018.12.12 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" accesskey="U">Module code</a> &#187;</li>
</ul>
</div>
Expand Down Expand Up @@ -808,12 +796,14 @@ <h1>Source code for collections</h1><div class="highlight"><pre>
<div class="sphinxsidebarwrapper">
<div id="searchbox" style="display: none" role="search">
<h3>Quick search</h3>
<div class="searchformwrapper">
<form class="search" action="../search.html" method="get">
<div><input type="text" name="q" /></div>
<div><input type="submit" value="Go" /></div>
<input type="text" name="q" />
<input type="submit" value="Go" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div>
<script type="text/javascript">$('#searchbox').show(0);</script>
</div>
Expand All @@ -829,14 +819,14 @@ <h3>Navigation</h3>
<li class="right" >
<a href="../py-modindex.html" title="Python Module Index"
>modules</a> |</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen 2018.11.6 documentation</a> &#187;</li>
<li class="nav-item nav-item-0"><a href="../index.html">pymatgen 2018.12.12 documentation</a> &#187;</li>
<li class="nav-item nav-item-1"><a href="index.html" >Module code</a> &#187;</li>
</ul>
</div>

<div class="footer" role="contentinfo">
&#169; Copyright 2011, Pymatgen Development Team.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.6.2.
Created using <a href="http://sphinx-doc.org/">Sphinx</a> 1.8.1.
</div>
<div class="footer">This page uses <a href="http://analytics.google.com/">
Google Analytics</a> to collect statistics. You can disable it by blocking
Expand Down

0 comments on commit 189c0e6

Please sign in to comment.