File: example_aims.py

package info (click to toggle)
python-ase 3.26.0-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,484 kB
  • sloc: python: 148,112; xml: 2,728; makefile: 110; javascript: 47
file content (20 lines) | stat: -rw-r--r-- 673 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
from ase.build import molecule
from ase.calculators.aims import Aims
from ase.optimize import BFGS

# Note that FHI-aim support for the i-PI protocol must be specifically
# enabled at compile time, e.g.: make -f Makefile.ipi ipi.mpi

# This example uses INET; see other examples for how to use UNIX sockets.
port = 31415

atoms = molecule('H2O', vacuum=3.0)
atoms.rattle(stdev=0.1)

aims = Aims(directory='aims-calc', xc='LDA')
opt = BFGS(atoms, trajectory='opt.aims.traj', logfile='opt.aims.log')

# For running with UNIX socket, put unixsocket='mysocketname'
# instead of port cf. aims parameters above
with aims.socketio(port=port) as atoms.calc:
    opt.run(fmax=0.05)