Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion structuretoolkit/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@
ase_to_pymatgen,
ase_to_pyscal,
center_coordinates_in_unit_cell,
get_atomic_numbers,
get_extended_positions,
get_vertical_length,
get_wrapped_coordinates,
Expand Down
1 change: 0 additions & 1 deletion structuretoolkit/common/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
from structuretoolkit.common.helper import (
apply_strain,
center_coordinates_in_unit_cell,
get_atomic_numbers,
get_extended_positions,
get_vertical_length,
get_wrapped_coordinates,
Expand Down
4 changes: 0 additions & 4 deletions structuretoolkit/common/helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
from scipy.sparse import coo_matrix


def get_atomic_numbers(structure):
return [atomic_numbers[el] for el in structure.get_chemical_symbols()]


def get_extended_positions(
structure, width, return_indices=False, norm_order=2, positions=None
):
Expand Down
6 changes: 2 additions & 4 deletions structuretoolkit/visualize.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
import numpy as np
from scipy.interpolate import interp1d

from structuretoolkit.common.helper import get_atomic_numbers

__author__ = "Joerg Neugebauer, Sudarsan Surendralal"
__copyright__ = (
"Copyright 2021, Max-Planck-Institut für Eisenforschung GmbH - "
Expand Down Expand Up @@ -184,7 +182,7 @@ def _plot3d_plotly(
if select_atoms is None:
select_atoms = np.arange(len(structure))
elements = structure.get_chemical_symbols()
atomic_numbers = get_atomic_numbers(structure=structure)
atomic_numbers = structure.get_atomic_numbers()
if scalar_field is None:
scalar_field = elements
fig = px.scatter_3d(
Expand Down Expand Up @@ -302,7 +300,7 @@ def _plot3d(
vector_field = structure.get_initial_magnetic_moments()

elements = structure.get_chemical_symbols()
atomic_numbers = get_atomic_numbers(structure=structure)
atomic_numbers = structure.get_atomic_numbers()
positions = structure.positions

# If `select_atoms` was given, visualize only a subset of the `parent_basis`
Expand Down