Hi!
@shyamd:
I would also like to know a little bit more about this? Especially on what algorithm is the interface matching is based on, and if there is a possibility to tune e.g. maximal strains and angle mismatches and allowed size of the matched cell?
In an initial test with two slabs of Au111 and C001 (diamond) I have failed to produce a correct interface, but I think the lattice matching is working OK. The main issue seems to be with the vacuum region and maybe the fact that I am not using a monolayer thin film, but two slabs with ~10A thickness each. Is one supposed to use slabs (pymatgen.core.surface.Slab
) that contain a vacuum as an input, or rather oriented structures without vacuum?
@Ngan_Huynh:
You might be interested in the MPInterfaces package which works decently well for me for generating interfaces. Note that while this was developed as part of the materials project, I do not thing it is officially supported. After a small exchange with the developers in spring however, they have updated the version that you can install via pip and now interface generation works fine. Note however, that I have tested only that part of the package. I think it is not maintained well anymore and in the long run it would certainly be better to use the code within pymatgen itself I think. You should check out the paper: MPInterfaces: A Materials Project based Python tool for high-throughput computational screening of interfacial systems
The algorithm from Zur and McGill is used and you want to look at:
mpinterfaces.transformations.get_aligned_lattices
and mpinterfaces.transformations.get_interface
Here is some code to match two slabs (need to be pymatgen.core.surface.Slab
objects) with reasonable parameter defaults provided:
import pprint
from mpinterfaces.transformations import get_aligned_lattices, \
get_interface
def MatchTheInterface(slab_1, slab_2, inter_params={}):
max_area = inter_params.get('max_area', 500)
max_missmatch = inter_params.get('max_missmatch', 0.01)
max_angle_diff = inter_params.get('max_angle_diff', 2.0)
r1r2_tol = inter_params.get('r1r2_tol', 0.05)
separation = inter_params.get('separation', 2.5)
bottom_aligned, top_aligned = get_aligned_lattices(
slab_1,
slab_2,
max_area = max_area,
max_mismatch = max_missmatch,
max_angle_diff = max_angle_diff,
r1r2_tol = r1r2_tol)
if bottom_aligned:
hetero_interfaces = get_interface(top_aligned,
bottom_aligned,
nlayers_2d = 1,
nlayers_substrate = 1,
separation = separation)
return_dict = {"interface": hetero_interfaces,
"matched_bottom_slab": bottom_aligned,
"matched_top_slab": top_aligned}
return return_dict
else:
print('No match of the given slabs could be found with the '
'given parameters:')
pprint.pprint(inter_params)
print('')
return None