private static int electronsForAtomType(IAtom atom) {
        Integer electrons = TYPES.get(atom.getAtomTypeName());

        if (electrons != null) return electrons;

        try {
            IAtomType atomType = AtomTypeFactory.getInstance("org/openscience/cdk/dict/data/cdk-atom-types.owl",
                    atom.getBuilder()).getAtomType(atom.getAtomTypeName());
            electrons = atomType.getProperty(CDKConstants.PI_BOND_COUNT);
            return electrons != null ? electrons : 0;
        } catch (NoSuchAtomTypeException e) {
            throw new IllegalArgumentException(e);
        }
    }
private static int electronsForAtomType ( IAtom atom ) { Integer electrons = TYPES . get ( atom . getAtomTypeName ( ) ) ; if ( electrons != null ) return electrons ; try { IAtomType atomType = AtomTypeFactory . getInstance ( "org/openscience/cdk/dict/data/cdk-atom-types.owl" , atom . getBuilder ( ) ) . getAtomType ( atom . getAtomTypeName ( ) ) ; electrons = atomType . getProperty ( CDKConstants . PI_BOND_COUNT ) ; return electrons != null ? electrons : 0 ; } catch ( NoSuchAtomTypeException e ) { throw new IllegalArgumentException ( e ) ; } }
The number of contributed electrons for the atom type of the specified
atom type.

@param atom an atom to get the contribution of
@return the number of electrons