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.

for s in linspace(0.95, 1.05, 7):<br />

cell = cell0 * s<br />

atoms.set_cell((cell))<br />

ene = atoms.get_potential_energy()<br />

traj.write()<br />

See the equation of states tutorial for analysis of the results.<br />

CASTEP<br />

Introduction<br />

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

CASTEP 1 is a software package which uses density functional theory to provide a good atomic-level description<br />

of all manner of materials and molecules. CASTEP can give information about total energies, forces and stresses<br />

on an atomic system, as well as calculating optimum geometries, band structures, optical spectra, phonon spectra<br />

and much more. It can also perform molecular dynamics simulations.<br />

The CASTEP calculator interface class offers intuitive access to all CASTEP settings and most results. All<br />

CASTEP specific settings are accessible via attribute access (i.e. calc.param.keyword = ... or<br />

calc.cell.keyword = ...)<br />

Getting Started:<br />

Set the environment variables appropriately for your system.<br />

>>> export CASTEP_COMMAND=’ ... ’<br />

>>> export CASTEP_PP_PATH=’ ... ’<br />

Running the Calculator<br />

The default initialization command for the CASTEP calculator is<br />

class castep.Castep(directory=’CASTEP’, label=’castep’)<br />

To do a minimal run one only needs to set atoms, this will use all default settings of CASTEP, meaning LDA,<br />

singlepoint, etc..<br />

With a generated castep_keywords.py in place all options are accessible by inspection, i.e. tab-completion. This<br />

works best when using ipython. All options can be accessed via calc.param. or calc.cell.<br />

and documentation is printed with calc.param. ? or calc.cell.<br />

?. All options can also be set directly using calc.keyword = ... or calc.KEYWORD =<br />

... or even calc.KeYwOrD or directly as named arguments in the call to the constructor (e.g.<br />

Castep(task=’GeometryOptimization’)).<br />

All options that go into the .param file are held in an CastepParam instance, while all options that go into<br />

the .cell file and don’t belong to the atoms object are held in an CastepCell instance. Each instance can<br />

be created individually and can be added to calculators by attribute assignment, i.e. calc.param = param or<br />

calc.cell = cell.<br />

All internal variables of the calculator start with an underscore (_). All cell attributes that clearly belong into<br />

the atoms object are blocked. Setting calc.atoms_attribute (e.g. = positions) is sent directly to the<br />

atoms object.<br />

1 S. J. Clark, M. D. Segall, C. J. Pickard, P. J. Hasnip, M. J. Probert, K. Refson, M. C. Payne Zeitschrift für Kristallographie 220(5-6)<br />

pp.567- 570 (2005)<br />

7.14. Calculators 131

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

Saved successfully!

Ooh no, something went wrong!