Package org.jmol.adapter.readers.xml
Class XmlCmlReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.xml.XmlReader
org.jmol.adapter.readers.xml.XmlCmlReader
- All Implemented Interfaces:
GenericLineReader
- Direct Known Subclasses:
XmlMOReader,XmlNmrmlReader
A CML2 Reader - If passed a bufferedReader (from a file or inline string), we
generate a SAX parser and use callbacks to construct an AtomSetCollection. If
passed a JSObject (from LiveConnect) we treat it as a JS DOM tree, and walk
the tree, (using the same processing as the SAX parser) to construct the
AtomSetCollection.
symmetry added by Bob Hanson:
setSpaceGroupName() setUnitCellItem() setFractionalCoordinates()
setAtomCoord() applySymmetryAndSetTrajectory()
"isotope" added 4/6/2009 Bob Hanson
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected static final intstate constantsprotected Stringprotected booleanprotected static final intstate constantsprotected intprotected static final intstate constantsprotected String[]Fields inherited from class org.jmol.adapter.readers.xml.XmlReader
atts, chars, keepChars, parent, thisAtomFields 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 TypeMethodDescriptionvoidvoidprotected voidprocessEnd2(String name) protected voidprocessStart2(String name) voidprocessStartElement(String name, String nodeName) protected voidprocessXml(XmlReader parent, Object saxReader) the current stateMethods inherited from class org.jmol.adapter.readers.xml.XmlReader
finalizeSubclassReader, initializeReader, previewXML, processDOM, processXml2, setKeepCharsMethods inherited from class org.jmol.adapter.smarter.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
-
Field Details
-
tokens
-
processing
protected boolean processing -
state
protected int state -
moleculeID
-
htModelAtomMap
-
START
protected static final int STARTstate constants- See Also:
-
CML
protected static final int CMLstate constants- See Also:
-
CRYSTAL
protected static final int CRYSTALstate constants- See Also:
-
CRYSTAL_SCALAR
protected static final int CRYSTAL_SCALARstate constants- See Also:
-
CRYSTAL_SYMMETRY
protected static final int CRYSTAL_SYMMETRYstate constants- See Also:
-
CRYSTAL_SYMMETRY_TRANSFORM3
protected static final int CRYSTAL_SYMMETRY_TRANSFORM3state constants- See Also:
-
MOLECULE
protected static final int MOLECULEstate constants- See Also:
-
MOLECULE_ATOM_ARRAY
protected static final int MOLECULE_ATOM_ARRAYstate constants- See Also:
-
MOLECULE_ATOM
protected static final int MOLECULE_ATOMstate constants- See Also:
-
MOLECULE_ATOM_SCALAR
protected static final int MOLECULE_ATOM_SCALARstate constants- See Also:
-
MOLECULE_BOND_ARRAY
protected static final int MOLECULE_BOND_ARRAYstate constants- See Also:
-
MOLECULE_BOND
protected static final int MOLECULE_BONDstate constants- See Also:
-
MOLECULE_BOND_STEREO
protected static final int MOLECULE_BOND_STEREOstate constants- See Also:
-
MOLECULE_FORMULA
protected static final int MOLECULE_FORMULAstate constants- See Also:
-
MOLECULE_ATOM_BUILTIN
protected static final int MOLECULE_ATOM_BUILTINstate constants- See Also:
-
MOLECULE_BOND_BUILTIN
protected static final int MOLECULE_BOND_BUILTINstate constants- See Also:
-
MODULE
protected static final int MODULEstate constants- See Also:
-
SYMMETRY
protected static final int SYMMETRYstate constants- See Also:
-
LATTICE_VECTOR
protected static final int LATTICE_VECTORstate constants- See Also:
-
ASSOCIATION
protected static final int ASSOCIATIONstate constants- See Also:
-
-
Constructor Details
-
XmlCmlReader
public XmlCmlReader()
-
-
Method Details
-
processXml
the current state- Overrides:
processXmlin classXmlReader- Parameters:
parent-saxReader-- Throws:
Exception
-
processStartElement
- Overrides:
processStartElementin classXmlReader- Parameters:
name-nodeName- TODO
-
processStart2
-
processEnd2
-
applySymmetryAndSetTrajectory
public void applySymmetryAndSetTrajectory()- Overrides:
applySymmetryAndSetTrajectoryin classXmlReader
-
endDocument
public void endDocument()- Overrides:
endDocumentin classXmlReader
-