[ase-users] precon with NEB is not working for non periodic system
James Kermode
james.kermode at gmail.com
Fri Apr 23 12:52:45 CEST 2021
Hi Zainab,
Thanks for reporting this.
As a short-term fix, you can construct your own preconditioner object with specified nearest neighbour and cutoff distances, e.g.
from ase.optimize.precon import Exp
precon = Exp(r_NN=1.5, r_cut=3.0)
…
neb = NEB(images, precon=precon)
In the longer term, I’m sure it will be possible to adapt these heuristics to work well also with non-periodic system. If you provide a complete script and ideally open an issue I’ll take a look.
Best wishes,
James
From: ase-users <ase-users-bounces at listserv.fysik.dtu.dk> on behalf of Alaithan, Zainab via ase-users <ase-users at listserv.fysik.dtu.dk>
Date: Wednesday, 21 April 2021 at 20:52
To: Ase Developers <ase-users at listserv.fysik.dtu.dk>
Subject: [ase-users] precon with NEB is not working for non periodic system
Dear ASE developers,
Thank you for your brilliant work. ASE has helped so much so far. However, I am running into a small problem with using NEB with precon for my system because it is not periodic. In estimating the nearest neighbour list there is the following code:
r_cut = 1.0
phi = (1.0 + np.sqrt(5.0)) / 2.0 # Golden ratio
# cell lengths and angles
a, b, c, alpha, beta, gamma = cell_to_cellpar(atoms.cell)
extent = [a, b, c]
# print('estimate_nearest_neighbour_distance(): extent=%r' % extent)
while r_cut < 2.0 * max(extent):
# print('estimate_nearest_neighbour_distance(): '
# 'calling neighbour_list with r_cut=%.2f A' % r_cut)
i, j, rij, fixed_atoms = get_neighbours(
atoms, r_cut, self_interaction=True,
neighbor_list=neighbor_list)
if len(i) != 0:
nn_i = np.bincount(i, minlength=len(atoms))
if (nn_i != 0).all():
break
r_cut *= phi
else:
raise RuntimeError('increased r_cut to twice system extent without '
'finding neighbours for all atoms. This can '
'happen if your system is too small; try '
'setting r_cut manually')
Because, my system is not periodic max extent = 0 and rcut is immediately bigger that 2.0 * max(extent), which gives me the error:
'increased r_cut to twice system extent without '
'finding neighbours for all atoms. This can '
'happen if your system is too small; try '
'setting r_cut manually'
What is the best way to overcome this problem, how can I manually set rcut from inside the NEB object?
Best Regards,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20210423/89fd9cc8/attachment.htm>
More information about the ase-users
mailing list