Build Fe-graphene interface using InterfaceBuilder

Hi all,

I would like to build some interface (Iron - Graphene and Iron-Graphite) using pymatgen.analysis.interface InterfaceBuilder.
What information should i put into “match” in the apply_transformations(match) ?

What is ZSL stand for? and is there other method you can suggest to build interface between 2 slabs?
Should I use combine_slabs instead?
Here is an example of what I used
from pymatgen.analysis.interface import InterfaceBuilder fe100_graphene = InterfaceBuilder(fe_100_4,graphene).apply_transformations(???)

Thank you all for your time!

The InterfaceBuilder is a very early prototype and I’m still fixing issues in the algorithm. I would not recommend anyone use it for now if you’re not comfortable with the level of programming employed in pymatgen.

That being said you want to use the generate_interfaces method.

what is the correct way to use generate_interfaces method?
fe100_graphene = InterfaceBuilder(fe_100_4,graphene).apply_transformations
interfaces = fe100_graphene.generate_interfaces() ?

You don’t use apply_transformations. You need to just make an InterfaceBuilder object and then run the generate_interfaces method:

fe100_graphene = InterfaceBuilder(fe_100_4,graphene)
fe100_graphene.generate_interfaces() 
interfaces = fe100_graphene.interfaces

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

@mwo

It’s the same Zur and McGil algorithm. although we have been exploring a larger number of degrees of freedom: methods to enumerate in-plane shifts and determine optimal surface separation. Unfortunately, this work has been a bit on hold as I’ve had other work priorities for MP. As i mentioned the current interface builder is still early stage, and is likely to have a number of bugs.

Thanks for the quick reply. I am super happy that someone is working on this. I guess for now I will continue using the MPInterfaces stuff, but will switch later to the pymatgen implementation as soon as it will be bugfree. I will watch the changelog and wish you all the best for the implementation!