exatomic.core.two module

Atomic Two Body

This module provides functions for computing two body properties. A body can be, for example, an atom (such that two body properties correspond to inter-atomic distances - bonds), or a molecule (such that two body properties correspond to distances between molecule centers of mass). The following table provides a guide for the types of data found in two body tables provided by this module (specifically for atom two body properties).

Column

Type

Description

atom0

integer

foreign key to Atom

atom1

integer

foreign key to Atom

distance

float

distance between atom0 and atom1

bond

boolean

True if bond

frame

category

non-unique integer (req.)

symbols

category

concatenated atomic symbols

class exatomic.core.two.AtomTwo(*args, **kwargs)[source]

Bases: DataFrame

Interatomic distances.

property bonded
class exatomic.core.two.MoleculeTwo(*args, **kwargs)[source]

Bases: DataFrame

exatomic.core.two.compute_atom_two(universe, dmax=8.0, vector=False, bonds=True, **kwargs)[source]

Compute interatomic distances and determine bonds.

atom_two = compute_atom_two(uni, dmax=4.0)    # Max distance of interest as 4 bohr
atom_two = compute_atom_two(uni, vector=True) # Return distance vector components as well as distance
atom_two = compute_atom_two(uni, bonds=False) # Don't compute bonds
# Compute bonds with custom covalent radii (atomic units)
atom_two = compute_atom_two(unit, H=10.0, He=20.0, Li=30.0, bond_extra=100.0)
Parameters:
  • universe (Universe) – Universe object with atom table

  • dmax (float) – Maximum distance of interest

  • vector (bool) – Compute distance vector (needed for angles)

  • bonds (bool) – Compute bonds (default True)

  • kwargs – Additional keyword arguments for _compute_bonds()

exatomic.core.two.compute_pdist(universe, dmax=8.0)[source]

Compute interatomic distances for atoms in free boundary conditions.

Does return distance vector.

exatomic.core.two.compute_pdist_nv(universe, dmax=8.0)[source]

Compute interatomic distances for atoms in free boundary conditions.

Does not return distance vector.

exatomic.core.two.compute_pdist_ortho(universe, dmax=8.0)[source]

Compute interatomic distances between atoms in an orthorhombic periodic cell.

Parameters:
  • universe (Universe) – A universe

  • bonds (bool) – Compute bonds as well as distances

  • bond_extra (float) – Extra factor to use when determining bonds

  • dmax (float) – Maximum distance of interest

  • rtol (float) – Relative tolerance (float equivalence)

  • atol (float) – Absolute tolerance (float equivalence)

  • radii (kwargs) – Custom (covalent) radii to use when determining bonds

exatomic.core.two.compute_pdist_ortho_nv(universe, dmax=8.0)[source]

Compute interatomic distances between atoms in an orthorhombic periodic cell.

Parameters:
  • universe (Universe) – A universe

  • bonds (bool) – Compute bonds as well as distances

  • bond_extra (float) – Extra factor to use when determining bonds

  • dmax (float) – Maximum distance of interest

  • rtol (float) – Relative tolerance (float equivalence)

  • atol (float) – Absolute tolerance (float equivalence)

  • radii (kwargs) – Custom (covalent) radii to use when determining bonds

exatomic.core.two.compute_atom_two_out_of_core(hdfname, uni, a, **kwargs)[source]

Perform an out of core periodic two body calculation for a simple cubic unit cell with dimension a.

All data will be saved to and HDF5 file with the given filename. Key structure is per frame, i.e. frame_fdx/atom_two.

Parameters:
  • hdfname (str) – HDF file name

  • uni (Universe) – Universe

  • a (float) – Simple cubic unit cell dimension

  • kwargs – Keyword arguments for bond computation (i.e. covalent radii)

See also

_compute_bonds()

exatomic.core.two.compute_molecule_two(universe)[source]