From 529f57a2f778fbb164727e3385d0767d6321f238 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 16 May 2023 11:31:58 -0600 Subject: [PATCH 1/3] Empty init file for quicker import --- structuretoolkit/__init__.py | 70 ------------------------------------ 1 file changed, 70 deletions(-) diff --git a/structuretoolkit/__init__.py b/structuretoolkit/__init__.py index 666658d3d..e69de29bb 100644 --- a/structuretoolkit/__init__.py +++ b/structuretoolkit/__init__.py @@ -1,70 +0,0 @@ -# Analyse -from structuretoolkit.analyse import ( - get_distances_array, - find_mic, - get_neighbors, - get_neighborhood, - get_equivalent_atoms, - get_steinhardt_parameters, - get_centro_symmetry_descriptors, - get_diamond_structure_descriptors, - get_adaptive_cna_descriptors, - get_voronoi_volumes, - find_solids, - get_mean_positions, - get_average_of_unique_labels, - get_interstitials, - get_layers, - get_voronoi_vertices, - get_voronoi_neighbors, - get_delaunay_neighbors, - get_cluster_positions, - get_strain, - get_symmetry, - # for backwards compatibility - get_cluster_positions as cluster_positions, - get_equivalent_atoms as analyse_phonopy_equivalent_atoms, - get_steinhardt_parameters as get_steinhardt_parameter_structure, - get_centro_symmetry_descriptors as analyse_centro_symmetry, - get_diamond_structure_descriptors as analyse_diamond_structure, - get_adaptive_cna_descriptors as analyse_cna_adaptive, - get_voronoi_volumes as analyse_voronoi_volume, - find_solids as analyse_find_solids, -) - -# Build -from structuretoolkit.build import ( - grainboundary, - get_grainboundary_info, - B2, - C14, - C15, - C36, - D03, - sqs_structures, - high_index_surface, - get_high_index_surface_info, - # for backwards compatibility - grainboundary as grainboundary_build, - get_grainboundary_info as grainboundary_info, - sqs_structures as get_sqs_structures, - get_high_index_surface_info as high_index_surface_info, -) - -# Visualize -from structuretoolkit.visualize import plot3d - -# Common -from structuretoolkit.common import ( - ase_to_pymatgen, - pymatgen_to_ase, - ase_to_pyscal, - get_atomic_numbers, - get_extended_positions, - get_vertical_length, - get_wrapped_coordinates, - select_index, - center_coordinates_in_unit_cell, - apply_strain, - SymmetryError, -) From e9c7e3cf78da2a3e4761ab3453c47d8f9b97f1fe Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 16 May 2023 11:36:11 -0600 Subject: [PATCH 2/3] import only core modules --- structuretoolkit/__init__.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/structuretoolkit/__init__.py b/structuretoolkit/__init__.py index e69de29bb..01b16b840 100644 --- a/structuretoolkit/__init__.py +++ b/structuretoolkit/__init__.py @@ -0,0 +1,4 @@ +from structuretoolkit import analyse +from structuretoolkit import common +from structuretoolkit import build +from structuretoolkit import visualize From 8015629b639899c64f4a2b35d781ead0afb2b9c4 Mon Sep 17 00:00:00 2001 From: Jan Janssen Date: Tue, 16 May 2023 11:39:16 -0600 Subject: [PATCH 3/3] Bug Fix --- tests/test_analyse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_analyse.py b/tests/test_analyse.py index a9c3dc337..b39dacf58 100644 --- a/tests/test_analyse.py +++ b/tests/test_analyse.py @@ -106,7 +106,7 @@ def test_get_interstitials_bcc(self): ).min(axis=0).sum(), 0 ) int_tetra = stk.analyse.get_interstitials(structure=bcc, num_neighbors=4) - x_tetra_ref = stk.common.get_wrapped_coordinates(structure=bcc, positions=stk.get_voronoi_vertices(structure=bcc)) + x_tetra_ref = stk.common.get_wrapped_coordinates(structure=bcc, positions=stk.analyse.get_voronoi_vertices(structure=bcc)) self.assertEqual(len(int_tetra.positions), len(x_tetra_ref)) self.assertAlmostEqual( np.linalg.norm(