Statistiques
| Révision :

root / ase / optimize / test / C2_Cu100.py @ 1

Historique | Voir | Annoter | Télécharger (4,72 ko)

1
#PBS -l nodes=4:ppn=8
2
#PBS -l walltime=13:00:00
3
import numpy as np
4
from ase import Atoms
5
from ase.constraints import FixedPlane, FixAtoms
6
from ase.optimize.test import run_test
7
from gpaw import GPAW, Mixer
8
from gpaw.poisson import PoissonSolver
9

    
10
def get_calculator():
11
    basis = 'szp(dzp)'
12
    calc = GPAW(gpts=(64, 64, 128), # ca h=0.25
13
                width=0.1,
14
                nbands=-5,
15
                xc='LDA',
16
                mode='lcao',
17
                txt='C2_Cu100.txt',
18
                mixer=Mixer(beta=0.1, nmaxold=5, weight=50.0),
19
                poissonsolver=PoissonSolver(nn='M', relax='GS'),
20
                stencils=(3, 3),
21
                maxiter=400,
22
                basis=basis)
23
    return calc
24

    
25
def get_atoms():
26
    srf = Atoms('Cu64',[(1.2763,    1.2763,    4.0000),
27
                        (3.8290,    1.2763,    4.0000),
28
                        (6.3816,    1.2763,    4.0000),
29
                        (8.9343,    1.2763,    4.0000),
30
                        (1.2763,    3.8290,    4.0000),
31
                        (3.8290,    3.8290,    4.0000),
32
                        (6.3816,    3.8290,    4.0000),
33
                        (8.9343,    3.8290,    4.0000),
34
                        (1.2763,    6.3816,    4.0000),
35
                        (3.8290,    6.3816,    4.0000),
36
                        (6.3816,    6.3816,    4.0000),
37
                        (8.9343,    6.3816,    4.0000),
38
                        (1.2763,    8.9343,    4.0000),
39
                        (3.8290,    8.9343,    4.0000),
40
                        (6.3816,    8.9343,    4.0000),
41
                        (8.9343,    8.9343,    4.0000),
42
                        (0.0000,    0.0000,    5.8050),
43
                        (2.5527,    0.0000,    5.8050),
44
                        (5.1053,    0.0000,    5.8050),
45
                        (7.6580,    0.0000,    5.8050),
46
                        (0.0000,    2.5527,    5.8050),
47
                        (2.5527,    2.5527,    5.8050),
48
                        (5.1053,    2.5527,    5.8050),
49
                        (7.6580,    2.5527,    5.8050),
50
                        (0.0000,    5.1053,    5.8050),
51
                        (2.5527,    5.1053,    5.8050),
52
                        (5.1053,    5.1053,    5.8050),
53
                        (7.6580,    5.1053,    5.8050),
54
                        (0.0000,    7.6580,    5.8050),
55
                        (2.5527,    7.6580,    5.8050),
56
                        (5.1053,    7.6580,    5.8050),
57
                        (7.6580,    7.6580,    5.8050),
58
                        (1.2409,    1.2409,    7.6081),
59
                        (3.7731,    1.2803,    7.6603),
60
                        (6.3219,    1.3241,    7.6442),
61
                        (8.8935,    1.2669,    7.6189),
62
                        (1.2803,    3.7731,    7.6603),
63
                        (3.8188,    3.8188,    7.5870),
64
                        (6.3457,    3.8718,    7.6649),
65
                        (8.9174,    3.8340,    7.5976),
66
                        (1.3241,    6.3219,    7.6442),
67
                        (3.8718,    6.3457,    7.6649),
68
                        (6.3945,    6.3945,    7.6495),
69
                        (8.9576,    6.3976,    7.6213),
70
                        (1.2669,    8.8935,    7.6189),
71
                        (3.8340,    8.9174,    7.5976),
72
                        (6.3976,    8.9576,    7.6213),
73
                        (8.9367,    8.9367,    7.6539),
74
                        (0.0582,    0.0582,    9.4227),
75
                        (2.5965,   -0.2051,    9.4199),
76
                        (5.1282,    0.0663,    9.4037),
77
                        (7.6808,   -0.0157,    9.4235),
78
                        (-0.2051,   2.5965,    9.4199),
79
                        (2.1913,    2.1913,    9.6123),
80
                        (5.0046,    2.5955,    9.4873),
81
                        (7.5409,    2.5336,    9.4126),
82
                        (0.0663,    5.1282,    9.4037),
83
                        (2.5955,    5.0046,    9.4873),
84
                        (5.3381,    5.3381,    9.6106),
85
                        (7.8015,    5.0682,    9.4237),
86
                        (-0.0157,   7.6808,    9.4235),
87
                        (2.5336,    7.5409,    9.4126),
88
                        (5.0682,    7.8015,    9.4237),
89
                        (7.6155,    7.6155,    9.4317)])
90
    c2=Atoms('C2', [(3.2897,    3.2897,   10.6627),
91
                    (4.2113,    4.2113,   10.6493)])
92
    srf.extend(c2)
93
    srf.pbc=(1, 1, 0)
94
    srf.set_cell([ 10.2106, 10.2106, 20.6572],scale_atoms=False)
95

    
96
    mask=[a.index < 32  for a in srf]
97
    c1 = FixedPlane(-1, (1/np.sqrt(2), 1/np.sqrt(2), 1))
98
    c2 = FixedPlane(-2, (1/np.sqrt(2), 1/np.sqrt(2), 1))
99
    constraint = FixAtoms(mask=mask)
100
    srf.set_constraint([constraint, c1, c2])
101
    return srf
102

    
103
run_test(get_atoms, get_calculator, 'C2_Cu100')