Package org.jmol.adapter.readers.xml
Class XmlCdxReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xml.XmlReader
org.jmol.adapter.readers.xml.XmlCdxReader
- All Implemented Interfaces:
GenericLineReader
- Direct Known Subclasses:
CDXReader
A reader for CambridgeSoft CDXML files.
See
https://www.cambridgesoft.com/services/documentation/sdk/chemdraw/cdx/IntroCDXML.htm
for the full, detailed specification.
Here we are just looking for simple aspects that could be converted to valid
2D MOL files, SMILES, and InChI.
Fragments (such as CH2CH2OH) and "Nickname"-type fragments such as Ac and Ph,
are processed correctly. But their 2D representations are pretty nuts.
ChemDraw does not make any attempt to place these in reasonable locations.
That said, Jmol's 3D minimization does a pretty fair job, and the default is
to do that minimization.
If minimization and addition of H is not desired, use FILTER "NOH" or FILTER
"NO3D"
XmlChemDrawReader also serves as the reader for binary CDX files, as
CDXReader subclasses this class. See that class for details.
- Author:
- hansonr
-
Field Summary
FieldsModifier and TypeFieldDescriptionboolean
true when this reader is being used after CDX conversionFields inherited from class org.jmol.adapter.readers.xml.XmlReader
atom, atts, bond, chars, keepChars, parent
Fields inherited from class org.jmol.adapter.smarter.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 -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Fix connections to Fragments and Nicknames, adjust stereochemistry for wavy displays, flag invalid atoms, and adjust the scale to something more molecular.void
processStartElement
(String localName, String nodeName) protected void
processXml
(XmlReader parent, Object saxReader) Methods inherited from class org.jmol.adapter.readers.xml.XmlReader
applySymmetryAndSetTrajectory, endDocument, initializeReader, processDOM, processXml2, setKeepChars
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, 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
-
Field Details
-
isCDX
public boolean isCDXtrue when this reader is being used after CDX conversion
-
-
Constructor Details
-
XmlCdxReader
public XmlCdxReader()
-
-
Method Details
-
processXml
- Overrides:
processXml
in classXmlReader
- Parameters:
parent
-saxReader
-- Throws:
Exception
-
processStartElement
- Overrides:
processStartElement
in classXmlReader
- Parameters:
localName
-nodeName
- TODO
-
finalizeSubclassReader
Fix connections to Fragments and Nicknames, adjust stereochemistry for wavy displays, flag invalid atoms, and adjust the scale to something more molecular. Finalize the 2D/3D business.- Overrides:
finalizeSubclassReader
in classXmlReader
- Throws:
Exception
-