Very simple heuristic to determine the element from the atom name. This at the very least assume that people have the decency to follow the standard naming conventions for atom names when they are too lazy to write down elements
354326
function guessAtomElementFromName(fourLetterName) {
  if (fourLetterName[0] !== ' ') {
    var trimmed = fourLetterName.trim();
    if (trimmed.length === 4) {
      // look for first character in range A-Z or a-z and use that 
      // for the element. 
      var i = 0;
      var charCode = trimmed.charCodeAt(i);
      while (i < 4 && (charCode < 65 || charCode > 122 ||
             (charCode > 90 && charCode < 97))) {
        ++i;
        charCode = trimmed.charCodeAt(i);
      }
      return trimmed[i];
    }
    // when first character is not empty and length is smaller than 4,
    // assume that it's either a heavy atom (CA, etc), or a hydrogen 
    // name with a numeric prefix.  That's not always correct, though.
    var firstCharCode = trimmed.charCodeAt(0);
    if (firstCharCode >= 48 && firstCharCode <= 57) {
      // numeric prefix, so it's a hydrogen
      return trimmed[1];
    }
    return trimmed.substr(0, 2);
  }
  return fourLetterName[1];
}
1311440
function () {
            var elem = this[0];
            // No argument, return index in parent
            if (!elem) {
                return ( this[0] && this[0].parentNode ) ? this.first().prevAll().length : -1;
            }

            // Index in selector
            if (typeof elem === 'string') {
                return indexOf.call(vQ(elem), this[0]);
            }

            // Locate the position of the desired element
            return indexOf.call(this,

                // If it receives a vQ object, the first element is used
                elem.constructor == vQ ? elem[0] : elem
            );
        }
51727
private static Atom[] getAtoms(Atom[] ca, int[] positions, int length,
			boolean clone) {

		List<Atom> atoms = new ArrayList<Atom>();
		for (int i = 0; i < length; i++) {
			int p = positions[i];
			Atom a;
			if (clone) {
				a = (Atom) ca[p].clone();
				a.setGroup((Group) ca[p].getGroup().clone());
			} else {
				a = ca[p];
			}
			atoms.add(a);
		}
		return atoms.toArray(new Atom[atoms.size()]);
	}
934394
def atoms_order(self):
        
        if not len(self):  # for empty containers
            return {}
        elif len(self) == 1:  # optimize single atom containers
            return dict.fromkeys(self, 2)

        params = {n: (int(node), tuple(sorted(int(edge) for edge in self._adj[n].values())))
                  for n, node in self.atoms()}
        newlevels = {}
        countprime = iter(primes)
        weights = {x: newlevels.get(y) or newlevels.setdefault(y, next(countprime))
                   for x, y in sorted(params.items(), key=itemgetter(1))}

        tries = len(self) * 4

        numb = len(set(weights.values()))
        stab = 0

        while tries:
            oldnumb = numb
            neweights = {}
            countprime = iter(primes)

            # weights[n] ** 2 NEED for differentiation of molecules like A-B or any other complete graphs.
            tmp = {n: reduce(mul, (weights[x] for x in m), weights[n] ** 2) for n, m in self._adj.items()}

            weights = {x: (neweights.get(y) or neweights.setdefault(y, next(countprime)))
                       for x, y in sorted(tmp.items(), key=itemgetter(1))}

            numb = len(set(weights.values()))
            if numb == len(self):  # each atom now unique
                break
            elif numb == oldnumb:
                x = Counter(weights.values())
                if x[min(x)] > 1:
                    if stab == 3:
                        break
                elif stab >= 2:
                    break

                stab += 1
            elif stab:
                stab = 0

            tries -= 1
            if not tries and numb < oldnumb:
                warning('morgan. number of attempts exceeded. uniqueness has decreased. next attempt will be made')
                tries = 1
        else:
            warning('morgan. number of attempts exceeded')

        return weights
