[ase-users] neighborlist: two atoms with distance larger than cutoff identified as neighbors
Tristan Maxson
tgmaxson at gmail.com
Sat Dec 12 15:17:31 CET 2020
There is an additional "skin" parameter which is a flat extra amount that
is counted. I am unsure what the logic of having it exactly is, but it is
likely the source of your problem.
Thank you,
Tristan Maxson
On Sat, Dec 12, 2020 at 3:50 AM Chunguang Tang via ase-users <
ase-users at listserv.fysik.dtu.dk> wrote:
> Dear ASE developers,
>
> The below code identifies two atoms with distance of 2.5 angstroms as
> neighbors although I set the cutoff (radius) as 1 angstrom. I thought they
> are neighbors only when their distance =< 2 angstroms. Could you help? Many
> thanks.
>
> Chunguang
>
> ------------------------------------------------
>
> from ase import Atoms, neighborlist
> lcell=10
>
> p=[[0, 0, 0],[2.5, 0, 0]]
>
> natom=len(p)
> symbol=['H' for i in range(natom)]
> atoms=Atoms(symbols=symbol,positions=p,cell=[lcell,lcell,lcell],pbc=True)
> # two atoms with radius r1 and r2 are defined as neighbors if they
> overlap. That is, if their distance<r1+r2
>
> cutoff=[1. for i in range(natom)] #here we assume two points with
> distance<2 angstrom are connected or neighbors
> nl=neighborlist.NeighborList(cutoff,self_interaction=False,bothways=True)
> nl.update(atoms)
>
> for i in range(natom):
> indices, offsets = nl.get_neighbors(i) # according ASE, offsets seems
> to be the vector from atom i to its neighbor atom, but its output is zero.
> print(indices)
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20201212/a8c7005e/attachment.html>
More information about the ase-users
mailing list