Skip to content

Commit

Permalink
Merge branch 'materialsproject:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
JiQi535 authored Nov 13, 2023
2 parents bd329c4 + 7c5c79f commit 222ec09
Show file tree
Hide file tree
Showing 252 changed files with 5,001 additions and 5,133 deletions.
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,3 @@ venv/
ENV/
env.bak/
venv.bak/
docs/tokens.py
8 changes: 7 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ci:

repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.3
rev: v0.1.5
hooks:
- id: ruff
args: [--fix]
Expand Down Expand Up @@ -56,3 +56,9 @@ repos:
# MD041: first line in a file should be a top-level heading
# MD025: single title
args: [--disable, MD013, MD024, MD025, MD033, MD041, "--"]

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
hooks:
- id: nbstripout
args: [--drop-empty-cells, --keep-output]
2,951 changes: 0 additions & 2,951 deletions CHANGES.md

This file was deleted.

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ Pymatgen is free to use. However, we also welcome your help to improve this libr
- Code contributions via [pull request] are welcome.
- For questions that are not bugs or feature requests, please use the `pymatgen` [MatSci forum](https://matsci.org/pymatgen) or open a [GitHub discussion].
- [`matgenb`](https://github.com/materialsvirtuallab/matgenb#introduction) provides some example Jupyter notebooks that demonstrate how to use `pymatgen` functionality.
- Follow us on [Twitter](https://twitter.com/pymatgen) to get news and tips.

[pull request]: https://github.com/materialsproject/pymatgen/pulls
[github issue]: https://github.com/materialsproject/pymatgen/issues
Expand Down Expand Up @@ -87,10 +86,10 @@ If you use `pymatgen` in your research, please consider citing the following wor
In addition, some of `pymatgen`'s functionality is based on scientific advances/principles developed by the computational materials scientists in our team. Please refer to the [`pymatgen` docs] on how to cite them.

### Soliciting contributions to an updated pymatgen paper
### Soliciting contributions to 2nd `pymatgen` paper

If you are a long-standing `pymatgen` contributor and would like to be involved in working on an updated `pymatgen` publication,
please contact the maintainers [@shyuep, @mkhorton and @janosh](mailto:[email protected],[email protected],[email protected]?subject=Contributing%20to%20updated%20pymatgen%20paper).
please fill out this [co-author registration form](https://docs.google.com/forms/d/e/1FAIpQLSecIhD2YjdPGldrRTM8Go3VxVg_vjKjZAOXtIKDG7qckHLYaQ/viewform) or contact [@shyuep, @mkhorton and @janosh](mailto:[email protected],[email protected],[email protected]?subject=Contributing%20to%20updated%20pymatgen%20paper) with questions.

## License

Expand Down
7 changes: 3 additions & 4 deletions dev_scripts/chemenv/explicit_permutations.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,7 @@ class Algo:
if len(cg.algorithms) != 1:
raise ValueError("Multiple algorithms !")
cg._algorithms = [ExplicitPermutationsAlgorithm(permutations=explicit_permutations)]
newgeom_dir = "new_geometry_files"
if not os.path.exists(newgeom_dir):
os.makedirs(newgeom_dir)
with open(f"{newgeom_dir}/{cg_symbol}.json", "w") as f:
new_geom_dir = "new_geometry_files"
os.makedirs(new_geom_dir, exist_ok=True)
with open(f"{new_geom_dir}/{cg_symbol}.json", "w") as f:
json.dump(cg.as_dict(), f)
3 changes: 1 addition & 2 deletions dev_scripts/chemenv/get_plane_permutations_optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,6 @@ def random_permutations_iterator(initial_permutation, n_permutations):
)
if test == "y":
new_geom_dir = "new_geometry_files"
if not os.path.exists(new_geom_dir):
os.makedirs(new_geom_dir)
os.makedirs(new_geom_dir, exist_ok=True)
with open(f"{new_geom_dir}/{cg_symbol}.json", "w") as file:
json.dump(cg.as_dict(), file)
3 changes: 1 addition & 2 deletions dev_scripts/regen_libxcfunc.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
import json
import os
import sys
from copy import deepcopy


def parse_libxc_docs(path):
Expand Down Expand Up @@ -46,8 +47,6 @@ def parse_section(section):

def write_libxc_docs_json(xcfuncs, jpath):
"""Write json file with libxc metadata to path jpath."""
from copy import deepcopy

xcfuncs = deepcopy(xcfuncs)

# Remove XC_FAMILY from Family and XC_ from Kind to make strings more human-readable.
Expand Down
34 changes: 15 additions & 19 deletions dev_scripts/update_pt_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,34 +7,36 @@

from __future__ import annotations

import collections
import json
import re
from itertools import product

import requests
from bs4 import BeautifulSoup
from monty.serialization import dumpfn, loadfn
from ruamel import yaml

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


def test_yaml():
with open("periodic_table.yaml") as f:
data = yaml.load(f)
with open("periodic_table.yaml") as file:
data = yaml.load(file)
print(data)


def test_json():
with open("periodic_table.json") as f:
data = json.load(f)
with open("periodic_table.json") as file:
data = json.load(file)
print(data)


def parse_oxi_state():
with open("periodic_table.yaml") as f:
data = yaml.load(f)
with open("oxidation_states.txt") as f:
oxi_data = f.read()
with open("periodic_table.yaml") as file:
data = yaml.load(file)
with open("oxidation_states.txt") as file:
oxi_data = file.read()
oxi_data = re.sub("[\n\r]", "", oxi_data)
patt = re.compile("<tr>(.*?)</tr>", re.MULTILINE)

Expand Down Expand Up @@ -65,8 +67,8 @@ def parse_oxi_state():
data[el]["Common oxidation states"] = common_oxi
else:
print(el)
with open("periodic_table2.yaml", "w") as f:
yaml.dump(data, f)
with open("periodic_table2.yaml", "w") as file:
yaml.dump(data, file)


def parse_ionic_radii():
Expand Down Expand Up @@ -161,7 +163,6 @@ def update_ionic_radii():
def parse_shannon_radii():
with open("periodic_table.yaml") as f:
data = yaml.load(f)
import collections

from openpyxl import load_workbook

Expand Down Expand Up @@ -251,10 +252,8 @@ def gen_iupac_ordering():

def add_electron_affinities():
"""Update the periodic table data file with electron affinities."""
import requests
from bs4 import BeautifulSoup

req = requests.get("https://en.wikipedia.org/wiki/Electron_affinity_(data_page)")
req = requests.get("https://wikipedia.org/wiki/Electron_affinity_(data_page)")
soup = BeautifulSoup(req.text, "html.parser")
for t in soup.find_all("table"):
if "Hydrogen" in t.text:
Expand All @@ -277,9 +276,6 @@ def add_electron_affinities():

def add_ionization_energies():
"""Update the periodic table data file with ground level and ionization energies from NIST."""
import collections

from bs4 import BeautifulSoup

with open("NIST Atomic Ionization Energies Output.html") as f:
soup = BeautifulSoup(f.read(), "html.parser")
Expand Down
59 changes: 59 additions & 0 deletions docs/CHANGES.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions docs/apidoc/conf.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

87 changes: 0 additions & 87 deletions docs/fetch_pmg_contributors.py

This file was deleted.

3 changes: 1 addition & 2 deletions docs/index.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 222ec09

Please sign in to comment.