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
,PymolAtomReader
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, pdbID
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 TypeMethodDescriptionboolean
compareAtoms
(int iPrev, int i) void
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.protected void
int
getCartoonType
(int iAtom) int
getSequenceNumber
(int iAtom) int
getUniqueID
(int iAtom) float
getVDW
(int iAtom) protected void
void
protected void
adaptable via subclassingprotected void
Methods inherited from class org.jmol.adapter.readers.pdb.PdbReader
checkLine, checkRemark, deduceElementSymbol, filterPDBAtom, finalizeReaderPDB, fixRadius, model, processAtom, processAtom2
Methods inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader
addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, 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
-
Constructor Details
-
PyMOLReader
public PyMOLReader()
-
-
Method Details
-
setup
- Overrides:
setup
in classAtomSetCollectionReader
-
initializeReader
- Overrides:
initializeReader
in classPdbReader
- Throws:
Exception
-
processBinaryDocument
- Overrides:
processBinaryDocument
in classAtomSetCollectionReader
- Throws:
Exception
-
setAdditionalAtomParameters
Description copied from class:PdbReader
adaptable via subclassing- Overrides:
setAdditionalAtomParameters
in classPdbReader
- Parameters:
atom
-
-
finalizeSubclassReader
- Overrides:
finalizeSubclassReader
in 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:
finalizeModelSet
in classAtomSetCollectionReader
-
sublistAt
-
getUniqueID
public int getUniqueID(int iAtom) - Specified by:
getUniqueID
in interfacePymolAtomReader
-
getCartoonType
public int getCartoonType(int iAtom) - Specified by:
getCartoonType
in interfacePymolAtomReader
-
getVDW
public float getVDW(int iAtom) - Specified by:
getVDW
in interfacePymolAtomReader
-
getSequenceNumber
public int getSequenceNumber(int iAtom) - Specified by:
getSequenceNumber
in interfacePymolAtomReader
-
compareAtoms
public boolean compareAtoms(int iPrev, int i) - Specified by:
compareAtoms
in interfacePymolAtomReader
-