# Class CDXReader

java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xml.XmlReader
org.jmol.adapter.readers.xml.XmlCdxReader
org.jmol.adapter.readers.more.CDXReader

All Implemented Interfaces:
  `GenericLineReader, CDXMLParser.CDXReaderI`

public class CDXReader extends XmlCdxReader
A reader for ChemDraw binary CDX files. See https://iupac.github.io/IUPAC-FAIRSpec/cdx_sdk formerly https://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/ CambridgeSoft did a fabulous job on the specification. This reader extends CDXMLWriter. It simply passes the CDX binary to CDXMLWriter, which returns the XML. The XML is then passed through the CDX files on the fly to CDXML and then processes those using the XMLChemDrawReader. Note that CDXMLWriter.fromCDX(), though public, is not exposed generally, as it is only a skeleton class intended to do just enough to be able to run the structure through SMILES, InChI and 2D or 3D MOL generation. Generic Nicknames (e.g. "R" and "X") will become "Xx" -- unknown atom. Multiple Attachments will become 0.5 partial bonds.

Version:
  1.0
Author:
  Bob Hanson

## Field Summary

### Fields inherited from class XmlCdxReader

`isCDX`

### Fields inherited from class XmlReader

`atts, chars, keepChars, parent, thisAtom`

### Fields inherited from class AtomSetCollectionReader

`addedData, addedDataKey, addVibrations, allow_a_len_1, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, baseBondIndex, binaryDoc, bsFilter, bsModels, calculationType, CELL_TYPE_CONVENTIONAL, CELL_TYPE_PRIMITIVE, CELL_TYPE_SUPER, cellSlop, centroidPacked, checkNearAtoms, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCentroidUnitCell, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterAllHetero, filterCased, filteredPrecision, filterHetero, floatifyJavaDouble, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, is2D, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isSUPERCELL, isTrajectory, latticeCells, latticeScaling, latticeType, line, lowPrecision, lstNCS, matUnitCellOrientation, merging, modDim, modelNumber, ms, mustFinalizeModelSet, next, noHydrogens, noMinimize, noPack, optimize2D, out, paramsCentroid, paramsLattice, precision, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, slabXY, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, ucItems, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr`

## Constructor Summary

Constructors
Constructor
Description
`CDXReader()`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`processXml2(XmlReader parent, Object saxReader)`

### Methods inherited from class XmlCdxReader

`createMolecule, finalizeSubclassReader, getBondOrder, handleCoordinates, processStartElement, processXml, setKeepChars, warn`

### Methods inherited from class XmlReader

`applySymmetryAndSetTrajectory, endDocument, initializeReader, previewXML, processDOM`

### Methods inherited from class AtomSetCollectionReader

`addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addMoreUnitCellInfo, addSites, addSiteScript, appendLoadNote, applySymTrajASCR, checkAndRemoveFilterKey, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLine, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, doPreSymmetry, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, finalizeSubclassSymmetry, fixDoubleA, fixFloatA, fixFloatPt, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFilterWithCase, getFortranFormatLengths, getInterface, getPackingRangeValue, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, parsePrecision, parseToken, parseTokenNext, parseTokenRange, parseTokenStr, processBinaryDocument, rd, read3Vectors, readDataObject, readLines, readNextLine, rejectAtomName, RL, set2D, setAtomCoord, setAtomCoordScaled, setAtomCoordTokens, setAtomCoordXYZ, setChainID, setElementAndIsotope, setFilter, setFilterAtomTypeStr, setFractionalCoordinates, setIsPDB, setLoadNote, setModelPDB, setPrecision, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setup, setupASCR, warnSkippingOperation`

### Methods inherited from class Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### CDXReader

public CDXReader()

## Method Details

### processXml2

protected void processXml2(XmlReader parent, Object saxReader) throws Exception

Overrides:
  `processXml2` in class `XmlReader`
Throws:
  `Exception`