API Reference

Functions

macromol_voxelize.image_from_atoms(atoms, ...)

Create an voxelized representation of the given atoms.

macromol_voxelize.image_from_all_atoms(...)

Create an voxelized representation of the given atoms.

macromol_voxelize.discard_atoms_outside_image(...)

Return only those atoms that will be present in the image.

macromol_voxelize.set_atom_radius_A(atoms, ...)

Assign all atoms the same radius.

macromol_voxelize.set_atom_channels_by_element(...)

Assign atoms to channels based on their element types.

macromol_voxelize.add_atom_channel_by_expr(...)

Add every atom for which the expression is true to the given channel.

macromol_voxelize.get_voxel_center_coords(...)

Calculate the center coordinates of the given voxels.

macromol_voxelize.find_voxels_containing_coords(...)

Calculate the voxel indices that contain the given coordinates.

macromol_voxelize.find_occupied_voxels(...)

Return a multi-dimensional slice containing only those voxels that could be occupied by an atom.

macromol_voxelize.write_npz(path, img, grid)

Write the given image to an *.npz file.

Data structures

macromol_voxelize.Image

ndarray(shape, dtype=float, buffer=None, offset=0,

macromol_voxelize.ImageParams(channels, ...)

A collection of parameters that apply to the image as a whole, as opposed to individual atoms.

macromol_voxelize.Grid

The spatial dimensions of an image.

macromol_voxelize.FillAlgorithm

The algorithm used to fill in each voxel of the image.

macromol_voxelize.AggAlgorithm

The algorithm used to aggregate multiple fill values for a single voxel.

Exceptions

macromol_voxelize.ValidationError

Raised when errors in the input data are detected.