code: static Atom toBeamAtom(final IAtom a, final int flavour) {
  
          final boolean aromatic = SmiFlavor.isSet(flavour, SmiFlavor.UseAromaticSymbols) && a.getFlag(CDKConstants.ISAROMATIC);
          final Integer charge = a.getFormalCharge();
          final String symbol = checkNotNull(a.getSymbol(), "An atom had an undefined symbol");
  
          Element element = Element.ofSymbol(symbol);
          if (element == null) element = Element.Unknown;
  
          AtomBuilder ab = aromatic ? AtomBuilder.aromatic(element) : AtomBuilder.aliphatic(element);
  
          // CDK leaves nulls on pseudo atoms - we need to check this special case
          Integer hCount = a.getImplicitHydrogenCount();
          if (element == Element.Unknown) {
              ab.hydrogens(hCount != null ? hCount : 0);
          } else {
              ab.hydrogens(checkNotNull(hCount, "One or more atoms had an undefined number of implicit hydrogens"));
          }
  
          if (charge != null) ab.charge(charge);
  
          // use the mass number to specify isotope?
          if (SmiFlavor.isSet(flavour, SmiFlavor.AtomicMass | SmiFlavor.AtomicMassStrict)) {
              Integer massNumber = a.getMassNumber();
              if (massNumber != null) {
                  ab.isotope(massNumber);
              }
          }
  
          Integer atomClass = a.getProperty(ATOM_ATOM_MAPPING);
          if (SmiFlavor.isSet(flavour, SmiFlavor.AtomAtomMap) && atomClass != null) {
              ab.atomClass(atomClass);
          }
  
          return ab.build();
      }
docs: Convert an CDK {@link IAtom} to a Beam Atom. The symbol and implicit
  hydrogen count are not optional. If the symbol is not supported by the
  SMILES notation (e.g. 'R1') the element will automatically default to
  UNKNOWN ('*').
  
  @param a cdk Atom instance
  @return a Beam atom
  @throws NullPointerException the atom had an undefined symbol or implicit
  hydrogen count