pele.utils.neighbor_list#

Module source

classes to build and maintain neighborlists

class pele.utils.neighbor_list.NeighborListSubsetBuild[source]

Source

class NeighborListSubsetBuild(basepot):

The same as NeighborListSubset except only do the building.

This class will build the neighbor lists, but can’t check whether they need to be rebuilt. This is meant to be used in situations where multiple neighbor lists are being maintained and we don’t want to do repetative checks for whether the lists should be rebuilt

It has the added benefit that no copy of coords is saved, so it takes up less memory.

Parameters:
natoms

number of atoms

rcut

the cutoff distance for the potential

rskin

the skin distance. atoms are listed as neighbors if they are closer then rlist = rcut + rskin. A larger rskin will have more interaction pairs, but will need to be updated less frequently

Alist

The list of atoms that are interacting

Blistthe list of atoms that are interacting with Alist

if Blist is None or Blist is Alist then the atoms in Alist will be assumed to be interacting with each other. Duplicate interactions will be avoided.

boxl

if not None, then the system is in a periodic box of size boxl

class pele.utils.neighbor_list.NeighborListPotentialBuild[source]

Source

class NeighborListPotentialBuild(basepot):

a potential wrapper for a neighbor list, but only rebuild when told to

Parameters:
neighborList

the neighbor list object

pot

the potential object

NeighborListPotentialBuild.buildList()[source]

Source

def buildList(self, coords):

instruct the neighbor list object to rebuild it’s list

class pele.utils.neighbor_list.NeighborListPotentialMulti[source]

Source

class NeighborListPotentialMulti(basepot):

A wrapper for multiple NeighborListPotentialBuild

This will wrap multiple instances of NeighborListPotentialBuild. This class will the check the coords and control when the neighbor lists are rebuilt.

Parameters:
potentials

a list of neighbor list potential objects. Each potential must have attribute

potential.buildList(coords)

natoms

number of atoms

rcut

the cutoff distance for the potential

rskin

the skin distance. atoms are listed as neighbors if they are closer then rlist = rcut + rskin. A larger rskin will have more interaction pairs, but will need to be updated less frequently

boxl

if not None, then the system is in a periodic box of size boxl

class pele.utils.neighbor_list.MultiComponentSystem[source]

Source

class MultiComponentSystem(basepot):

a potential wrapper for multiple potentials

Parameters:
potentials

a list of potential objects