def add_chg(self, atom_symbol, atom_number, charge):
        """

        :param atom_symbol: 
        :param atom_number: 
        :param charge: 
        :return:
        :rtype:
        """
        atom = self.atom_by_number(atom_number=atom_number)
        if atom.atom_symbol != atom_symbol:
            raise TypeError('Atom symbols do not match: {} and {}'.format(atom.atom_symbol, atom_symbol))
        else:
            atom.charge = charge

        if int(charge) < 0:
            if len(atom.neighbor_hydrogen_atoms) < abs(int(charge)):
                raise ValueError(
                    'Cannot add charge {} to atom {} at position {}'.format(charge, atom_symbol, atom_number))
            else:
                atom_numbers = [hydrogen.atom_number for hydrogen in atom.neighbor_hydrogen_atoms]
                self.delete_atom(*atom_numbers)
def add_chg ( self , atom_symbol , atom_number , charge ) : atom = self . atom_by_number ( atom_number = atom_number ) if atom . atom_symbol != atom_symbol : raise TypeError ( 'Atom symbols do not match: {} and {}' . format ( atom . atom_symbol , atom_symbol ) ) else : atom . charge = charge if int ( charge ) < 0 : if len ( atom . neighbor_hydrogen_atoms ) < abs ( int ( charge ) ) : raise ValueError ( 'Cannot add charge {} to atom {} at position {}' . format ( charge , atom_symbol , atom_number ) ) else : atom_numbers = [ hydrogen . atom_number for hydrogen in atom . neighbor_hydrogen_atoms ] self . delete_atom ( * atom_numbers )
:param atom_symbol: 
        :param atom_number: 
        :param charge: 
        :return:
        :rtype: