Reads the atom types from the data file.

@param  builder The IChemObjectBuilder used to create new IAtomType's.
@return         a List with atom types. Is empty if some reading error occurred.
546618
public List<IAtomType> readAtomTypes(IChemObjectBuilder builder) {
        List<IAtomType> isotopes = new ArrayList<IAtomType>();
        try {
            parser.setFeature("http://xml.org/sax/features/validation", false);
            logger.info("Deactivated validation");
        } catch (SAXException exception) {
            logger.warn("Cannot deactivate validation: ", exception.getMessage());
            logger.debug(exception);
        }
        AtomTypeHandler handler = new AtomTypeHandler(builder);
        parser.setContentHandler(handler);
        try {
            parser.parse(new InputSource(input));
            isotopes = handler.getAtomTypes();
        } catch (IOException exception) {
            logger.error("IOException: ", exception.getMessage());
            logger.debug(exception);
        } catch (SAXException saxe) {
            logger.error("SAXException: ", saxe.getMessage());
            logger.debug(saxe);
        }
        return isotopes;
    }
123352
public IAtomType[] getAtomTypes(String symbol) {
        logger.debug("Request for atomtype for symbol ", symbol);
        List<IAtomType> atomList = new ArrayList<IAtomType>();
        for (IAtomType atomType : atomTypes.values()) {
            if (Objects.equals(atomType.getSymbol(), symbol)) {
                atomList.add(atomType);
            }
        }
        IAtomType[] atomTypes = (IAtomType[]) atomList.toArray(new IAtomType[atomList.size()]);
        if (atomTypes.length > 0)
            logger.debug("Atomtype for symbol ", symbol, " has this number of types: " + atomTypes.length);
        else
            logger.debug("No atomtype for symbol ", symbol);
        return atomTypes;
    }
451006
public void readParameterSets(IChemObjectBuilder builder) throws Exception {
        //vdW,bond,angle,strbond,opbend,torsion,data
        LOG.debug("------ Read MMFF94 ParameterSets ------");

        if (ins == null) {
            ClassLoader loader = this.getClass().getClassLoader();
            ins = loader.getResourceAsStream(configFile);
        }
        if (ins == null) {
            throw new IOException("There was a problem getting the default stream: " + configFile);
        }

        BufferedReader r = new BufferedReader(new InputStreamReader(ins), 1024);
        String s;
        int[] a = {0, 0, 0, 0, 0, 0, 0, 0};

        if (insvdW == null) {
            insvdW = this.getClass().getClassLoader().getResourceAsStream(configFilevdW);
        }
        if (insvdW == null) {
            throw new IOException("There was a problem getting the default stream: " + configFilevdW);
        }

        BufferedReader rvdW = new BufferedReader(new InputStreamReader(insvdW), 1024);
        String svdW;
        int ntvdW;

        if (insDFSB == null) {
            insDFSB = this.getClass().getClassLoader().getResourceAsStream(configFileDFSB);
        }
        if (insDFSB == null) {
            throw new IOException("There was a problem getting the default stream: " + configFileDFSB);
        }

        BufferedReader rDFSB = new BufferedReader(new InputStreamReader(insDFSB), 1024);
        String sDFSB;
        int ntDFSB;

        try {
            while (true) {
                s = r.readLine();
                if (s == null) {
                    break;
                }
                st = new StringTokenizer(s, "\t; ");
                int nt = st.countTokens();
                if (s.startsWith("atom") & nt <= 8) {
                    setAtomTypes(builder);
                    a[0]++;
                } else if (s.startsWith("bond") & nt == 9) {
                    setBond();
                    a[1]++;
                } else if (s.startsWith("angle") & nt <= 10) {
                    setAngle();
                    a[2]++;
                } else if (s.startsWith("strbnd") & nt == 7) {
                    setStrBnd();
                    a[3]++;
                } else if (s.startsWith("torsion") & nt == 11) {
                    setTorsion();
                    a[4]++;
                } else if (s.startsWith("opbend") & nt == 6) {
                    setOpBend();
                    a[5]++;
                } else if (s.startsWith("data") & nt == 10) {
                    readatmmffvdw: while (true) {
                        svdW = rvdW.readLine();
                        if (svdW == null) {
                            break;
                        }
                        stvdW = new StringTokenizer(svdW, "\t; ");
                        ntvdW = stvdW.countTokens();
                        LOG.debug("ntvdW : " + ntvdW);
                        if (svdW.startsWith("vdw") & ntvdW == 9) {
                            st.nextToken();
                            sid = st.nextToken();
                            stvdW.nextToken();
                            sidvdW = stvdW.nextToken();
                            if (sid.equals(sidvdW)) {
                                setAtomTypeData();
                                a[6]++;
                            }
                            break readatmmffvdw;
                        }
                    }// end while
                }
            }// end while

            ins.close();
            insvdW.close();
        } catch (IOException e) {
            throw new IOException("There was a problem parsing the mmff94 forcefield");
        }

        try {
            LOG.debug("Parses the Default Stretch-Bend Parameters");
            while (true) {
                sDFSB = rDFSB.readLine();
                LOG.debug("sDFSB = " + sDFSB);
                if (sDFSB == null) {
                    LOG.debug("sDFSB == null, break");
                    break;
                }
                stDFSB = new StringTokenizer(sDFSB, "\t; ");
                ntDFSB = stDFSB.countTokens();
                LOG.debug("ntDFSB : " + ntDFSB);
                if (sDFSB.startsWith("DFSB") & ntDFSB == 6) {
                    setDefaultStrBnd();
                }
            }
            insDFSB.close();
            LOG.debug("insDFSB closed");
        } catch (IOException e) {
            throw new IOException("There was a problem parsing the Default Stretch-Bend Parameters (mmffdfsb.par)");
        }
    }
