code: def convert_atom_to_voxel(
      coordinates: np.ndarray,
      atom_index: int,
      box_width: float,
      voxel_width: float,
  ) -> np.ndarray:
      """Converts atom coordinates to an i,j,k grid index.
  
      This function offsets molecular atom coordinates by
      (box_width/2, box_width/2, box_width/2) and then divides by
      voxel_width to compute the voxel indices.
  
      Parameters
      -----------
      coordinates: np.ndarray
          Array with coordinates of all atoms in the molecule, shape (N, 3).
      atom_index: int
          Index of an atom in the molecule.
      box_width: float
          Size of the box in Angstroms.
      voxel_width: float
          Size of a voxel in Angstroms
  
      Returns
      -------
      indices: np.ndarray
          A 1D numpy array of length 3 with `[i, j, k]`, the voxel coordinates
          of specified atom.
      """
  
      indices = np.floor(
          (coordinates[atom_index] + box_width / 2.0) / voxel_width
      ).astype(int)
  
      return indices
  
file_path: deepchem/deepchem/utils/voxel_utils.py
imports: import logging
  from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import numpy
  from deepchem.utils.noncovalent_utils import compute_pi_stack
label_desc: Use image node_id 1 for calling a global function with example usage: convert_atom_to_voxel(coordinates, atom_index, box_width, voxel_width) and returns: indices