GOFEE
  • Installation
  • Getting started
  • SLURM job examples
  • Tutorial
    • Cu3Au2 with EMT - First search
    • Cu15 with EMT - Detailed
    • Au7 on Cu(111) with EMT
    • Modifying surrogate model
    • Searching for TiO clusters
    • Searching for the TiO2(001)-(1x4) reconstruction
  • GOFEE
GOFEE
  • Docs »
  • Tutorial »
  • Cu3Au2 with EMT - First search
  • View page source

Cu3Au2 with EMT - First search¶

In this tutorial we carry out a search for isolated Cu3Au2-clusters described by the EMT potential for efficiency. This simple system can conveniently be run in a few minuts without the need for paralization. A more detailed walkthrough is given in the Cu15 tutorial.

The following script Cu3Au2.py is used to carry out the search:

import numpy as np

from ase import Atoms
from ase.calculators.emt import EMT

from gofee.candidates import CandidateGenerator, StartGenerator, RattleMutation
from gofee import GOFEE

### Define calculator ###
calc = EMT()

### Set up system ###
# make empty cell
template = Atoms('',
             cell=[15,15,15],
             pbc=[0, 0, 0])

# Stoichiometry of atoms to be placed
stoichiometry = 3*[29] + 2*[79]

# Box in which to place atoms randomly
v = 4*np.eye(3)
p0 = np.array((7.5, 7.5, 7.5))
box = [p0, v]

# initialize startgenerator (used to generate initial structures)
sg = StartGenerator(template, stoichiometry, box)

### Set up candidate generation operations ###
# initialize rattle mutation
n_to_optimize = len(stoichiometry)
rattle = RattleMutation(n_to_optimize, Nrattle=3, rattle_range=4)

candidate_generator = CandidateGenerator(probabilities=[0.2, 0.8],
                                         operations=[sg, rattle])

### Initialize and run search ###
search1 = GOFEE(calc=calc,
               startgenerator=sg,
               candidate_generator=candidate_generator,
               max_steps=100,
               Ncandidates=10,
               population_size=5,
               logfile='-',
               trajectory='structures.traj')

search1.run()

And run using:

python Cu3Au2.py

Or to run in parallel:

mpiexec python Cu3Au2.py

The setting:

logfile='-'

Is used to write the search log to the standard output. Use:

logfile='filename'

to write to a file.

Continue with the Cu15 tutorial for more detail.

Next Previous

© Copyright 2020, Malthe Kjær Bisbo, Bjørk Hammer

Built with Sphinx using a theme provided by Read the Docs.