[ase-users] FCC 111 - surface

Tao Jiang jtbenny at gmail.com
Thu Sep 29 15:40:11 CEST 2011




On 29 sept. 2011, at 15:17, Vinícius Bertuzzo Lima wrote:

> greetings
> 
> I am a New User and I'm having trouble with a script: the code below:
> 
> #!/usr/bin/env python
> import os
> from ase.calculators.jacapo import *
> from ase.io import write
> from ase import *
> from math import sqrt
> 
> Mel='Pt'
> k=16        #kpts in (x, y, z)
> pwco=400    #planewavecutoff
> dco=450     #densitycutoff
> nb=12       #nbands
> 
> h=8.0
> a0=4.0
>  
> nl = [2,3,4]
> z = a0*sqrt(3)/3 
> n = 2
> for n in nl:
>     print 'Camada:', n, '/', 4
>     
>     fcc111 = Atoms([Atom(Mel, ((2*n % 3)/3., (n % 3)/3., -n*z/h))], pbc=True) 
You have put the definition of fcc111 in the for loop. Which means instead of adding the 
new layer in the Atoms, you are redefining the Atoms over and over again with only one layer.


>     fcc111.set_cell([(a0*sqrt(2)/2., 0., 0.)
>                      (-a0*sqrt(2)/4., a0*sqrt(6)/4., 0.), 
>                      (0.,0.,z)]) 
>     #scale_atoms=True)            
>     
>     print fcc111.get_positions()
> 
> 
> As you can see, I'm trying to create a surface 111, the problem that: I do not know where I am wrongto vary the number of layers.
> 
> This error is a primary, I know, but could you help me? I thank
> 
> Have a great day!

To create a fcc111, you can do

from ase.lattice.surface import fcc111

slab = fcc111('Pt', [2,2,3], a=4.0, vacuum=15)

It will create a 2x2 4 layer Pt fcc 111 surface with 15 \AA of vacuum

Cheers
/Tao

> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20110929/b3592d54/attachment.html>


More information about the ase-users mailing list