code: def test_atomic_conv_variable():
      """A simple test that initializes and fits an AtomicConvModel on variable input size."""
      frag1_num_atoms = 1000
      frag2_num_atoms = 1200
      complex_num_atoms = frag1_num_atoms + frag2_num_atoms
      batch_size = 1
      atomic_convnet = atomic_conv.AtomicConvModel(
          n_tasks=1,
          batch_size=batch_size,
          layer_sizes=[
              10,
          ],
          frag1_num_atoms=frag1_num_atoms,
          frag2_num_atoms=frag2_num_atoms,
          complex_num_atoms=complex_num_atoms,
      )
  
      # Creates a set of dummy features that contain the coordinate and
      # neighbor-list features required by the AtomicConvModel.
      features = []
      frag1_coords = np.random.rand(frag1_num_atoms, 3)
      frag1_nbr_list = {i: [] for i in range(frag1_num_atoms)}
      frag1_z = np.random.randint(10, size=(frag1_num_atoms))
      frag2_coords = np.random.rand(frag2_num_atoms, 3)
      frag2_nbr_list = {i: [] for i in range(frag2_num_atoms)}
      frag2_z = np.random.randint(10, size=(frag2_num_atoms))
      system_coords = np.random.rand(complex_num_atoms, 3)
      system_nbr_list = {i: [] for i in range(complex_num_atoms)}
      system_z = np.random.randint(10, size=(complex_num_atoms))
  
      features.append(
          (
              frag1_coords,
              frag1_nbr_list,
              frag1_z,
              frag2_coords,
              frag2_nbr_list,
              frag2_z,
              system_coords,
              system_nbr_list,
              system_z,
          )
      )
      features = np.asarray(features, dtype=object)
      labels = np.zeros(batch_size)
      train = NumpyDataset(features, labels)
      atomic_convnet.fit(train, nb_epoch=1)
      preds = atomic_convnet.predict(train)
      assert preds.shape == (1, 1, 1)
      assert np.count_nonzero(preds) > 0
  
file_path: deepchem/deepchem/models/tests/test_atomic_conv.py
imports: import os
  import pytest
  from flaky import flaky
  import numpy
  from deepchem.data import NumpyDataset
  from deepchem.feat import AtomicConvFeaturizer
label_desc: Use image node_id 3 for calling a global function with example usage: test_atomic_conv_variable() without return types