Skip to content
Open
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
18 changes: 8 additions & 10 deletions OgreInterface/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions OgreInterface/interfaces/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions OgreInterface/interfaces/old_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions OgreInterface/surfaces/surface.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down