diff --git a/structuretoolkit/analyse/neighbors.py b/structuretoolkit/analyse/neighbors.py index e2795e210..e40b883db 100644 --- a/structuretoolkit/analyse/neighbors.py +++ b/structuretoolkit/analyse/neighbors.py @@ -51,7 +51,7 @@ class Tree: def __init__(self, ref_structure): """ Args: - ref_structure (pyiron_atomistics.atomistics.structure.atoms.Atoms): Reference + ref_structure (ase.atoms.Atoms): Reference structure. """ self._distances = None @@ -399,7 +399,7 @@ def get_neighborhood( Returns: - pyiron.atomistics.structure.atoms.Tree: Neighbors instances with the neighbor indices, + structuretoolkit.analyse.neighbors.Tree: Neighbors instances with the neighbor indices, distances and vectors """ @@ -799,8 +799,8 @@ def get_shell_matrix( Example: - from pyiron_atomistics import Project - structure = Project('.').create_structure('Fe', 'bcc', 2.83).repeat(2) + from ase.build import bulk + structure = bulk('Fe', 'bcc', 2.83).repeat(2) J = -0.1 # Ising parameter magmoms = 2*np.random.random((len(structure)), 3)-1 # Random magnetic moments between -1 and 1 neigh = structure.get_neighbors(num_neighbors=8) # Iron first shell @@ -1126,7 +1126,7 @@ def get_neighbors( Returns: - pyiron.atomistics.structure.atoms.Neighbors: Neighbors instances with the neighbor + structuretoolkit.analyse.neighbors.Neighbors: Neighbors instances with the neighbor indices, distances and vectors """ @@ -1218,7 +1218,7 @@ def get_neighborhood( Returns: - pyiron.atomistics.structure.atoms.Tree: Neighbors instances with the neighbor + structuretoolkit.analyse.neighbors.Tree: Neighbors instances with the neighbor indices, distances and vectors """ diff --git a/structuretoolkit/analyse/pyscal.py b/structuretoolkit/analyse/pyscal.py index 40536cfb3..323ef8e7a 100644 --- a/structuretoolkit/analyse/pyscal.py +++ b/structuretoolkit/analyse/pyscal.py @@ -43,7 +43,7 @@ def get_steinhardt_parameter_structure( numpy.ndarray: (number of q's, number of atoms) shaped array of q parameters numpy.ndarray: If `clustering=True`, an additional per-atom array of cluster ids is also returned """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) q = (4, 6) if q is None else q sys.find_neighbors(method=neighbor_method, cutoff=cutoff) @@ -72,7 +72,7 @@ def analyse_centro_symmetry(structure, num_neighbors=12): Returns: csm (list) : list of centrosymmetry parameter """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) return np.array(sys.calculate_centrosymmetry(nmax=num_neighbors)) @@ -93,7 +93,7 @@ def analyse_diamond_structure(structure, mode="total", ovito_compatibility=False Returns: (depends on `mode`) """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) diamond_dict = sys.identify_diamond() ovito_identifiers = [ @@ -183,7 +183,7 @@ def analyse_cna_adaptive(structure, mode="total", ovito_compatibility=False): Use common neighbor analysis Args: - structure (pyiron_atomistics.structure.atoms.Atoms): The structure to analyze. + structure (ase.atoms.Atoms): The structure to analyze. mode ("total"/"numeric"/"str"): Controls the style and level of detail of the output. - total : return number of atoms belonging to each structure @@ -195,7 +195,7 @@ def analyse_cna_adaptive(structure, mode="total", ovito_compatibility=False): Returns: (depends on `mode`) """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) if mode not in ["total", "numeric", "str"]: raise ValueError("Unsupported mode") @@ -238,21 +238,21 @@ def analyse_voronoi_volume(structure): Calculate the Voronoi volume of atoms Args: - structure : (pyiron_atomistics.structure.atoms.Atoms): The structure to analyze. + structure : (ase.atoms.Atoms): The structure to analyze. """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) sys.find_neighbors(method="voronoi") structure = sys.atoms return np.array([atom.volume for atom in structure]) -def pyiron_to_pyscal_system(structure): +def ase_to_pyscal_system(structure): """ Converts atoms to ase atoms and than to a pyscal system. Also adds the pyscal publication. Args: - structure (pyiron atoms): Structure to convert. + structure (ase.atoms.Atoms): Structure to convert. Returns: Pyscal system: See the pyscal documentation. @@ -296,7 +296,7 @@ def analyse_find_solids( int: number of solids, pyscal system: pyscal system when return_sys=True """ - sys = pyiron_to_pyscal_system(structure) + sys = ase_to_pyscal_system(structure) sys.find_neighbors(method=neighbor_method, cutoff=cutoff) sys.find_solids( bonds=bonds, diff --git a/structuretoolkit/analyse/spatial.py b/structuretoolkit/analyse/spatial.py index 22346f18c..f38df0422 100644 --- a/structuretoolkit/analyse/spatial.py +++ b/structuretoolkit/analyse/spatial.py @@ -185,7 +185,7 @@ def neigh(self): Neighborhood information of each interstitial candidate and their surrounding atoms. E.g. `class.neigh.distances[0][0]` gives the distance from the first interstitial candidate to its nearest neighboring atoms. The functionalities of `neigh` follow those of - `pyiron_atomistics.structure.atoms.neighbors`. + `structuretoolkit.analyse.neighbors`. """ if self._neigh is None: self._neigh = get_neighborhood( @@ -578,7 +578,7 @@ def cluster_positions( Example I: ``` - analyse = Analyze(some_pyiron_structure) + analyse = Analyze(some_ase_structure) positions = analyse.cluster_points(eps=2) ``` @@ -589,7 +589,7 @@ def cluster_positions( Example II: ``` - analyse = Analyze(some_pyiron_structure) + analyse = Analyze(some_ase_structure) print(analyse.cluster_positions([3*[0.], 3*[1.]], eps=3)) ``` diff --git a/structuretoolkit/analyse/strain.py b/structuretoolkit/analyse/strain.py index b72ac9f4e..eba6066f4 100644 --- a/structuretoolkit/analyse/strain.py +++ b/structuretoolkit/analyse/strain.py @@ -29,9 +29,9 @@ def __init__( """ Args: - structure (pyiron_atomistics.atomistics.structure.Atoms): Structure to calculate the + structure (ase.atoms.Atoms): Structure to calculate the strain values. - ref_structure (pyiron_atomistics.atomistics.structure.Atoms): Reference bulk structure + ref_structure (ase.atoms.Atoms): Reference bulk structure (against which the strain is calculated) num_neighbors (int): Number of neighbors to take into account to calculate the local frame. If not specified, it is estimated based on cna analysis (only available if diff --git a/structuretoolkit/analyse/symmetry.py b/structuretoolkit/analyse/symmetry.py index 4d9330fa0..a1e2b6f31 100644 --- a/structuretoolkit/analyse/symmetry.py +++ b/structuretoolkit/analyse/symmetry.py @@ -50,7 +50,7 @@ def __init__( ): """ Args: - structure (:class:`pyiron.atomistics.structure.atoms.Atoms`): reference Atom structure. + structure (:class:`ase.atoms.Atoms`): reference Atom structure. use_magmoms (bool): Whether to consider magnetic moments (cf. get_initial_magnetic_moments()) use_elements (bool): If False, chemical elements will be ignored @@ -334,7 +334,7 @@ def get_primitive_cell( use_elements (bool): If False, chemical elements will be ignored Returns: - (pyiron_atomistics.atomistics.structure.atoms.Atoms): Primitive cell + (ase.atoms.Atoms): Primitive cell Example (assume `basis` is a primitive cell): @@ -391,7 +391,7 @@ def get_symmetry( angle_tolerance (float): Angle search tolerance Returns: - symmetry (:class:`pyiron.atomistics.structure.symmetry.Symmetry`): Symmetry class + symmetry (:class:`structuretoolkit.analyse.symmetry.Symmetry`): Symmetry class """ diff --git a/structuretoolkit/build/aimsgb.py b/structuretoolkit/build/aimsgb.py index ff1160ebe..176162c52 100644 --- a/structuretoolkit/build/aimsgb.py +++ b/structuretoolkit/build/aimsgb.py @@ -58,7 +58,7 @@ def grainboundary_build( axis : Rotational axis for the GB you want to construct (for example, axis=[1,0,0]) sigma (int) : The sigma value of the GB you want to construct (for example, sigma=5) plane: The grain boundary plane of the GB you want to construct (for example, plane=[2,1,0]) - initial_struct : Initial bulk structure from which you want to construct the GB (a pyiron + initial_struct : Initial bulk structure from which you want to construct the GB (a ase structure object). delete_layer : To delete layers of the GB. For example, delete_layer='1b0t1b0t'. The first 4 characters is for first grain and the other 4 is for second grain. b means diff --git a/structuretoolkit/build/surface.py b/structuretoolkit/build/surface.py index 0ebf6ed48..3dc863bce 100644 --- a/structuretoolkit/build/surface.py +++ b/structuretoolkit/build/surface.py @@ -134,7 +134,7 @@ def high_index_surface( vacuum (float): Thickness of vacuum on the top of the slab. default:10 Returns: - slab: pyiron_atomistics.atomistics.structure.atoms.Atoms instance Required surface + slab: ase.atoms.Atoms instance Required surface """ basis = bulk( name=element, diff --git a/structuretoolkit/helper.py b/structuretoolkit/helper.py index 6e2e3879c..bbd34deb0 100644 --- a/structuretoolkit/helper.py +++ b/structuretoolkit/helper.py @@ -167,7 +167,7 @@ def center_coordinates_in_unit_cell(structure, origin=0, eps=1e-4): eps (float): Tolerance to detect atoms at cell edges Returns: - :class:`pyiron_atomistics.atomistics.structure.atoms.Atoms`: reference to this structure + :class:`ase.atoms.Atoms`: reference to this structure """ if any(structure.pbc): structure.set_scaled_positions(