diff --git a/structuretoolkit/__init__.py b/structuretoolkit/__init__.py index 3a79c0486..cf64fdab7 100644 --- a/structuretoolkit/__init__.py +++ b/structuretoolkit/__init__.py @@ -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, diff --git a/structuretoolkit/common/__init__.py b/structuretoolkit/common/__init__.py index 41bad76b0..b762bac1c 100644 --- a/structuretoolkit/common/__init__.py +++ b/structuretoolkit/common/__init__.py @@ -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, diff --git a/structuretoolkit/common/helper.py b/structuretoolkit/common/helper.py index 835ceae0a..2c901a591 100644 --- a/structuretoolkit/common/helper.py +++ b/structuretoolkit/common/helper.py @@ -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 ): diff --git a/structuretoolkit/visualize.py b/structuretoolkit/visualize.py index 6b7ed9b79..b8d69fc57 100644 --- a/structuretoolkit/visualize.py +++ b/structuretoolkit/visualize.py @@ -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 - " @@ -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( @@ -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`