[ase-users] precon with NEB is not working for non periodic system

Alaithan, Zainab z.alaithan17 at imperial.ac.uk
Wed Apr 21 21:50:52 CEST 2021


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/20210421/825ce58b/attachment.htm>


More information about the ase-users mailing list