/** Array of hydrogenCounts. * * Normally used in CML2 array mode. The total number of hydrogens bonded to the atom or molecule. It is preferable to include hydrogens explicitly, and where this is done their count represents the minimum (and may thus override this attribute). It is dangerous to use this attribute for electron-deficient molecules (e.g. diborane) or hydrogen bonds. There is NO DEFAULT and the absence of this attribute must not be given any meaning. * --type info-- * * Array of hydrogenCounts. * The total number of hydrogen atoms bonded to an atom or contained in a molecule, whether explicitly included as atoms or not. It is an error to have hydrogen count less than the explicit hydrogen count. There is no default value and no assumptions about hydrogen Count can be made if it is not given. If hydrogenCount is given on every atom, then the values can be summed to give the total hydrogenCount for the (sub)molecule. Because of this hydrogenCount should not be used where hydrogen atoms bridge 2 or more atoms. * @param value hydrogenCount value * @throws RuntimeException attribute wrong value/type */ public void setHydrogenCount(String[] value) throws RuntimeException { if (value == null) { throw new RuntimeException("null hydrogenCount"); } List<CMLAtom> atomList = this.getAtoms(value.length, "hydrogenCount"); int i = 0; for (CMLAtom atom : atomList) { atom.setHydrogenCount(Integer.parseInt(value[i++])); } } /** Array of occupancies.
cmlAtom.setHydrogenCount(totalHydrogen);
cmlAtom.setHydrogenCount(totalHydrogen);