horton_part.scripts.generate_cube module

class PartCubeProg(width=100)

Bases: PartProg

Part-Cube Program

__init__(width=100)
build_parser(*args, **kwargs)

Parse command-line arguments.

check_settings(settings)
print_charges(numbers, charges)
print_coordinates(numbers, coordinates)
print_header(header)
print_line()
print_settings(settings, fn_in, fn_out, fn_log, exclude_keys=None)

Print setting for this program.

run(args=None)

Main entry.

Return type:

int

setup_logger(settings, fn_log, **kwargs)
single_launch(settings, fn_in, fn_out, fn_log, **kwargs)

Man entry for a single job.

main(args=None)

Main entry.

Return type:

int

prepare_input_cube(iodata, chunk_size, gradient, orbitals, logger, grid=None)

Prepare input for denspart with HORTON3 modules.

Parameters:
  • iodata – An instance with IOData containing the necessary data to compute the electron density on the grid.

  • nrad – Number of radial grid points.

  • nang – Number of angular grid points.

  • chunk_size – Number of points on which the density is evaluated in one pass.

  • gradient – When True, also the gradient of the density is computed.

  • orbitals – When True, also the occupied and virtual orbitals are computed.

  • store_atgrids – When True, the atomic grids are also stored.

Returns:

  • grid – A molecular integration grid.

  • data – Qauntities evaluated on the grid, includeing the density.

to_cube(fname, atnums, atcorenums, atcoords, grid, data)

Write the data evaluated on grid points into a cube file.

Parameters:
  • fname (str) – Cube file name with *.cube extension.

  • data (np.ndarray, shape=(npoints,)) – An array containing the evaluated scalar property on the grid points.