Skip to content

Commit

Permalink
Lint fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
knc6 committed Apr 25, 2024
1 parent 24e294b commit a0fea81
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion jarvis/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ def test(*args):
import pytest

path = os.path.join(os.path.split(__file__)[0], "tests")
pytest.main(args=[path] + list(args))
pytest.main(args=[path] + list(args))
20 changes: 10 additions & 10 deletions jarvis/core/atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -1524,9 +1524,9 @@ def describe(
list(set(spg._dataset["wyckoffs"]))
)
struct_info["natoms_primitive"] = spg.primitive_atoms.num_atoms
struct_info["natoms_conventional"] = (
spg.conventional_standard_structure.num_atoms
)
struct_info[
"natoms_conventional"
] = spg.conventional_standard_structure.num_atoms
info["chemical_info"] = chem_info
info["structure_info"] = struct_info
line = "The number of atoms are: " + str(
Expand Down Expand Up @@ -2276,18 +2276,18 @@ def to_optimade(
info_at["cartesian_site_positions"] = atoms.cart_coords[order].tolist()
info_at["nperiodic_dimensions"] = 3
# info_at["species"] = atoms.elements
info_at["species"] = (
self.get_optimade_species()
) # dict(atoms.composition.to_dict())
info_at[
"species"
] = self.get_optimade_species() # dict(atoms.composition.to_dict())
info_at["elements_ratios"] = list(
atoms.composition.atomic_fraction.values()
)
info_at["structure_features"] = []
info_at["last_modified"] = str(now)
# info_at["more_data_available"] = True
info_at["chemical_formula_descriptive"] = (
atoms.composition.reduced_formula
)
info_at[
"chemical_formula_descriptive"
] = atoms.composition.reduced_formula
info_at["dimension_types"] = [1, 1, 1]
info["attributes"] = info_at
return info
Expand Down Expand Up @@ -2396,4 +2396,4 @@ def build_xanes_poscar(
# info['cartesian']=atoms['cartesian']
# elements=[i.strip() for i in atoms['elements']]
# info['elements']=elements
# return info
# return info
6 changes: 3 additions & 3 deletions jarvis/tests/testfiles/core/test_atoms.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def test_from_cif():


def test_basic_atoms():

Si = Atoms(
lattice_mat=FIXTURES["lattice_mat"],
coords=FIXTURES["coords"],
Expand All @@ -120,7 +119,7 @@ def test_basic_atoms():
den_lll_red = round(Si.get_lll_reduced_structure().density, 2)
strng = Si.get_string()
scell_nat_old = Si.make_supercell_old([2, 2, 2]).num_atoms
#descr = Si.describe()
# descr = Si.describe()
scell_nat = Si.make_supercell([2, 2, 2]).num_atoms
scell_nat2 = Si.make_supercell_matrix(
[[2, 0, 0], [0, 2, 0], [0, 0, 2]]
Expand Down Expand Up @@ -266,5 +265,6 @@ def test_remove_sites_by_indices():
)
assert Si2_supercell_without_two_atoms.num_atoms == 14


# test_basic_atoms()
# test_remove_sites_by_indices()
# test_remove_sites_by_indices()
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,4 @@
"Topic :: Scientific/Engineering",
],
# scripts=glob.glob(os.path.join(JARVIS_DIR, "*"))
)
)

0 comments on commit a0fea81

Please sign in to comment.