Package org.jmol.adapter.readers.pymol
Class PyMOLReader
java.lang.Object
org.jmol.adapter.smarter.AtomSetCollectionReader
org.jmol.adapter.readers.pdb.PdbReader
org.jmol.adapter.readers.pymol.PyMOLReader
- All Implemented Interfaces:
GenericLineReader
PyMOL PSE (binary Python session) file reader.
development started Feb 2013 Jmol 13.1.13
reasonably full implementation May 2013 Jmol 13.1.16
PyMOL state --> Jmol model
PyMOL object --> Jmol named atom set, isosurface, CGO, or measurement
PyMOL group --> Jmol named atom set (TODO: add isosurfaces and measures to these?)
PyMOL movie: an initial view and a set of N "frames"
PyMOL frame: references (a) a state, (b) a script, and (c) a view
PyMOL scene --> Jmol scene, including view, frame, visibilities, colors
using set LOGFILE, we can dump this to a readable form.
trajectories are not supported yet.
Basic idea is as follows:
1) Pickle file is read into a Hashtable.
2) Atoms, bonds, and structures are created, as per other readers, from MOLECULE objects
3) Rendering of atoms and bonds is interpreted as JmolObject objects via PyMOLScene
3) Other objects such as electron density maps, compiled graphical objects, and
measures are interpreted, creating more JmolObjects
3) JmolObjects are finalized after file reading takes place by a call from ModelLoader
back here to finalizeModelSet(), which runs PyMOLScene.setObjects, which runs JmolObject.finalizeObject.
TODO: Handle discrete objects, DiscreteAtmToIdx?
- Author:
- Bob Hanson hansonr@stolaf.edu
-
Field Summary
Fields inherited from class org.jmol.adapter.readers.pdb.PdbReader
biomtChainAtomCounts, fileAtomIndex, gromacsWideFormat, pdbIDFields 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 TypeMethodDescriptionbooleancompareAtoms(int iPrev, int i) voidAt the end of the day, we need to finalize all the JmolObjects, set the trajectories, and, if filtered with DOCACHE, cache a streamlined binary file for inclusion in the PNGJ file.protected voidintgetCartoonType(int iAtom) intgetSequenceNumber(int iAtom) intgetUniqueID(int iAtom) doublegetVDW(int iAtom) protected voidvoidprotected voidadaptable via subclassingprotected voidMethods inherited from class org.jmol.adapter.readers.pdb.PdbReader
checkLine, checkRemark, deduceElementSymbol, filterPDBAtom, finalizeReaderPDB, fixRadius, model, processAtom, processAtom2Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addMoreUnitCellInfo, addSites, addSiteScript, appendLoadNote, applySymmetryAndSetTrajectory, applySymTrajASCR, checkAndRemoveFilterKey, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, doPreSymmetry, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, 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, processDOM, 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, setupASCR, warnSkippingOperation
-
Constructor Details
-
PyMOLReader
public PyMOLReader()
-
-
Method Details
-
setup
- Overrides:
setupin classAtomSetCollectionReader
-
initializeReader
- Overrides:
initializeReaderin classPdbReader- Throws:
Exception
-
processBinaryDocument
- Overrides:
processBinaryDocumentin classAtomSetCollectionReader- Throws:
Exception
-
setAdditionalAtomParameters
Description copied from class:PdbReaderadaptable via subclassing- Overrides:
setAdditionalAtomParametersin classPdbReader- Parameters:
atom-
-
finalizeSubclassReader
- Overrides:
finalizeSubclassReaderin classPdbReader- Throws:
Exception
-
finalizeModelSet
public void finalizeModelSet()At the end of the day, we need to finalize all the JmolObjects, set the trajectories, and, if filtered with DOCACHE, cache a streamlined binary file for inclusion in the PNGJ file.- Overrides:
finalizeModelSetin classAtomSetCollectionReader
-
sublistAt
-
getUniqueID
public int getUniqueID(int iAtom) -
getCartoonType
public int getCartoonType(int iAtom) -
getVDW
public double getVDW(int iAtom) -
getSequenceNumber
public int getSequenceNumber(int iAtom) -
compareAtoms
public boolean compareAtoms(int iPrev, int i)
-