Adds hydrogens

        Args:
            num (int): number of hydrogens
507229
def add_hydrogen(self, num):
        
        self.H_count = num
        if num > 0 and self.symbol in ("N", "O"):
            self.H_donor = 1
        else:
            self.H_donor = 0
802780
public function setNum($num)
    {
        $this->num = $num;
        foreach ($this->positions as $position) {
            $position->generated->line = $num;
        }
    }
623803
public void add(int num, int[] indices) {
        for (int i = 0; i < indices.length; ++i)
            indices[i] += num;
    }
925647
def append_num_column(self, text: str, index: int):
        
        width = self.columns[index]["width"]
        return f"{text:>{width}}"
809991
@Override
    public void addAtom(IAtom oAtom, IMonomer oMonomer) {
        super.addAtom(oAtom, oMonomer);
        if (!sequentialListOfMonomers.contains(oMonomer.getMonomerName()))
            sequentialListOfMonomers.add(oMonomer.getMonomerName());
    }
1095548
def add(self, num):
        
        try:
            val = self.value() + num
        except:
            val = num
        self.set(max(0, val))
802940
public static function add($num1, $num2)
    {
        if (!static::is($num1) || !static::is($num2)) {
            throw new \InvalidArgumentException("The \$num1 and \$num2 parameters must be numeric.");
        }

        return ($num1 + $num2);
    }
36140
def H_acceptor_count(mol):
    
    mol.require("Valence")
    return sum(1 for _, a in mol.atoms_iter() if a.H_acceptor)
978209
public static function encodeNum($num)
        {
            $addTab = array(0=>'', 1=>'z', 2=>'Z', 3=>'+');
            $map = '0123456789abcdefghijklmnopqrstuvwxyABCDEFGHIJKLMNOPQRSTUVWXY';
            $mapPos = $num % 60;
            $mapAdd = (int)($num / 60);
            
            return $addTab[$mapAdd].$map[$mapPos];
        }
125928
public function addNumber($n)
    {
        $this->validateNumber($n);
        $this->value[] = $n;
        $this->components ++;
    }
369546
public void addAtom(IPDBAtom oAtom, IMonomer oMonomer) {
        super.addAtom(oAtom, oMonomer);
        if (!sequentialListOfMonomers.contains(oMonomer.getMonomerName()))
            sequentialListOfMonomers.add(oMonomer.getMonomerName());
    }
680398
function makeNumIsoH(code, bonds) {
        var valence;

        if (code === 15) {
            valence = 0;
        } else if (code === 0) {
            valence = -1;
        } else {
            // num_iso_H should never be negative when valence is set
            valence = Math.max(0, code - bonds);
        }

        return [valence, 0, 0, 0];
    }
418144
@Override public void addNumCol(int colIdx, double value) {
    if (Double.isNaN(value) || Double.isInfinite(value)) {
      addInvalidCol(colIdx);
    } else {
      if( colIdx < _nCols ) {
        _nvs[_col = colIdx].addNumDecompose(value);
        if(_ctypes != null && _ctypes[colIdx] == Vec.T_BAD ) _ctypes[colIdx] = Vec.T_NUM;
      }
    }
  }
113551
def num_having_numId(self, numId):
        
        xpath = './w:num[@w:numId="%d"]' % numId
        try:
            return self.xpath(xpath)[0]
        except IndexError:
            raise KeyError('no <w:num> element with numId %d' % numId)
478727
def add(self, *number):
        """"""
        return self._format_result(sum(
            # positional arguments are always strings
            [int(n) for n in number]))
512109
function(num) {
    if(loading) {
      // Avoid sending too many requests to get new cells.
      return;
    }
    var xhrRequest = new XMLHttpRequest();
    var fragment = document.createDocumentFragment();
    var cells = [];
    var images;
    xhrRequest.open('GET', 'json.php?n=' + num, true);
    xhrRequest.onreadystatechange = function() {
      if(xhrRequest.readyState == 4 && xhrRequest.status == 200) {
        images = JSON.parse(xhrRequest.responseText);
        for(var j = 0, k = images.length; j < k; j++) {
          var cell = document.createElement('div');
          cell.className = 'cell pending';
          cell.tagLine = images[j].title;
          cells.push(cell);
          front(cellTemplate, images[j], cell);
          fragment.appendChild(cell);
        }
        cellsContainer.appendChild(fragment);
        loading = false;
        adjustCells(cells);
      }
    };
    loading = true;
    xhrRequest.send(null);
  }
1043537
@Override
    public void addAtom(IPDBAtom oAtom, IMonomer oMonomer, IStrand oStrand) {
        super.addAtom(oAtom, oMonomer, oStrand);
        if (!sequentialListOfMonomers.contains(oMonomer.getMonomerName()))
            sequentialListOfMonomers.add(oMonomer.getMonomerName());
    }