public class XMLIsotopeFactory extends IsotopeFactory
IsotopeFactory ifac = IsotopFactory.getInstance(new IChemObject().getNewBuilder());
Data about the isotopes are read from the file org.openscience.cdk.config.isotopes.xml in the cdk-standard module. Part of the data in this file was collected from the website webelements.org.
The use of this class is exemplified as follows. To get information about the major isotope of hydrogen, one can use this code:
IsotopeFactory factory = XMLIsotopeFactory.getInstance(DefaultChemObjectBuilder.getInstance()); Isotope major = factory.getMajorIsotope("H");
EMPTY_ISOTOPE_ARRAY, logger
Modifier and Type | Method and Description |
---|---|
static XMLIsotopeFactory |
getInstance(IChemObjectBuilder builder)
Returns an IsotopeFactory instance.
|
add, configure, configure, configureAtoms, getElement, getElement, getElementSymbol, getExactMass, getIsotope, getIsotope, getIsotopes, getIsotopes, getIsotopes, getIsotopes, getMajorIsotope, getMajorIsotope, getMajorIsotopeMass, getNaturalMass, getNaturalMass, getSize, isElement
public static XMLIsotopeFactory getInstance(IChemObjectBuilder builder) throws IOException
builder
- ChemObjectBuilder used to construct the Isotope'sIOException
- if isotopic data files could not be read.Copyright © 2021. All rights reserved.