Skip to content

Commit

Permalink
update: add vacuum to twisted interface
Browse files Browse the repository at this point in the history
  • Loading branch information
VsevolodX committed Oct 31, 2024
1 parent da73c3a commit cee4a64
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/py/mat3ra/made/tools/build/interface/builders.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
rotate,
translate_by_vector,
add_vacuum_sides,
add_vacuum,
)
from ...analyze import get_chemical_formula
from ...convert import to_ase, from_ase, to_pymatgen, PymatgenInterface, ASEAtoms
Expand Down Expand Up @@ -373,6 +374,8 @@ def _post_process(
)
interface = merge_materials([new_substrate, new_film], merge_dangerously=True)
interface.metadata["actual_twist_angle"] = item.angle
if item.configuration.vacuum != 0:
interface = add_vacuum(interface, item.configuration.vacuum)
interfaces.append(interface)
return interfaces

Expand Down
1 change: 1 addition & 0 deletions src/py/mat3ra/made/tools/build/interface/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class TwistedInterfaceConfiguration(BaseConfiguration):
substrate: Optional[Material] = None
twist_angle: float = 0.0
distance_z: float = 3.0
vacuum: float = 0.0

@property
def _json(self):
Expand Down

0 comments on commit cee4a64

Please sign in to comment.