eon.atoms¶
Atoms / structure helpers for the eOn Python server.
Storage and I/O
:class:eon.structure.Structure (alias :class:Atoms) is the in-memory
working type. On disk, structures are readcon.ConFrame values
(see :func:eon.structure.Structure.from_conframe).
Geometry kernels
PBC, neighbor lists (vesin), and process-atom selection live under
:mod:eon.geometry. This module re-exports them for compatibility and
keeps structure-matching / CNA helpers plus a radius/color overlay.
Module Contents¶
Functions¶
Z for a symbol. Integers pass through. Symbol lookup is readcon. |
|
Chemical symbol for Z. Lookup is readcon; Z=0 is the unknown placeholder. |
|
True if two structures match when same-element atoms are interchangeable. |
|
Gives the matrix representing a rotation of theta radians about axis |
|
Common-neighbor labels for every atom in p. |
|
Indices of atoms that are neither fcc nor hcp (CNA other). |
|
Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap) |
|
Returns a list of cna numbers for all atoms in p Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap) |
|
Returns a list of indices for the atoms with cna = 0 |
|
Returns a list of indices for the atoms with cna = 0 |
|
Depth-first search for a complete atom mapping from a onto b. |
|
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(…)’
- eon.atoms.atomic_number(symbol_or_z)[source]¶
Z for a symbol. Integers pass through. Symbol lookup is readcon.
- eon.atoms.symbol_for_z(z)[source]¶
Chemical symbol for Z. Lookup is readcon; Z=0 is the unknown placeholder.
- eon.atoms.identical(atoms1, atoms2, epsilon_r)[source]¶
True if two structures match when same-element atoms are interchangeable.
Parameters
atoms1, atoms2 : Structure Configurations to compare (same box within 1e-4). epsilon_r : float Max allowed MIC displacement (Å) for a pair to count as the same site.
- eon.atoms.match(a, b, eps_r, neighbor_cutoff, indistinguishable, check_rotation=False, use_identical=False)[source]¶
- eon.atoms.point_energy_match(file_a, energy_a, file_b, energy_b, eps_e, eps_r, neighbor_cutoff, check_rotation=False, use_identical=False)[source]¶
- eon.atoms.points_energies_match(file_a, energy_a, files_b, energies_b, eps_e, eps_r, neighbor_cutoff, check_rotation=False, use_identical=False)[source]¶
- eon.atoms.rotm(axis, theta)[source]¶
Gives the matrix representing a rotation of theta radians about axis
- eon.atoms.CNA_FCC¶
0
- eon.atoms.CNA_HCP¶
1
- eon.atoms.CNA_OTHER¶
2
- eon.atoms.cna(p, cutoff)[source]¶
Common-neighbor labels for every atom in p.
Labels match the C++ client (
EpiCenters::cna): 0 fcc (421), 1 hcp (422), 2 other. Inspired by the CNA code provided by Asap (wiki.fysik.dtu.dk/asap).
- eon.atoms.not_HCP_or_FCC(p, cutoff)[source]¶
Indices of atoms that are neither fcc nor hcp (CNA other).
- eon.atoms.cnat(p, cutoff)[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)[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.get_mappings(a, b, eps_r, neighbor_cutoff, mappings=None)[source]¶
Depth-first search for a complete atom mapping from a onto b.
Returns None if no mapping was found, or a dict mapping a indices to b indices. Mirror images still map; this does not test proper rotation.
- 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.numElements¶
‘len(…)’
- eon.atoms.elements¶
‘_ElementStyle(…)’