code: def write_vina_conf(
      protein_filename: str,
      ligand_filename: str,
      centroid: np.ndarray,
      box_dims: np.ndarray,
      conf_filename: str,
      num_modes: int = 9,
      exhaustiveness: Optional[int] = None,
  ) -> None:
      """Writes Vina configuration file to disk.
  
      Autodock Vina accepts a configuration file which provides options
      under which Vina is invoked. This utility function writes a vina
      configuration file which directs Autodock vina to perform docking
      under the provided options.
  
      Parameters
      ----------
      protein_filename: str
          Filename for protein
      ligand_filename: str
          Filename for the ligand
      centroid: np.ndarray
          A numpy array with shape `(3,)` holding centroid of system
      box_dims: np.ndarray
          A numpy array of shape `(3,)` holding the size of the box to dock
      conf_filename: str
          Filename to write Autodock Vina configuration to.
      num_modes: int, optional (default 9)
          The number of binding modes Autodock Vina should find
      exhaustiveness: int, optional
          The exhaustiveness of the search to be performed by Vina
      """
      with open(conf_filename, "w") as f:
          f.write("receptor = %s\n" % protein_filename)
          f.write("ligand = %s\n\n" % ligand_filename)
  
          f.write("center_x = %f\n" % centroid[0])
          f.write("center_y = %f\n" % centroid[1])
          f.write("center_z = %f\n\n" % centroid[2])
  
          f.write("size_x = %f\n" % box_dims[0])
          f.write("size_y = %f\n" % box_dims[1])
          f.write("size_z = %f\n\n" % box_dims[2])
  
          f.write("num_modes = %d\n\n" % num_modes)
          if exhaustiveness is not None:
              f.write("exhaustiveness = %d\n" % exhaustiveness)
  
file_path: deepchem/deepchem/utils/docking_utils.py
imports: from typing import List, Optional, Tuple
  import os
  import numpy
  from deepchem.utils.typing import RDKitMol
  from deepchem.utils.pdbqt_utils import pdbqt_to_pdb
label_desc: Use image node_id 1 for calling a global function with example usage: write_vina_conf(protein_filename, ligand_filename, centroid, box_dims, conf_filename, num_modes, exhaustiveness) without return types