/// <summary> /// Set integer ImplicitHydrogenCount (isotope value) for an atom /// </summary> /// <param name="atom"></param> /// <param name="hcnt"></param> public static void SetImplicitHydrogenCount( IAtom atom, int hcnt) { atom.setImplicitHydrogenCount(new java.lang.Integer(hcnt)); return; }
/// <summary> /// Increment the implicit hydrogen count of the provided atom. If the atom /// was a non-pseudo atom and had an unset hydrogen count an exception is /// thrown. /// </summary> /// <param name="atom"> an atom to increment the hydrogen count of </param> private static void incrementImplHydrogenCount(IAtom atom) { int?hCount = atom.getImplicitHydrogenCount().intValue(); if (hCount == null) { if (!(atom is IPseudoAtom)) { throw new System.ArgumentException("a non-pseudo atom had an unset hydrogen count"); } hCount = 0; } atom.setImplicitHydrogenCount(new java.lang.Integer((int)hCount + 1)); }