self._template:
      GenerateDepictionMatching2DStructure(mol,self._template,acceptFailure=True)
    
    return mol

class ChemImage(ChemBase):
  def __init__(self,*args,**kwargs):
      super().__init__(self,*args,**kwargs)

  def __call__(self,smi,**kwargs):
    return self.smi2img(smi,**kwargs)
  
  def smi2img(self,smi,**kwargs):
      mol = self.smi2mol(smi,**kwargs)
      return MolToImage(mol,kekulize=self._kekulize,bondLineWidth=self._bondWidth,
                        wedgebonds=self._wedgeBonds,