Hello ASE users community,
I have the coordinates of a bimetallic Pt-Au surface which is a non orthorhombic one. I want to convert it to an orthorhombic cell. How can I do that in ASE? I tried to generate the orthorhombic cell directly in ASE, but I am getting poor results when I am trying to perform a geometry optimization of the surface in CP2K. I think I am making some mistake while identifying the “dopant_id” for the following code in case of generating the orthorhombic cell directly in ASE. The python code for the ASE to generate orthorhombic surface directly is pasted below. Any help regarding this will be really helpful. Thank you in advance.
import numpy as np
from ase import Atoms
from ase.build import fcc111
from ase.io import read
from ase.visualize import view
from ase.io import write
atoms = fcc111(‘Pt’, (2,2,3), a=4.00, orthogonal = True, vacuum=10.0)
view(atoms)
dopant_ids = [1, 3,5, 7, 8, 10]
for i, atom in enumerate(atoms):
if i in dopant_ids:
atom.symbol = ‘Au’
atoms *= (5,5,1)
view(atoms)
write(‘PtAufcc111_ortho.pdb’, atoms)