761280
function (d) {
/*Line 375 - 'Atom.js' */        d = AtomDate.parse(d);
/*Line 376 - 'Atom.js' */        if (!d)
/*Line 377 - 'Atom.js' */            return "";
/*Line 378 - 'Atom.js' */        var h = d.getHours();
/*Line 379 - 'Atom.js' */        var s = "AM";
/*Line 380 - 'Atom.js' */        if (h == 12) {
/*Line 381 - 'Atom.js' */            s = "PM";
/*Line 382 - 'Atom.js' */        } else {
/*Line 383 - 'Atom.js' */            if (h > 12) {
/*Line 384 - 'Atom.js' */                h = h - 12;
/*Line 385 - 'Atom.js' */                s = "PM";
/*Line 386 - 'Atom.js' */            }
/*Line 387 - 'Atom.js' */        }
/*Line 388 - 'Atom.js' */        var m = d.getMinutes();
/*Line 389 - 'Atom.js' */        if (m < 10) {
/*Line 390 - 'Atom.js' */            m = "0" + m;
/*Line 391 - 'Atom.js' */        } else {
/*Line 392 - 'Atom.js' */            m = m + "";
/*Line 393 - 'Atom.js' */            if (m.length == 1) {
/*Line 394 - 'Atom.js' */                m = m + "0";
/*Line 395 - 'Atom.js' */            }
/*Line 396 - 'Atom.js' */        }
/*Line 397 - 'Atom.js' */        return h + ":" + m + " " + s;
/*Line 398 - 'Atom.js' */    }
731133
@Override
    public boolean matches(IAtom atom) {
        if (!atom.getSymbol().equals("H")) {
            return false;
        }

        if (atom.getFormalCharge() == 1) { // proton matches
            return true;
        }

        // hydrogens connected to other hydrogens, e.g., molecular hydrogen
        List<IAtom> list = invariants(atom).target().getConnectedAtomsList(atom);
        for (IAtom connAtom : list) {
            if (connAtom.getSymbol().equals("H")) {
                return true;
            }
        }

        // hydrogens connected to other than one other atom, e.g., bridging hydrogens
        if (invariants(atom).degree() > 1) {
            return true;
        }

        //isotopic hydrogen specifications, e.g. deuterium [2H] or tritium etc
        if (atom.getMassNumber() != null) {
            if (getMassNumber().intValue() == atom.getMassNumber().intValue()) return true;
        } else {
            // target atom is [H], so make sure query atom has mass number = 1
            if (getMassNumber() == 1) return true;
        }

        return false;
    }
573931
private int getHalogenCount(IAtomContainer ac, IAtom atom) {
        List<IAtom> neighbours = ac.getConnectedAtomsList(atom);
        int acounter = 0;
        for (IAtom neighbour : neighbours) {
            if (neighbour.getSymbol().equals("F") || neighbour.getSymbol().equals("I")
                    || neighbour.getSymbol().equals("Cl") || neighbour.getSymbol().equals("Br")) {
                acounter += 1;
            }
        }
        return acounter;
    }
98535
static boolean isElementParentName(Element element, String name) {
        Element parent = element.getParentElement();
        if (parent == null) {
            return false;
        }
        return isElementName(parent, name);
    }
522718
private int prepare(IAtom atom, IBond prev) {
        int count = 0;
        amap[atom.getIndex()] = 1;
        for (IBond bond : atom.bonds()) {
            if (bond == prev)
                continue;
            IAtom nbr = bond.getOther(atom);
            if (amap[nbr.getIndex()] == 0) {
                qbonds[numBonds++] = (IQueryBond) bond;
                count += prepare(nbr, bond) + 1;
            } else if (nbr.getIndex() < atom.getIndex()) {
                ++count; // ring closure
                qbonds[numBonds++] = (IQueryBond) bond;
            }
        }
        return count;
    }
1084256
def atom(self):
        
        token = self.token
        if token.nature == Nature.PLUS:
            self._process(Nature.PLUS)
            return UnaryOperation(op=token, right=self.atom())
        elif token.nature == Nature.MINUS:
            self._process(Nature.MINUS)
            return UnaryOperation(op=token, right=self.atom())
        elif token.nature in (Nature.MUT, Nature.ID):
            return self.call()
        elif token.nature == Nature.INT_NUMBER:
            self._process(Nature.INT_NUMBER)
            return Integer(token)
        elif token.nature == Nature.FLOAT_NUMBER:
            self._process(Nature.FLOAT_NUMBER)
            return FloatingPoint(token)
        elif token.nature == Nature.LPAREN:
            self._process(Nature.LPAREN)
            node = self.logical_or_expr()
            self._process(Nature.RPAREN)
            return node
        elif token.nature == Nature.TRUE:
            self._process(Nature.TRUE)
            return Boolean(token)
        elif token.nature == Nature.FALSE:
            self._process(Nature.FALSE)
            return Boolean(token)
        else:
            self._error()
500496
public static MarkedElement markupAtom(IRenderingElement elem, IAtom atom) {
        if (elem == null)
            return null;
        MarkedElement tagElem = markupChemObj(elem, atom);
        tagElem.aggClass("atom");
        return tagElem;
    }
872199
def get_atom_name(self, atom):
        """"""
        r = request.GetAtomName(display = self.display,
                                atom = atom)
        return r.name
