18.11.2012 Views

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

ASE Manual Release 3.6.1.2825 CAMd - CampOS Wiki

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

import numpy as np<br />

import ase.utils.geometry as geometry<br />

import ase.io as io<br />

<strong>ASE</strong> <strong>Manual</strong>, <strong>Release</strong> 3.6.1.2828<br />

# Create a new atoms instance with Co at origo including all atoms on the<br />

# surface of the unit cell<br />

cosb3 = geometry.cut(skutterudite, origo=(0.25, 0.25, 0.25), extend=1.01)<br />

# Define the atomic bonds to show<br />

bondatoms = []<br />

symbols = cosb3.get_chemical_symbols()<br />

for i in xrange(len(cosb3)):<br />

for j in xrange(i):<br />

if (symbols[i] == symbols[j] == ’Co’ and<br />

cosb3.get_distance(i, j) < 4.53):<br />

bondatoms.append((i, j))<br />

elif (symbols[i] == symbols[j] == ’Sb’ and<br />

cosb3.get_distance(i, j) < 2.99):<br />

bondatoms.append((i, j))<br />

# Create nice-looking image using povray<br />

io.write(’spacegroup-cosb3.pov’, cosb3,<br />

transparent=False,<br />

display=False,<br />

run_povray=True,<br />

camera_type=’perspective’,<br />

canvas_width=320,<br />

radii=0.4,<br />

rotation=’90y’,<br />

bondlinewidth=0.07,<br />

bondatoms=bondatoms,<br />

)<br />

6.2. <strong>ASE</strong> 27

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!