class_docstr: Create atomic convolution neural network potential for binding energy.
  
  Example:
  
  >>> B = 10 # batch_size
  >>> N_1 = 6 # frag1_n_atoms
  >>> N_2 = 6 # frag2_n_atoms
  >>> N = 12 # complex_n_atoms
  >>> M = 6 # n_neighbors
  >>> n_tasks = 1
  >>> C_1 = np.zeros((N_1, 3))
  >>> C_2 = np.zeros((N_2, 3))
  >>> C = np.zeros((N, 3))
  >>> NL_1 = {}
  >>> for i in range(n_atoms): NL_1[i] = [0 for m in range(M)]
  >>> NL_2 = {}
  >>> for i in range(n_atoms): NL_2[i] = [0 for m in range(M)]
  >>> NL = {}
  >>> for i in range(n_atoms): NL[i] = [0 for m in range(M)]
  >>> Z_1 = np.zeros((N))
  >>> Z_2 = np.zeros((N))
  >>> Z = np.zeros((N))
  >>> X = [(C_1, NL_1, Z_1, C_2, NL_2, Z_2, C, NL, Z) for i in range(B)]
  >>> y = np.zeros(B, n_tasks)
  >>> w = np.zeros(B, n_tasks)
  >>> ids = np.zeros(B,)
  >>> dataset = dc.data.NumpyDataset(X, y, w, ids)
  >>> rp = [[12.0, 0.0, 0.04]]
  >>> at = None
  >>> model = TensorflowFragmentRegressor(n_tasks, rp, at, N_1, N_2, N, M)
  >>> model.fit(dataset)
class_docstr_tok: ["Create","atomic","convolution","neural","network","potential","for","binding","energy",".","Example",":",">",">",">","B","=","10","#","batch_size",">",">",">","N_1","=","6","#","frag1_n_atoms",">",">",">","N_2","=","6","#","frag2_n_atoms",">",">",">","N","=","12","#","complex_n_atoms",">",">",">","M","=","6","#","n_neighbors",">",">",">","n_tasks","=","1",">",">",">","C_1","=","np.zeros","(","(","N_1",",","3",")",")",">",">",">","C_2","=","np.zeros","(","(","N_2",",","3",")",")",">",">",">","C","=","np.zeros","(","(","N",",","3",")",")",">",">",">","NL_1","=","{","}",">",">",">","for","i","in","range","(","n_atoms",")",":","NL_1","[","i","]","=","[","0","for","m","in","range","(","M",")","]",">",">",">","NL_2","=","{","}",">",">",">","for","i","in","range","(","n_atoms",")",":","NL_2","[","i","]","=","[","0","for","m","in","range","(","M",")","]",">",">",">","NL","=","{","}",">",">",">","for","i","in","range","(","n_atoms",")",":","NL","[","i","]","=","[","0","for","m","in","range","(","M",")","]",">",">",">","Z_1","=","np.zeros","(","(","N",")",")",">",">",">","Z_2","=","np.zeros","(","(","N",")",")",">",">",">","Z","=","np.zeros","(","(","N",")",")",">",">",">","X","=","[","(","C_1",",","NL_1",",","Z_1",",","C_2",",","NL_2",",","Z_2",",","C",",","NL",",","Z",")","for","i","in","range","(","B",")","]",">",">",">","y","=","np.zeros","(","B",",","n_tasks",")",">",">",">","w","=","np.zeros","(","B",",","n_tasks",")",">",">",">","ids","=","np.zeros","(","B",",",")",">",">",">","dataset","=","dc.data.NumpyDataset","(","X",",","y",",","w",",","ids",")",">",">",">","rp","=","[","[","12.0",",","0.0",",","0.04","]","]",">",">",">","at","=","None",">",">",">","model","=","TensorflowFragmentRegressor","(","n_tasks",",","rp",",","at",",","N_1",",","N_2",",","N",",","M",")",">",">",">","model.fit","(","dataset",")"]
docstr: Initialize TensorflowFragmentRegressor.
  
  Parameters
  ----------
  
  n_tasks: int
    Number of tasks.
  radial_params: list
    Of length l, where l is number of radial filters learned.
  atom_types: list
    Of length a, where a is number of atom_types for filtering.
  frag1_num_atoms: int
    Maximum number of atoms in fragment 1.
  frag2_num_atoms: int
    Maximum number of atoms in fragment 2.
  complex_num_atoms: int
    Maximum number of atoms in complex.
  max_num_neighbors: int
    Maximum number of neighbors per atom.
  logdir: str
    Path to model save directory.
  layer_sizes: list
    List of layer sizes.
  weight_init_stddevs: list
    List of standard deviations for weights (sampled from zero-mean
    gaussians). One for each layer.
  bias_init_consts: list
    List of bias initializations. One for each layer.
  penalty: float
    Amount of penalty (l2 or l1 applied)
  penalty_type: str
    Either "l2" or "l1"
  dropouts: list
    List of dropout amounts. One for each layer.
  learning_rate: float
    Learning rate for model.
  momentum: float
    Momentum. Only applied if optimizer=="momentum"
  optimizer: str
    Type of optimizer applied.
  batch_size: int
    Size of minibatches for training.
  conv_layers: int
    Number of atomic convolution layers (experimental feature).
  boxsize: float or None
    Simulation box length [Angstrom]. If None, no periodic boundary conditions.
  verbose: bool, optional (Default True)
    Whether to perform logging.
  seed: int, optional (Default None)
    If not none, is used as random seed for tensorflow.
