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
kavanase authored Jun 22, 2024
2 parents 0c6f84d + d3c3b65 commit f99a4d2
Show file tree
Hide file tree
Showing 175 changed files with 8,234 additions and 7,937 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,4 @@ venv/
ENV/
env.bak/
venv.bak/
.pdm-python
6 changes: 3 additions & 3 deletions dev_scripts/chemenv/get_plane_permutations_optimized.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def random_permutations_iterator(initial_permutation, n_permutations):
sym_measures = [c["symmetry_measure"] for c in csms]
prt1(string="Continuous symmetry measures", printing_volume=printing_volume)
prt1(string=sym_measures, printing_volume=printing_volume)
csms_with_recorded_permutation = [] # type: ignore
csms_with_recorded_permutation: list = []
explicit_permutations = []
for icsm, csm in enumerate(csms):
found = False
Expand Down Expand Up @@ -308,7 +308,6 @@ def random_permutations_iterator(initial_permutation, n_permutations):
all_planes_point_indices += algo.other_plane_points

# Setup of the permutations to be used for this algorithm

indices = list(range(cg.coordination_number))
if permutations_setup_type == "all":
perms_iterator = itertools.permutations(indices)
Expand Down Expand Up @@ -400,7 +399,8 @@ def random_permutations_iterator(initial_permutation, n_permutations):
else:
perms_used[some_perm] = 1
tcurrent = time.process_time()
time_left = (n_permutations - idx_perm) * (tcurrent - t0) / idx_perm # type: ignore
assert n_permutations is not None
time_left = (n_permutations - idx_perm) * (tcurrent - t0) / idx_perm
time_left = f"{time_left:.1f}"
idx_perm += 1
print(
Expand Down
22 changes: 11 additions & 11 deletions dev_scripts/update_pt_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,24 @@ def parse_oxi_state():
oxi_data = re.sub("[\n\r]", "", oxi_data)
patt = re.compile("<tr>(.*?)</tr>", re.MULTILINE)

for m in patt.finditer(oxi_data):
line = m.group(1)
for match in patt.finditer(oxi_data):
line = match[1]
line = re.sub("</td>", "", line)
line = re.sub("(<td>)+", "<td>", line)
line = re.sub("</*a[^>]*>", "", line)
el = None
oxi_states = []
common_oxi = []
for tok in re.split("<td>", line.strip()):
m2 = re.match(r"<b>([A-Z][a-z]*)</b>", tok)
if m2:
el = m2.group(1)
match2 = re.match(r"<b>([A-Z][a-z]*)</b>", tok)
if match2:
el = match2[1]
else:
m3 = re.match(r"(<b>)*([\+\-]\d)(</b>)*", tok)
if m3:
oxi_states += [int(m3.group(2))]
if m3.group(1):
common_oxi += [int(m3.group(2))]
match3 = re.match(r"(<b>)*([\+\-]\d)(</b>)*", tok)
if match3:
oxi_states += [int(match3[2])]
if match3[1]:
common_oxi += [int(match3[2])]
if el in data:
del data[el]["Max oxidation state"]
del data[el]["Min oxidation state"]
Expand Down Expand Up @@ -79,7 +79,7 @@ def parse_ionic_radii():
ionic_radii = {}
for tok_idx in range(3, len(tokens)):
if match := re.match(r"^\s*([0-9\.]+)", tokens[tok_idx]):
ionic_radii[int(header[tok_idx])] = float(match.group(1))
ionic_radii[int(header[tok_idx])] = float(match[1])

if el in data:
data[el][f"Ionic_radii{suffix}"] = ionic_radii
Expand Down
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.

93 changes: 71 additions & 22 deletions docs/contributing.md

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

9 changes: 6 additions & 3 deletions docs/modules.html

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

Loading

0 comments on commit f99a4d2

Please sign in to comment.