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 />

Writing files<br />

$ ag -n -1 a*.traj -o new.traj<br />

Possible formats are: traj, xyz, cube, pdb, eps, png, and pov. For details, see the io module documentation.<br />

Interactive use<br />

The ag program can also be launched directly from a Python script or interactive session:<br />

>>> from ase import *<br />

>>> atoms = ...<br />

>>> view(atoms)<br />

or<br />

>>> view(atoms, repeat=(3, 3, 2))<br />

or, to keep changes to your atoms:<br />

>>> atoms.edit()<br />

NEB calculations<br />

Use Tools → NEB to plot energy barrier.<br />

$ ag --interpolate 3 initial.xyz final.xyz -o interpolated_path.traj<br />

Plotting data from the command line<br />

Plot the energy relative to the energy of the first image as a function of the distance between atom 0 and 5:<br />

$ ag -g "d(0,5),e-E[0]" x.traj<br />

$ ag -t -g "d(0,5),e-E[0]" x.traj > x.dat # No GUI, write data to stdout<br />

The symbols are the same as used in the plotting data function.<br />

Defaults for ag<br />

Using a file ~/.ase/gui.py, certain defaults can be set. If it exists, this file is executed after initializing the<br />

variables and colours normally used in ag. One can change the default graphs that are plotted, and the default radii<br />

for displaying specific atoms. This example will display the energy evolution and the maximal force in a graph<br />

and also display Cu atoms (Z=29) with a radius of 1.6 Angstrom.<br />

gui_default_settings[’gui_graphs_string’] = "i, e - min(E), fmax"<br />

gui_default_settings[’covalent_radii’] = [[29,1.6]]<br />

High contrast settings for ag<br />

In revision 2600 or later, it is possible to change the foreground and background colors used to draw the atoms,<br />

for instance to draw white graphics on a black background. This can be done in ~/.ase/gui.py.<br />

gui_default_settings[’gui_foreground_color’] = ’#ffffff’ #white<br />

gui_default_settings[’gui_background_color’] = ’#000000’ #black<br />

74 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!