====== 制限付き構造緩和 ======
d = 1.1
from ase import Atoms
box = Atoms(pbc = True)
box.set_cell(cell = (4, 4, 4), scale_atoms = False)
from ase import Atom
box.append(Atom('C', (2, 2, 2), tag = 1))
box.append(Atom('O', (2 + d, 2, 2)))
from ase.constraints import FixAtoms
box.set_constraint(FixAtoms(mask=[atom.tag == 1 for atom in box]))
from ase.calculators.jacapo import Jacapo
solver = Jacapo('CO.nc', stay_alive = True, nbands = 10, atoms = box)
from ase.optimize import QuasiNewton
dyn = QuasiNewton(box)
dyn.run(fmax = 0.05)
$ python filter.py
BFGSLineSearch: 0[ 0] 17:34:36 -591.604035 8.7218
BFGSLineSearch: 1[ 2] 17:34:43 -591.849511 0.2591
BFGSLineSearch: 2[ 3] 17:34:45 -591.849791 0.0507
BFGSLineSearch: 3[ 4] 17:34:47 -591.849803 0.0018
$
$ grep Ion123 CO.txt
Ion123 1 1 1 0.50000000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 2 1 2 0.82500000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 1 1 1 0.50000000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 2 1 2 0.79086707 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 1 1 1 0.50000000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 2 1 2 0.79040935 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 1 1 1 0.50000000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 2 1 2 0.79029789 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 1 1 1 0.50000000 0.50000000 0.50000000 1.0 1.0 1.0
Ion123 2 1 2 0.79029789 0.50000000 0.50000000 1.0 1.0 1.0
$
[[seminar:jacapo_sample|目次へもどる]]