remove explicit hydrogens if possible

        :return: number of removed hydrogens
178534
def implicify_hydrogens(self):
        
        total = 0
        for ml in (self.__reagents, self.__reactants, self.__products):
            for m in ml:
                if hasattr(m, 'implicify_hydrogens'):
                    total += m.implicify_hydrogens()
        if total:
            self.flush_cache()
        return total
157706
def _strip_stray_atoms(self):
        
        components = self.bond_graph.connected_components()
        major_component = max(components, key=len)
        for atom in list(self.particles()):
            if atom not in major_component:
                self.remove(atom)
346672
def removeLT(self, item):
        """"""
        count = self.getCountLT(item)
        self._list = self._list[count:]
        return count
82041
def remove(h, i):
    """"""
    n = h.size() - 1
    if n != i:
        h.swap(i, n)
        down(h, i, n)
        up(h, i)

    return h.pop()
762549
@Override
	public void clearAtoms() {
		atoms.clear();
		setPDBFlag(false);
		if ( atomNameLookup != null)
			atomNameLookup.clear();
	}
98983
def removeAll(self):
        
        rv = self._removeAll(self._reads, self._writes)
        return rv
848629
def remove_reaction(self, reaction):
        """"""

        if reaction not in self._reaction_set:
            return

        self._reaction_set.remove(reaction)
        self._limits_lower.pop(reaction, None)
        self._limits_upper.pop(reaction, None)

        # Remove compound from compound_set if it is not referenced
        # by any other reactions in the model.
        for compound, value in self._database.get_reaction_values(reaction):
            reactions = frozenset(
                self._database.get_compound_reactions(compound))
            if all(other_reaction not in self._reaction_set
                   for other_reaction in reactions):
                self._compound_set.remove(compound)
912214
def removed(self):
        
        removed = 0
        for line in self.diff.replace('\r', '').split("\n"):
            if line.startswith('-') and not line.startswith('---'):
                removed += 1
        return removed
812047
def remove_parents(bases):
    
    if len(bases) < 2:
        return bases
    remove_i = []
    bases = list(bases)
    for i, base in enumerate(bases):
        for j, other in enumerate(bases):
            # print(i, j, base, other, remove_i)
            if j != i and (issubclass(other, base) or base == other):
                remove_i.append(i)
    remove_i = set(remove_i)
    remove_i = [i for i in remove_i]
    remove_i.sort(reverse=True)
    for index in remove_i:
        try:
            del bases[index]
        except IndexError:
            print("Unable to delete base: ", bases)
    return bases
151523
def molecules2symbols(molecules, add_hydrogen=True):
    
    symbols = sorted(
        list(set(
            ase.symbols.string2symbols(''.join(
                map(
                    lambda _x:
                    ''.join(ase.symbols.string2symbols(_x)), molecules)
            ))
        )),
        key=lambda _y: ase.data.atomic_numbers[_y])

    if add_hydrogen and 'H' not in symbols:
        symbols.insert(0, 'H')

    return symbols
1005417
private static IAtomContainer clearHydrogenCounts(IAtomContainer container) {
        for (IAtom atom : container.atoms())
            atom.setImplicitHydrogenCount(0);
        return container;
    }
421728
def _remove_hlink(self):
        
        hlink = self._hlink
        if hlink is None:
            return
        rId = hlink.rId
        if rId:
            self.part.drop_rel(rId)
        self._element.remove(hlink)
640094
def niterations(self):
        """"""
        itercounter = self._itercounter
        if itercounter is None:
            itercounter = 0
        lastclear = self._lastclear
        if lastclear is None:
            lastclear = 0
        return itercounter + lastclear
1124600
def mw_wo_sw(mol, ndigits=2):
    
    cp = clone(mol)  # Avoid modification of original object
    remover.remove_water(cp)
    remover.remove_salt(cp)
    return round(sum(a.mw() for _, a in cp.atoms_iter()), ndigits)
1110300
def _extract_residues(self):
                
        
        r_list = self.handle.getElementsByTagName("response")
        
        r_data = {}
        
        for r in r_list:
            data = self._parse_residue(r)
            res_id = (data['model'], data['chain'], data['number']) # (A, 1, 1), (A, 1, 2), ...
            if not r_data.has_key(res_id):
                r_data[res_id] = data
            else: # Some atoms get repeated at the end with TER Hydrogens/oxygens
                r_data[res_id]['atoms'] += data['atoms'] # Append Atoms
        
        for key in sorted(r_data.keys()):
            yield r_data[key]
1035181
def get_counts(self):
        """"""

        hbondsback = len([hb for hb in self.hbonds if not hb.sidechain])
        counts = {'hydrophobics': len(self.hydrophobics), 'hbonds': len(self.hbonds),
                  'wbridges': len(self.wbridges), 'sbridges': len(self.sbridges), 'pistacks': len(self.pi_stacks),
                  'pications': len(self.pi_cations), 'halogens': len(self.halogens), 'metal': len(self.metal_complexes),
                  'hbond_back': hbondsback, 'hbond_nonback': (len(self.hbonds) - hbondsback)}
        counts['total'] = counts['hydrophobics'] + counts['hbonds'] + counts['wbridges'] + \
            counts['sbridges'] + counts['pistacks'] + counts['pications'] + counts['halogens'] + counts['metal']
        return counts
1355412
def _cleanup(self, ref):
        ''
        self.transitor_states[self._weakref_holder[ref]] -= 1
        del self._weakref_holder[ref]