code: def zoom_to_ligand(self):
          
          cmd.center(self.ligname)
          cmd.orient(self.ligname)
          cmd.turn('x', 110)  # If the ligand is aligned with the longest axis, aromatic rings are hidden
          if 'AllBSRes' in cmd.get_names("selections"):
              cmd.zoom('%s or AllBSRes' % self.ligname, 3)
          else:
              if self.object_exists(self.ligname):
                  cmd.zoom(self.ligname, 3)
          cmd.origin(self.ligname)
docs: Zoom in too ligand and its interactions.