Skip to content

neighbor

esta.neighbor

neighbor(xyzfile, atomIndex=None, cutoff=None)

find neigbours of atoms in xyz file.

Parameters:

xyzfile: str name of the xyzfile atomlist: list (optional) list of atm indices whose nearest neighbors are to be found (numbering start from 1). Default is all atoms from xyz file cutoff: float (optional) cutoff distance within which atoms are considered to be bonded or tagged as nearest neighbors. Default value is 2 unit in atomic coordinate units

Return:

nn_id: list list of list containing nearest neighbors of each atom present in atomIndex or all atoms (atom indexing starting from 1) dd: list list of list containing distances of ref atom with its neighbors nn_num: list list of integers for number of nearest neighbors

..note::

d(1,1..n1) = array of n1 values
d(2,1..n2) = array of  n2 values
....
d(n,1..n_n) = array of n_n values

d is array of distances of ith atom from its n_i neighbors. May be 
you can cast this array in following implementation

neighbor2(xyzpt, atomIndex=None, cutoff=None)

find neigbours of all or selected atoms in xyzpt array.

Parameters:

xyzpt: array of rank 2 name of the xyzfile atomlist: list (optional) list of atm indices whose nearest neighbors are to be found (numbering start from 1). Default is all atoms from xyz file cutoff: float (optional) cutoff distance within which atoms are considered to be bonded or tagged as nearest neighbors. Default value is 2 unit in atomic coordinate units

Return:

nn_id: list list of list containing nearest neighbors of each atom present in atomIndex or all atoms (atom indexing starting from 1) dd: list list of list containing distances of ref atom with its neighbors nn_num: list list of integers for number of nearest neighbors

..note::

d(1,1..n1) = array of n1 values
d(2,1..n2) = array of  n2 values
....
d(n,1..n_n) = array of n_n values

d is array of distances of ith atom from its n_i neighbors. May be 
you can cast this array in following implementation