Skip to content

Commit

Permalink
Run pre-commit
Browse files Browse the repository at this point in the history
  • Loading branch information
AntObi committed Dec 6, 2023
1 parent 6ccfba3 commit 1bda7be
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 17 deletions.
12 changes: 5 additions & 7 deletions examples/Crystal_Space/download_compounds_with_mp_api.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import itertools
import json
import time
import string
import itertools
from pathlib import Path
import time
from collections import defaultdict
from tqdm import tqdm
from pathlib import Path

from mp_api.client import MPRester
from pymatgen.core.composition import Composition
from tqdm import tqdm


def download_mp_data(
Expand Down Expand Up @@ -53,9 +53,7 @@ def download_mp_data(
range(1, max_stoich + 1), num_elements
):
formula_dict = {symbols[i]: stoich for i, stoich in enumerate(stoichs)}
formula_anonymous_list.append(
Composition(formula_dict).reduced_formula
)
formula_anonymous_list.append(Composition(formula_dict).reduced_formula)
formula_anonymous_list = sorted(set(formula_anonymous_list))

e_hull_dict = defaultdict(lambda: float("inf"))
Expand Down
11 changes: 4 additions & 7 deletions examples/Crystal_Space/generate_composition_with_smact.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
import warnings
from pathlib import Path

import itertools
import multiprocessing
import warnings
from functools import partial
from pathlib import Path

from tqdm import tqdm
import pandas as pd
from pymatgen.core.composition import Composition
from tqdm import tqdm

from smact import Element, ordered_elements
from smact.screening import smact_filter
Expand All @@ -21,9 +20,7 @@ def convert_formula(combinations, num_elements, max_stoich):
for counts in itertools.product(
range(1, max_stoich + 1), repeat=num_elements
):
formula_dict = {
symbol: count for symbol, count in zip(symbols, counts)
}
formula_dict = {symbol: count for symbol, count in zip(symbols, counts)}
formula = Composition(formula_dict).reduced_formula
local_compounds.append(formula)
return local_compounds
Expand Down
5 changes: 2 additions & 3 deletions examples/Crystal_Space/plot_embedding.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
from typing import List
from pathlib import Path
from typing import List

import pandas as pd

from plotly.subplots import make_subplots
import plotly.graph_objects as go
from plotly.subplots import make_subplots


def update_layout(
Expand Down

0 comments on commit 1bda7be

Please sign in to comment.