matscipy.calculators.mcfm.neighbour_list_mcfm package

Modules

matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_base

matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_mcfm

matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_base module

class matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_base.NeighbourListBase

Bases: object

Interface for the neighbour list. mcfm module can use any neighbour list object as long as it provides the implementation of the two routines below.

update(atoms)

Make sure the list is up to date. If clled for the first time, build the list

Parameters:

atoms (ase.Atoms) – atoms to initialize the list from

Returns:

True of the update was sucesfull

Return type:

bool

get_neighbours(a)

Return neighbors of atom number a.

A list of indices to neighboring atoms is returned.

Parameters:

a (int) – atomic index

Returns:

array of neighbouring indices

Return type:

np.array

matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_mcfm module

class matscipy.calculators.mcfm.neighbour_list_mcfm.neighbour_list_mcfm.NeighbourListMCFM(atoms, cutoffs, skin=0.3, hysteretic_break_factor=1)

Bases: NeighbourListBase

Neighbor list object. Wrapper aroud matscipy.neighbour_list

atoms: ase.Atoms

Atomic configuration.

cutoffs: float or dict

Cutoff for neighbour search. If single float is given, a global cutoff is used for all elements. A dictionary specifies cutoff for element pairs. Specification accepts element numbers of symbols. Example: {(1, 6): 1.1, (1, 1): 1.0, (‘C’, ‘C’): 1.85}

skin: float

If no atom has moved more than the skin-distance since the last call to the update() method, then the neighbor list can be reused. This will save some expensive rebuilds of the list, but extra neighbors outside the cutoff will be returned.

hysteretic_break_factor: float

If atoms are connected, the link will break only of they move apart further than cutoff * hysteretic_break_factor

__init__(atoms, cutoffs, skin=0.3, hysteretic_break_factor=1)
update(atoms)

Make sure the list is up to date. If clled for the first time, build the list

Parameters:

atoms (ase.Atoms) – atoms to initialize the list from

Returns:

True of the update was sucesfull

Return type:

bool

do_update(atoms)

Build the neighbour list based on pairwise distances.

Parameters:

atoms (ase.Atoms) – atoms to initialize the list from

Raises:

ValueError – Must specify cutoff radii for all atoms

get_neighbours(a)

Return neighbors of atom number a.

A list of indices to neighboring atoms is returned.

Parameters:

a (int) – atomic index

Returns:

array of neighbouring indices

Return type:

np.array

Raises:

RuntimeError – Must update the list at least once!