diff --git a/OgreInterface/example.py b/OgreInterface/example.py index 1d28a19..b926278 100644 --- a/OgreInterface/example.py +++ b/OgreInterface/example.py @@ -9,11 +9,9 @@ film="./poscars/POSCAR_Al_conv", max_film_index=2, max_substrate_index=2, - max_linear_strain=0.01, - max_angle_strain=0.01, + max_strain=0.01, max_area_mismatch=0.01, - max_area=200, - convert_to_conventional=True, + max_area=200 ) ms.run_scan() ms.plot_misfits(fontsize=14, labelrotation=-20, figure_scale=1) @@ -35,8 +33,8 @@ ) # Select which Surface you want from the list of Surface's -sub = subs.slabs[0] -film = films.slabs[0] +sub = subs._slabs[0] +film = films._slabs[0] # Optional way to remove layers from the substrate or film (Usefull for complete control of termination) # sub.remove_layers(num_layers=3, top=False) @@ -46,12 +44,12 @@ interface_generator = InterfaceGenerator( substrate=sub, film=film, - max_linear_strain=0.01, - max_angle_strain=0.01, + max_strain=0.01, max_area_mismatch=0.01, max_area=200, - interfacial_distance=2.0, - vacuum=40, + interfacial_distance=4.0, + vacuum=20, + center=True, ) # Generate the interfaces diff --git a/OgreInterface/interfaces/interface.py b/OgreInterface/interfaces/interface.py index ef52ea8..365ed3c 100644 --- a/OgreInterface/interfaces/interface.py +++ b/OgreInterface/interfaces/interface.py @@ -493,7 +493,7 @@ def write_file( if relax: poscar.selective_dynamics = to_relax - poscar_str = poscar.get_string() + poscar_str = poscar.get_str() else: syms = [site.specie.symbol for site in slab] @@ -538,7 +538,7 @@ def write_file( if relax: poscar.selective_dynamics = to_relax - poscar_str = poscar.get_string().split("\n") + poscar_str = poscar.get_str().split("\n") poscar_str[5] = " ".join(new_atom_types) poscar_str[6] = " ".join(list(map(str, n_atoms))) poscar_str = "\n".join(poscar_str) diff --git a/OgreInterface/interfaces/old_interface.py b/OgreInterface/interfaces/old_interface.py index 5d35909..48e1138 100644 --- a/OgreInterface/interfaces/old_interface.py +++ b/OgreInterface/interfaces/old_interface.py @@ -944,7 +944,7 @@ def write_file( if relax: poscar.selective_dynamics = to_relax - poscar_str = poscar.get_string() + poscar_str = poscar.get_str() else: syms = [site.specie.symbol for site in slab] @@ -987,7 +987,7 @@ def write_file( if relax: poscar.selective_dynamics = to_relax - poscar_str = poscar.get_string().split("\n") + poscar_str = poscar.get_str().split("\n") poscar_str[5] = " ".join(new_atom_types) poscar_str[6] = " ".join(list(map(str, n_atoms))) poscar_str = "\n".join(poscar_str) diff --git a/OgreInterface/surfaces/surface.py b/OgreInterface/surfaces/surface.py index cb2c1d4..5410a88 100644 --- a/OgreInterface/surfaces/surface.py +++ b/OgreInterface/surfaces/surface.py @@ -177,7 +177,7 @@ def write_file( comment = self._get_base_poscar_comment_str(orthogonal=orthogonal) if not self._passivated: - poscar_str = Poscar(slab, comment=comment).get_string() + poscar_str = Poscar(slab, comment=comment).get_str() else: if relax: atomic_numbers = np.array(slab.atomic_numbers) @@ -231,7 +231,7 @@ def write_file( if relax: poscar.selective_dynamics = selective_dynamics - poscar_str = poscar.get_string().split("\n") + poscar_str = poscar.get_str().split("\n") poscar_str[5] = " ".join(new_atom_types) poscar_str[6] = " ".join(list(map(str, n_atoms))) poscar_str = "\n".join(poscar_str)