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.

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

For the pov graphics format, scale should not be specified. The elements of the color array can additionally<br />

be strings, or 4 and 5 vectors for named colors, rgb + filter, and rgb + filter + transmit specification.<br />

This format accepts the additional keywords:<br />

run_povray, display, pause, transparent, canvas_width, canvas_height,<br />

camera_dist, image_plane, camera_type, point_lights, area_light, background,<br />

textures, celllinewidth, bondlinewidth, bondatoms<br />

The read() function is only designed to retrive the atomic configuration from a file, but for the CUBE format<br />

you can import the function:<br />

io.read_cube_data()<br />

which will return a (data, atoms) tuple:<br />

from ase.io.cube import read_cube_data<br />

data, atoms = read_cube_data(’abc.cube’)<br />

7.6 Examples<br />

from ase.lattice.surface import *<br />

adsorbate = Atoms(’CO’)<br />

adsorbate[1].z = 1.1<br />

a = 3.61<br />

slab = fcc111(’Cu’, (2, 2, 3), a=a, vacuum=7.0)<br />

add_adsorbate(slab, adsorbate, 1.8, ’ontop’)<br />

Write PNG image:<br />

write(’slab.png’, slab * (3, 3, 1), rotation=’10z,-80x’)<br />

Write POVRAY file:<br />

write(’slab.pov’, slab * (3, 3, 1), rotation=’10z,-80x’)<br />

This will write both a slab.pov and a slab.ini file. Convert to PNG with the command povray<br />

slab.ini or use the run_povray=True option:<br />

70 Chapter 7. Documentation for modules in <strong>ASE</strong>

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

Saved successfully!

Ooh no, something went wrong!