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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Here is an example using bbox:<br />

d = a / 2**0.5<br />

write(’slab.pov’, slab * (2, 2, 1),<br />

bbox=(d, 0, 3 * d, d * 3**0.5))<br />

Note that the XYZ-format does not contain information about the unic cell:<br />

>>> write(’slab.xyz’, slab)<br />

>>> a = read(’slab.xyz’)<br />

>>> a.get_cell()<br />

array([[ 1., 0., 0.],<br />

[ 0., 1., 0.],<br />

[ 0., 0., 1.]])<br />

>>> a.get_pbc()<br />

array([False, False, False], dtype=bool)<br />

Use <strong>ASE</strong>’s native format for writing all information:<br />

>>> write(’slab.traj’, slab)<br />

>>> b = read(’slab.traj’)<br />

>>> b.get_cell()<br />

array([[ 5.10531096e+00, -4.11836034e-16, 1.99569088e-16],<br />

[ 2.55265548e+00, 4.42132899e+00, 7.11236625e-17],<br />

[ 8.11559027e+00, 4.68553823e+00, 1.32527034e+01]])<br />

>>> b.get_pbc()<br />

array([ True, True, True], dtype=bool)<br />

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

A script showing all of the povray parameters, and generating the image below, can be found here:<br />

doc/ase/save_pov.py<br />

7.6. Examples 71

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

Saved successfully!

Ooh no, something went wrong!