Exemplo n.º 1
0
 /**
  * allow 13C, 15N, 2H, etc. for isotopes
  *
  * @param atom
  * @param str
  */
 protected void setElementAndIsotope(Atom atom, String str) {
   int isotope = parseInt(str);
   if (isotope == Integer.MIN_VALUE) {
     atom.elementSymbol = str;
   } else {
     str = str.substring(("" + isotope).length());
     atom.elementNumber =
         (short)
             (str.length() == 0 ? isotope : ((isotope << 7) + JmolAdapter.getElementNumber(str)));
   }
 }
Exemplo n.º 2
0
 public static String getElementSymbol(int elementNumber) {
   return JmolAdapter.getElementSymbol(elementNumber);
 }