927267
@Nonnull
	public static <T1, T2> ToIntBiFunction<T1, T2> toIntBiFunctionFrom(Consumer<ToIntBiFunctionBuilder<T1, T2>> buildingFunction) {
		ToIntBiFunctionBuilder builder = new ToIntBiFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
148623
public IAtomType[] getAllAtomTypes() {
        logger.debug("Returning list of size: ", getSize());
        return (IAtomType[]) atomTypes.values().toArray(new IAtomType[atomTypes.size()]);
    }
579492
public BuildableType.Builder builderType(Type builderType) {
    this.builderType = Objects.requireNonNull(builderType);
    _unsetProperties.remove(Property.BUILDER_TYPE);
    return (BuildableType.Builder) this;
  }
1127206
@Nonnull
	public static <T1, T2> LBiObjDblPredicate<T1, T2> biObjDblPredicateFrom(Consumer<LBiObjDblPredicateBuilder<T1, T2>> buildingFunction) {
		LBiObjDblPredicateBuilder builder = new LBiObjDblPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
929318
public Datatype.Builder setBuilder(Type builder) {
    this.builder = Objects.requireNonNull(builder);
    _unsetProperties.remove(Property.BUILDER);
    return (Datatype.Builder) this;
  }
1071715
private IAtomType getAtomType(String ID) throws NoSuchAtomTypeException {
        IAtomType at = null;
        for (int i = 0; i < atomTypes.size(); i++) {
            at = (IAtomType) atomTypes.get(i);
            if (at.getAtomTypeName().equals(ID)) {
                return at;
            }
        }
        throw new NoSuchAtomTypeException("AtomType " + ID + " could not be found");
    }
539464
public java.util.List<? extends com.google.iam.v1.BindingOrBuilder> 
      getBindingsOrBuilderList() {
    return bindings_;
  }
778961
public Datatype.Builder setNullableBuilderFactory(BuilderFactory builderFactory) {
    if (builderFactory != null) {
      return setBuilderFactory(builderFactory);
    } else {
      return clearBuilderFactory();
    }
  }
516338
private void parseMappingDefinitions(BeanDefinitionBuilder builder, Element element) {
        HashMap<String, String> mappings = new HashMap<String, String>();
        for (Element matcher : DomUtils.getChildElementsByTagName(element, "mapping")) {
            mappings.put(matcher.getAttribute("path"), matcher.getAttribute("value"));
        }

        if (!mappings.isEmpty()) {
            builder.addPropertyValue("mappings", mappings);
        }
    }
1363438
@Override
    public Builder<K, V> toBuilder() {
        return new Builder<K, V>(metadata, key, value);
    }
421298
@Nonnull
	public static LByteIntPredicate byteIntPredicateFrom(Consumer<LByteIntPredicateBuilder> buildingFunction) {
		LByteIntPredicateBuilder builder = new LByteIntPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
774928
@Nonnull
	public static <T1, T2> LBiObjIntConsumer<T1, T2> biObjIntConsumerFrom(Consumer<LBiObjIntConsumerBuilder<T1, T2>> buildingFunction) {
		LBiObjIntConsumerBuilder builder = new LBiObjIntConsumerBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
775808
@Nonnull
	public static <T1, T2, R> LBiObjSrtFunction<T1, T2, R> biObjSrtFunctionFrom(Consumer<LBiObjSrtFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjSrtFunctionBuilder builder = new LBiObjSrtFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
188303
@Nonnull
	public static <T1, T2, R> LBiObjDblFunction<T1, T2, R> biObjDblFunctionFrom(Consumer<LBiObjDblFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjDblFunctionBuilder builder = new LBiObjDblFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}