docstr_tok: ["Initialize","TensorflowFragmentRegressor",".","Parameters","--","--","--","--","--","n_tasks",":","int","Number","of","tasks",".","radial_params",":","list","Of","length","l",",","where","l","is","number","of","radial","filters","learned",".","atom_types",":","list","Of","length","a",",","where","a","is","number","of","atom_types","for","filtering",".","frag1_num_atoms",":","int","Maximum","number","of","atoms","in","fragment","1.","frag2_num_atoms",":","int","Maximum","number","of","atoms","in","fragment","2.","complex_num_atoms",":","int","Maximum","number","of","atoms","in","complex",".","max_num_neighbors",":","int","Maximum","number","of","neighbors","per","atom",".","logdir",":","str","Path","to","model","save","directory",".","layer_sizes",":","list","List","of","layer","sizes",".","weight_init_stddevs",":","list","List","of","standard","deviations","for","weights","(","sampled","from","zero-mean","gaussians",")",".","One","for","each","layer",".","bias_init_consts",":","list","List","of","bias","initializations",".","One","for","each","layer",".","penalty",":","float","Amount","of","penalty","(","l2","or","l1","applied",")","penalty_type",":","str","Either","``","l2","''","or","``","l1","''","dropouts",":","list","List","of","dropout","amounts",".","One","for","each","layer",".","learning_rate",":","float","Learning","rate","for","model",".","momentum",":","float","Momentum",".","Only","applied","if","optimizer==","''","momentum","''","optimizer",":","str","Type","of","optimizer","applied",".","batch_size",":","int","Size","of","minibatches","for","training",".","conv_layers",":","int","Number","of","atomic","convolution","layers","(","experimental","feature",")",".","boxsize",":","float","or","None","Simulation","box","length","[","Angstrom","]",".","If","None",",","no","periodic","boundary","conditions",".","verbose",":","bool",",","optional","(","Default","True",")","Whether","to","perform","logging",".","seed",":","int",",","optional","(","Default","None",")","If","not","none",",","is","used","as","random","seed","for","tensorflow","."]
code: def __init__(
      self,
      n_tasks,
      radial_params,
      atom_types,
      frag1_num_atoms,
      frag2_num_atoms,
      complex_num_atoms,
      max_num_neighbors,
      logdir=None,
      layer_sizes=[100],
      weight_init_stddevs=[0.1],
      bias_init_consts=[1.0],
      penalty=0.0,
      penalty_type="l2",
      dropouts=[0.5],
      learning_rate=0.001,
      momentum=0.8,
      optimizer="adam",
      batch_size=48,
      conv_layers=1,
      boxsize=None,
      verbose=True,
      seed=None,
  ):
      """Initialize TensorflowFragmentRegressor.
  
      Parameters
      ----------
  
      n_tasks: int
        Number of tasks.
      radial_params: list
        Of length l, where l is number of radial filters learned.
      atom_types: list
        Of length a, where a is number of atom_types for filtering.
      frag1_num_atoms: int
        Maximum number of atoms in fragment 1.
      frag2_num_atoms: int
        Maximum number of atoms in fragment 2.
      complex_num_atoms: int
        Maximum number of atoms in complex.
      max_num_neighbors: int
        Maximum number of neighbors per atom.
      logdir: str
        Path to model save directory.
      layer_sizes: list
        List of layer sizes.
      weight_init_stddevs: list
        List of standard deviations for weights (sampled from zero-mean
        gaussians). One for each layer.
      bias_init_consts: list
        List of bias initializations. One for each layer.
      penalty: float
        Amount of penalty (l2 or l1 applied)
      penalty_type: str
        Either "l2" or "l1"
      dropouts: list
        List of dropout amounts. One for each layer.
      learning_rate: float
        Learning rate for model.
      momentum: float
        Momentum. Only applied if optimizer=="momentum"
      optimizer: str
        Type of optimizer applied.
      batch_size: int
        Size of minibatches for training.
      conv_layers: int
        Number of atomic convolution layers (experimental feature).
      boxsize: float or None
        Simulation box length [Angstrom]. If None, no periodic boundary conditions.
      verbose: bool, optional (Default True)
        Whether to perform logging.
      seed: int, optional (Default None)
        If not none, is used as random seed for tensorflow.
  
      """
  
      self.n_tasks = n_tasks
      self.radial_params = radial_params
      self.atom_types = atom_types
      self.frag1_num_atoms = frag1_num_atoms
      self.frag2_num_atoms = frag2_num_atoms
      self.complex_num_atoms = complex_num_atoms
      self.max_num_neighbors = max_num_neighbors
      self.conv_layers = conv_layers
      self.boxsize = boxsize
      TensorflowGraphModel.__init__(
          self,
          n_tasks,
          None,
          logdir,
          layer_sizes=layer_sizes,
          weight_init_stddevs=weight_init_stddevs,
          bias_init_consts=bias_init_consts,
          penalty=penalty,
          penalty_type=penalty_type,
          dropouts=dropouts,
          learning_rate=learning_rate,
          momentum=momentum,
          optimizer=optimizer,
          batch_size=batch_size,
          pad_batches=True,
          verbose=verbose,
          seed=seed,
      )
  
file_path: deepchem/contrib/atomicconv/models/atomicnet.py
imports: from __future__ import print_function
  from __future__ import division
  from __future__ import unicode_literals
  import os
  import time
  import numpy
  import tensorflow
  from deepchem.data import DiskDataset
  from deepchem.nn import model_ops
  from legacy import TensorflowGraph, TensorflowGraphModel, TensorflowMultiTaskRegressor
  from deepchem.utils.save import log
  import atomicnet_ops
label_desc: Use image node_id 1 to create a new TensorflowFragmentRegressor object from inherited base classes: TensorflowMultiTaskRegressor with example: obj = TensorflowFragmentRegressor(n_tasks, radial_params, atom_types, frag1_num_atoms, frag2_num_atoms, complex_num_atoms, max_num_neighbors, logdir, layer_sizes, weight_init_stddevs, bias_init_consts, penalty, penalty_type, dropouts, learning_rate, momentum, optimizer, batch_size, conv_layers, boxsize, verbose, seed)