[gpaw-users] Optimizing the unit cell using stress tensor
sollebac
sollebac at gmail.com
Sun Feb 8 05:51:12 CET 2015
Dear gpaw users,
I'm trying to relax a nanotube C using the stress tensor, then
i set periodic boundary conditions only in z direction [ pbc=(False,False
True) ]
im wondering if there is a way to fix the "X" and "Y" sides of the unit
cell and let move only in "z" direction?
The nanotube is in a supercell and only is peridic in z ,
here is the script that im using that is similar to example in the web :
https://wiki.fysik.dtu.dk/gpaw/exercises/stress/stress.html
i just want relax the nanotube and find the lattice parameter but only
in z direction
from ase import Atoms
from ase.lattice import bulk
from ase.optimize.bfgs import BFGS
from ase.constraints import UnitCellFilter
from gpaw import GPAW
from gpaw import PW
import numpy as np
from ase.structure import nanotube
from ase.io import read,write
a=nanotube(7, 0, length=1, bond=1.4, symbol='C')
a.center()
a.set_pbc((False,False,True))
write('a.traj', a)
calc = GPAW(xc='PBE',
mode=PW(100),
# mode=PW(400, cell=a.get_cell()), # fix no of planewaves!
kpts=(1, 1, 3),
# convergence={'eigenstates': 1.e-10}, # converge tightly!
txt='stress.txt')
a.set_calculator(calc)
uf = UnitCellFilter(a)
relax = BFGS(uf)
relax.run(fmax=0.05) # Consider much tighter fmax!
b=a.get_cell()[0]
#b=a.get_cell()
print "Unit cell = ",a.get_cell()
any advice is welcome
thank you very much
Jose Luis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/gpaw-users/attachments/20150207/dc52f8d8/attachment.html>
More information about the gpaw-users
mailing list