exatomic.algorithms.orbital_util module

Molecular Orbital Utilities

Molecular orbitals are constructed symbolically then evaluated on a numerical grid. These are their stories.

exatomic.algorithms.orbital_util.compare_fields(uni0, uni1, rtol=5e-05, atol=1e-12, signed=True, verbose=True)[source]

Compare field values of differenct universes. It is expected that fields are in the same order.

Parameters:
  • uni0 (exatomic.core.universe.Universe) – first universe

  • uni1 (exatomic.core.universe.Universe) – second universe

  • rtol (float) – relative tolerance passed to numpy.isclose

  • atol (float) – absolute tolerance passed to numpy.isclose

  • signed (bool) – opposite signs are counted as different (default True)

  • verbose (bool) – print how close the fields are to each other numerically (default True)

Returns:

fracs (list) – list of fractions measuring closeness of fields

exatomic.algorithms.orbital_util.numerical_grid_from_field_params(fps)[source]

Construct numerical grid arrays from field parameters.

Parameters:

fps (pd.Series) – See exatomic.algorithms.orbital_util.make_fps()

Returns:

grid (tup) – (xs, ys, zs) 1D-arrays

exatomic.algorithms.orbital_util.make_fps(rmin=None, rmax=None, nr=None, nrfps=1, xmin=None, xmax=None, nx=None, frame=0, ymin=None, ymax=None, ny=None, field_type=0, zmin=None, zmax=None, nz=None, label=0, ox=None, fx=None, dxi=None, dxj=None, dxk=None, oy=None, fy=None, dyi=None, dyj=None, dyk=None, oz=None, fz=None, dzi=None, dzj=None, dzk=None, fps=None, dv=None)[source]

Generate the necessary field parameters of a numerical grid field as an exatomic.field.AtomicField.

Parameters:
  • nrfps (int) – number of field parameters with same dimensions

  • rmin (float) – minimum value in an arbitrary cartesian direction

  • rmax (float) – maximum value in an arbitrary cartesian direction

  • nr (int) – number of grid points between rmin and rmax

  • xmin (float) – minimum in x direction (optional)

  • xmax (float) – maximum in x direction (optional)

  • ymin (float) – minimum in y direction (optional)

  • ymax (float) – maximum in y direction (optional)

  • zmin (float) – minimum in z direction (optional)

  • zmax (float) – maximum in z direction (optional)

  • nx (int) – steps in x direction (optional)

  • ny (int) – steps in y direction (optional)

  • nz (int) – steps in z direction (optional)

  • ox (float) – origin in x direction (optional)

  • oy (float) – origin in y direction (optional)

  • oz (float) – origin in z direction (optional)

  • dxi (float) – x-component of x-vector specifying a voxel

  • dxj (float) – y-component of x-vector specifying a voxel

  • dxk (float) – z-component of x-vector specifying a voxel

  • dyi (float) – x-component of y-vector specifying a voxel

  • dyj (float) – y-component of y-vector specifying a voxel

  • dyk (float) – z-component of y-vector specifying a voxel

  • dzi (float) – x-component of z-vector specifying a voxel

  • dzj (float) – y-component of z-vector specifying a voxel

  • dzk (float) – z-component of z-vector specifying a voxel

  • label (str) – an identifier passed to the widget (optional)

  • field_type (str) – alternative identifier (optional)

Returns:

fps (pd.Series) – field parameters