eon.atoms#

The atoms module.

Module Contents#

Classes#

Atoms

The Atoms class.

Functions#

pbc

Applies periodic boundary conditions. Parameters: r: the vector the boundary conditions are applied to box: the box that defines the boundary conditions ibox: the inverse of the box. This will be calcluated if not provided.

per_atom_norm

Returns a length N numpy array containing per atom distance v: an Nx3 numpy array box: box matrix that defines the boundary conditions ibox: the inverse of the box. will be calculated if not provided

per_atom_norm_gen

Returns a generator which yields the distance between pairs of atoms v: an Nx3 numpy array box: box matrix that defines the boundary conditions ibox: the inverse of the box. will be calculated if not provided

get_process_atoms

Given the reactant and product configurations of a process, return the atoms that move significantly and their neighbors along the trajectory.

identical

Determines whether two structures are identical if atoms of the same element are considered indistinguishable. atoms1: first atoms object for comparison atoms2: second atoms object for comparison epsilon_r: distance (in angstroms) that two atoms must be seperated by in order to be considered different

brute_neighbor_list

sweep_and_prune

Returns a list of nearest neighbors within cutoff for each atom. Parameters: p_in: Atoms object cutoff: the radius within which two atoms are considered to intersect. strict: perform an actual distance check if True bc: include neighbors across pbc’s

neighbor_list

neighbor_list_vectors

Points from center to neighbor

coordination_numbers

Returns a list of coordination numbers for each atom in p

least_coordinated

Returns a list of atom indices in p with the lowest coordination numbers for unfrozen atoms

match

point_energy_match

points_energies_match

rot_match

rotm

Gives the matrix representing a rotation of theta radians about axis

cna

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

not_HCP_or_FCC

Returns a list of indices for the atoms with cna = 0

cnat

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

cnar

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

not_TCP

Returns a list of indices for the atoms with cna = 0

not_TCP_or_BCC

Returns a list of indices for the atoms with cna = 0

get_mappings

A recursive depth-first search for a complete set of mappings from atoms in configuration a to atoms in configuration b. Do not use the mappings argument, this is only used internally for recursion.

get_rotation_matrix

rotate

internal_motion

Takes two atoms objects and returns the motion from a to b that is entirely internal - no rotation or translation, in the form of a new atoms object.

Data#

API#

eon.atoms.logger#

‘getLogger(…)’

class eon.atoms.Atoms(n_atoms)[source]#

The Atoms class.

Initialization

copy()[source]#
free_r()[source]#
append(r, free, name, mass)[source]#
eon.atoms.pbc(r, box, ibox=None)[source]#

Applies periodic boundary conditions. Parameters: r: the vector the boundary conditions are applied to box: the box that defines the boundary conditions ibox: the inverse of the box. This will be calcluated if not provided.

eon.atoms.per_atom_norm(v, box, ibox=None)[source]#

Returns a length N numpy array containing per atom distance v: an Nx3 numpy array box: box matrix that defines the boundary conditions ibox: the inverse of the box. will be calculated if not provided

eon.atoms.per_atom_norm_gen(v, box, ibox=None)[source]#

Returns a generator which yields the distance between pairs of atoms v: an Nx3 numpy array box: box matrix that defines the boundary conditions ibox: the inverse of the box. will be calculated if not provided

eon.atoms.get_process_atoms(r, p, epsilon_r=0.2, nshells=1)[source]#

Given the reactant and product configurations of a process, return the atoms that move significantly and their neighbors along the trajectory.

eon.atoms.identical(atoms1, atoms2)[source]#

Determines whether two structures are identical if atoms of the same element are considered indistinguishable. atoms1: first atoms object for comparison atoms2: second atoms object for comparison epsilon_r: distance (in angstroms) that two atoms must be seperated by in order to be considered different

eon.atoms.brute_neighbor_list(p, cutoff)[source]#
eon.atoms.sweep_and_prune(p_in, cutoff, strict=True, bc=True)[source]#

Returns a list of nearest neighbors within cutoff for each atom. Parameters: p_in: Atoms object cutoff: the radius within which two atoms are considered to intersect. strict: perform an actual distance check if True bc: include neighbors across pbc’s

eon.atoms.neighbor_list(p, cutoff, brute=False)[source]#
eon.atoms.neighbor_list_vectors(p, cutoff, brute=False)[source]#

Points from center to neighbor

eon.atoms.coordination_numbers(p, cutoff, brute=False)[source]#

Returns a list of coordination numbers for each atom in p

eon.atoms.least_coordinated(p, cutoff, brute=False)[source]#

Returns a list of atom indices in p with the lowest coordination numbers for unfrozen atoms

eon.atoms.match(a, b, eps_r, neighbor_cutoff, indistinguishable)[source]#
eon.atoms.point_energy_match(file_a, energy_a, file_b, energy_b)[source]#
eon.atoms.points_energies_match(file_a, energy_a, files_b, energies_b)[source]#
eon.atoms.rot_match(a, b)[source]#
eon.atoms.rotm(axis, theta)[source]#

Gives the matrix representing a rotation of theta radians about axis

eon.atoms.cna(p, cutoff, brute=False)[source]#

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

eon.atoms.not_HCP_or_FCC(p, cutoff, brute=False)[source]#

Returns a list of indices for the atoms with cna = 0

eon.atoms.cnat(p, cutoff, brute=False)[source]#

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

eon.atoms.cnar(p, cutoff, brute=False)[source]#

Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap)

eon.atoms.not_TCP(p, cutoff, brute=False)[source]#

Returns a list of indices for the atoms with cna = 0

eon.atoms.not_TCP_or_BCC(p, cutoff, brute=False)[source]#

Returns a list of indices for the atoms with cna = 0

eon.atoms.get_mappings(a, b, eps_r, neighbor_cutoff, mappings=None)[source]#

A recursive depth-first search for a complete set of mappings from atoms in configuration a to atoms in configuration b. Do not use the mappings argument, this is only used internally for recursion.

Returns None if no mapping was found, or a dictionary mapping atom indices a to atom indices b.

Note: If a and b are mirror images, this function will still return a mapping from a to b, even though it may not be possible to align them through translation and rotation.

eon.atoms.get_rotation_matrix(axis, theta)[source]#
eon.atoms.rotate(r, axis, center, angle)[source]#
eon.atoms.internal_motion(a, b)[source]#

Takes two atoms objects and returns the motion from a to b that is entirely internal - no rotation or translation, in the form of a new atoms object.

eon.atoms.elements#

None

eon.atoms.numElements#

119