[ase-users] Running NEB with ASE and CP2K
Hasan Al-Mahayni
hasanalmahayni at gmail.com
Sat Jun 13 03:36:41 CEST 2020
Hello,
I am running the same file as in the NEB section of the ASE website.
However, I am using CP2K as a calculator, while my initial and final images
are two slabs I created using ASE. I attached the python code "NEB" and the
slab xyz files.
My problem is, whenever I run this file, i get this following error:
"srun: Job 5563956 step creation temporarily disabled, retrying."
After contacting support, they told me that it has to do with cp2k, or this
line to be specific:
image.set_calculator(CP2K(xc='PBE',cutoff=500
,max_scf=200,poisson_solver='none' ,inp=inp))
Anyone had the same problem?
Thanks,
Hasan.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20200612/03ded94a/attachment.html>
-------------- next part --------------
slab1.xyz file:
20
Lattice="7.65796644025031 0.0 0.0 3.828983220125155 6.6319934785854535 0.0 0.0 0.0 22.08423447177455" Properties=species:S:1:pos:R:3:tags:I:1 pbc="T T F"
Cu 0.00000000 1.47377633 10.00000000 2
Cu 2.55265548 1.47377633 10.00000000 2
Cu 5.10531096 1.47377633 10.00000000 2
Cu 1.27632774 3.68444082 10.00000000 2
Cu 3.82898322 3.68444082 10.00000000 2
Cu 6.38163870 3.68444082 10.00000000 2
Cu 2.55265548 5.89510531 10.00000000 2
Cu 5.10531096 5.89510531 10.00000000 2
Cu 7.65796644 5.89510531 10.00000000 2
Cu 0.00000000 0.00000000 12.08423447 1
Cu 2.55265548 0.00000000 12.08423447 1
Cu 5.10531096 0.00000000 12.08423447 1
Cu 1.27632774 2.21066449 12.08423447 1
Cu 3.82898322 2.21066449 12.08423447 1
Cu 6.38163870 2.21066449 12.08423447 1
Cu 2.55265548 4.42132899 12.08423447 1
Cu 5.10531096 4.42132899 12.08423447 1
Cu 7.65796644 4.42132899 12.08423447 1
O 0.00000000 0.00000000 15.08423447 0
C 0.00000000 0.00000000 13.93389447 0
slab2.xyz file:
20
Lattice="7.65796644025031 0.0 0.0 3.828983220125155 6.6319934785854535 0.0 0.0 0.0 22.08423447177455" Properties=species:S:1:pos:R:3:tags:I:1 pbc="T T F"
Cu 0.00000000 1.47377633 10.00000000 2
Cu 2.55265548 1.47377633 10.00000000 2
Cu 5.10531096 1.47377633 10.00000000 2
Cu 1.27632774 3.68444082 10.00000000 2
Cu 3.82898322 3.68444082 10.00000000 2
Cu 6.38163870 3.68444082 10.00000000 2
Cu 2.55265548 5.89510531 10.00000000 2
Cu 5.10531096 5.89510531 10.00000000 2
Cu 7.65796644 5.89510531 10.00000000 2
Cu 0.00000000 0.00000000 12.08423447 1
Cu 2.55265548 0.00000000 12.08423447 1
Cu 5.10531096 0.00000000 12.08423447 1
Cu 1.27632774 2.21066449 12.08423447 1
Cu 3.82898322 2.21066449 12.08423447 1
Cu 6.38163870 2.21066449 12.08423447 1
Cu 2.55265548 4.42132899 12.08423447 1
Cu 5.10531096 4.42132899 12.08423447 1
Cu 7.65796644 4.42132899 12.08423447 1
O 1.27600000 2.21100000 15.08423447 0
C 1.27600000 2.21100000 13.93389447 0
-------------- next part --------------
from ase import io
from ase.neb import NEB
from ase.optimize import MDMin
from ase.calculators.cp2k import CP2K
inp= """
! &EXT_RESTART
! RESTART_FILE_NAME cp2k-1.restart
! &END
&MOTION
&PRINT
&RESTART
&EACH
&END EACH
&END RESTART
&TRAJECTORY
FORMAT XYZ
&END TRAJECTORY
&CELL
&END CELL
&END PRINT
&END MOTION
&FORCE_EVAL
&DFT
UKS .TRUE.
CHARGE 0
MULTIPLICITY 1
WFN_RESTART_FILE_NAME cp2k-RESTART.kp
&MGRID
NGRIDS 5
RELATIVE_CUTOFF 50
&END MGRID
&QS
EPS_DEFAULT 1.0E-12
METHOD GPW
EXTRAPOLATION USE_GUESS
&END QS
&SCF
SCF_GUESS RESTART
ADDED_MOS 200
CHOLESKY OFF
&SMEAR T
METHOD FERMI_DIRAC
ELECTRONIC_TEMPERATURE 3.0000E+2
&END SMEAR
&MIXING T
METHOD BROYDEN_MIXING
ALPHA 4.0000000000000002E-01
BETA 1.5000000000000000E+00
NMIXING 5
NBUFFER 8
&END MIXING
&END SCF
&POISSON
POISSON_SOLVER PERIODIC
PERIODIC XYZ
&END POISSON
&KPOINTS
SCHEME MONKHORST-PACK 8 8 8
FULL_GRID .TRUE.
&END KPOINTS
&END DFT
&END FORCE_EVAL
"""
# Read initial and final states:
initial = io.read('slab1.xyz')
final = io.read('slab2.xyz')
# Make a band consisting of 5 images:
images = [initial]
images += [initial.copy() for i in range(3)]
images += [final]
neb = NEB(images)
# Interpolate linearly the potisions of the three middle images:
neb.interpolate()
# Set calculators:
for image in images[1:4]:
image.set_calculator(CP2K(xc='PBE',cutoff=500 ,max_scf=200,poisson_solver='none' ,inp=inp))
# Optimize:
optimizer = MDMin(neb, trajectory='A2B.traj')
optimizer.run(fmax=0.04)
More information about the ase-users
mailing list