I’m looking to use structures derived from Materials Cloud 2D database which seems to be one of the better-maintained 2D material structure databases (correct me if I’m wrong) to programmatically create “stacks” of 2D materials with variable spacing, twist angles, etc.
AI has been helpful up to a point where I can easily take .cif’s from MC2D, import them into python using pymatgen, and then use make_supercell() to expand the 2D primitives into an arbitrary size.
What I’m asking is what is the optimum way to “stack” these structures together with arbitrary (x,y,theta) shifts to create a 3D heterostructure (as a structure object)? For instance, graphene-hBN-graphene-hBN - etc.
Hey @MJG take a look at the CoherentInterfaceBuilder in pymatgen - this basically sets up an interface between two structures according to specified Miller indices
If you need more flexibility e.g. in setting up semi-/in-coherent interfaces, then you may want to look at how CoherentInterfaceBuilder uses the SlabGenerator and Interface classes in pymatgen to stack separate layers
Hi Aaron, thanks! So for something like the proposed idea of hBN – graphene – hBN – etc; would it be possible to use bulk structures for each of those, and construct single-atom interfaces? Or would it be better to take already single-atom-thick structures from MC2D and wrap them up into larger structures?
Because I noticed that CoherentInterfaceBuilder takes as inputs the miller indices of both layers; what I’d rather have is just a displacement vector and rotation between each plane…
This still isn’t very clear. Wouldn’t RotationTransformation just be undone by CoherentInterfaceBuilder, as the latter would just rotate the lattice to match the miller indices specified?
And then after I’ve created a CoherentInterfaceBuilder object, I need to … Use the get_interfaces() method on that and…???
At what point do I get a structure that can be visualized with Crystal Toolkit?