404842
private static int checkAtom(IAtomContainer ac, IAtom currentAtom) {
        int check = -1;
        List<IAtom> atoms = ac.getConnectedAtomsList(currentAtom);
        List<IBond> bonds = ac.getConnectedBondsList(currentAtom);
        if (currentAtom.getFlag(CDKConstants.ISAROMATIC)) {
            check = 0;
        } else if (currentAtom.getFormalCharge() == 1 /*
                                                       * &&
                                                       * currentAtom.getSymbol
                                                       * ().equals("C")
                                                       */) {
            check = 0;
        } else if (currentAtom.getFormalCharge() == -1) {
            //// NEGATIVE CHARGES WITH A NEIGHBOOR PI BOND //////////////
            int counterOfPi = 0;
            for (IAtom atom : atoms) {
                if (ac.getMaximumBondOrder(atom) != IBond.Order.SINGLE) {
                    counterOfPi++;
                }
            }
            if (counterOfPi > 0) check = 0;
        } else {
            int se = ac.getConnectedSingleElectronsCount(currentAtom);
            if (se == 1) {
                check = 0; //// DETECTION of radicals
            } else if (ac.getConnectedLonePairsCount(currentAtom) > 0
            /* && (currentAtom.getSymbol().equals("N") */) {
                check = 0; //// DETECTION of  lone pair
            } else {
                int highOrderBondCount = 0;
                for (int j = 0; j < atoms.size(); j++) {
                    IBond bond = bonds.get(j);
                    if (bond == null || bond.getOrder() != IBond.Order.SINGLE) {
                        highOrderBondCount++;
                    } else {
                    }
                }
                if (highOrderBondCount == 1) {
                    check = 0;
                } else if (highOrderBondCount > 1) {
                    check = 1;
                }
            }
        }
        return check;
    }
868109
@Override
    public boolean matches(IAtom atom) {
        if (mass == 0)
            return atom.getMassNumber() == null;
        else
            return atom.getMassNumber() != null && mass == atom.getMassNumber();
    }
315539
def atom=(value)
      value.is_a?(Atom) ? super(value) : super(Atom.find(value.to_s))
    end
125542
private void label(final ITetrahedralChirality element) {

        final IAtom focus = element.getChiralAtom();
        final IAtom[] atoms = element.getLigands();
        final IBond[] bonds = new IBond[4];

        int p = parity(element.getStereo());
        int n = 0;

        // unspecified centre, no need to assign labels
        if (p == 0) return;

        for (int i = 0; i < 4; i++) {
            if (atoms[i].equals(focus)) {
                p *= indexParity(i); // implicit H, adjust parity
            } else {
                bonds[n] = container.getBond(focus, atoms[i]);
                if (bonds[n] == null)
                    throw new IllegalArgumentException("Inconsistent stereo,"
                                                       + " tetrahedral centre"
                                                       + " contained atom not"
                                                       + " stored in molecule");
                atoms[n] = atoms[i];
                n++;
            }
        }

        // sort coordinates and adjust parity (rank gives us the sorted order)
        int[] rank = new int[n];
        for (int i = 0; i < n; i++)
            rank[i] = i;
        p *= sortClockwise(rank, focus, atoms, n);

        // special case when there are three neighbors are acute and an implicit
        // hydrogen is opposite all three neighbors. The central label needs to
        // be inverted, atoms could be laid out like this automatically, consider
        // CC1C[C@H]2CC[C@@H]1C2
        int invert = -1;
        if (n == 3) {
            // find a triangle of non-sequential neighbors (sorted clockwise)
            // which has anti-clockwise winding
            for (int i = 0; i < n; i++) {
                Point2d a = atoms[rank[i]].getPoint2d();
                Point2d b = focus.getPoint2d();
                Point2d c = atoms[rank[(i + 2) % n]].getPoint2d();
                double det = (a.x - c.x) * (b.y - c.y) - (a.y - c.y) * (b.x - c.x);
                if (det > 0) {
                    invert = rank[(i + 1) % n];
                    break;
                }
            }
        }

        // assign all up/down labels to an auxiliary array
        IBond.Stereo[] labels = new IBond.Stereo[n];
        for (int i = 0; i < n; i++) {
            int v = rank[i];

            // 4 neighbors (invert every other one)
            if (n == 4) p *= -1;

            labels[v] = invert == v ? p > 0 ? DOWN : UP : p > 0 ? UP : DOWN;
        }

        // set the label for the highest priority and available bond
        IBond.Stereo firstlabel      = null;
        boolean      assignTwoLabels = assignTwoLabels(bonds, labels);
        for (int v : priority(atomToIndex.get(focus), atoms, n)) {
            IBond bond = bonds[v];
            if (bond.getStereo() != NONE || bond.getOrder() != SINGLE)
                continue;
            // first label
            if (firstlabel == null) {
                bond.setAtoms(new IAtom[]{focus, atoms[v]}); // avoids UP_INVERTED/DOWN_INVERTED
                bond.setStereo(labels[v]);
                firstlabel = labels[v];
                // don't assign a second label when there are only three ligands
                if (!assignTwoLabels)
                    break;
            }
            // second label
            else if (labels[v] != firstlabel) {
                // don't add if it's possibly a stereo-centre
                if (isSp3Carbon(atoms[v], graph[container.indexOf(atoms[v])].length))
                    break;
                bond.setAtoms(new IAtom[]{focus, atoms[v]}); // avoids UP_INVERTED/DOWN_INVERTED
                bond.setStereo(labels[v]);
                break;
            }
        }

        // it should be possible to always assign labels somewhere -> unchecked exception
        if (firstlabel == null)
            throw new IllegalArgumentException("could not assign non-planar (up/down) labels");
    }
10416
public Set<LabelAtom> listAtoms() {
        Set<LabelAtom> r = new HashSet<>();
        accept(ATOM_COLLECTOR,r);
        return r;
    }