PyMOLReader
Date: 2019-10-22

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:
    javajs.api.GenericLineReader, PymolAtomReader

      public class PyMOLReader
      extends PdbReader
      implements 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
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac`
    `private int` | `ac0`
    `private boolean` | `allowSurface`
    `private boolean` | `allStates`
    `(package private) byte[]` | `aTemp`
    `private int[]` | `atomMap`
    `private Atom[]` | `atoms`
    `private int` | `baseModelIndex`
    `private int` | `bondCount`
    `private javajs.util.BS` | `bsBytesExcluded`
    `private javajs.util.BS` | `bsStructureDefined`
    `private boolean` | `doCache`
    `private boolean` | `doResize`
    `private int[]` | `frames`
    `private boolean` | `haveBinaryArrays`
    `private boolean` | `haveMeasurements`
    `private boolean` | `haveScenes`
    `private boolean` | `isHidden`
    `private boolean` | `isMovie`
    `private boolean` | `isStateScript`
    `private boolean` | `logging`
    `private javajs.util.Lst<javajs.util.Lst<java.lang.Object>>` | `mapObjects`
    `private static int` | `MIN_RESNO`
    `private int` | `nModels`
    `private static java.lang.String` | `nucleic`
    `private java.lang.String` | `objectName`
    `private javajs.util.P3` | `ptTemp`
    `private int` | `pymolFrame`
    `private PyMOLScene` | `pymolScene`
    `private int` | `pymolVersion`
    `private javajs.util.BS[]` | `reps`
    `private javajs.util.Lst<java.lang.Object>` | `sceneOrder`
    `private boolean` | `sourcePNGJ`
    `private java.util.Map<java.lang.String,javajs.util.BS>` | `ssMapSeq`
    `private int` | `stateCount`
    `private int` | `structureCount`
    `private int` | `totalAtomCount`
    `private int` | `trajectoryPtr`
    `private javajs.util.P3[]` | `trajectoryStep`
    `private java.util.Hashtable<java.lang.Integer,javajs.util.Lst<java.lang.Object>>` | `uniqueSettings`
    `private java.util.Map<java.lang.String,javajs.util.Lst<java.lang.Object>>` | `volumeData`
    `private javajs.util.P3` | `xyzMax`
    `private javajs.util.P3` | `xyzMin`

    - ### Fields inherited from class org.jmol.adapter.readers.pdb.PdbReader

      `biomtChainAtomCounts, fileAtomIndex, gromacsWideFormat`

    - ### Fields inherited from class org.jmol.adapter.smarter.AtomSetCollectionReader

      `addedData, addedDataKey, addVibrations, allowPDBFilter, ANGSTROMS_PER_BOHR, applySymmetryToBonds, asc, baseAtomIndex, binaryDoc, bsFilter, bsModels, calculationType, continuing, debugging, desiredModelNumber, desiredSpaceGroupIndex, desiredVibrationNumber, doApplySymmetry, doCentralize, doCheckUnitCell, doConvertToFractional, doPackUnitCell, doProcessLines, doReadMolecularOrbitals, dssr, fileName, fileOffset, filePath, fileScaling, fillRange, filter, filterHetero, fixJavaFloat, forcePacked, getHeader, haveAtomFilter, haveModel, havePartialChargeFilter, htParams, ignoreFileSpaceGroupName, ignoreFileSymmetryOperators, ignoreFileUnitCell, ignoreStructure, iHaveFractionalCoordinates, iHaveSymmetryOperators, iHaveUnitCell, isBinary, isConcatenated, isDSSP1, isFinalized, isMolecular, isPrimitive, isSequential, isTrajectory, latticeCells, latticeScaling, latticeType, line, lstNCS, matUnitCellOrientation, modDim, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, primitiveToCrystal, ptLine, ptSupercell, reader, readerName, requiresBSFilter, reverseModels, rotateHexCell, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `PyMOLReader()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private javajs.util.P3` | `addAtom(javajs.util.Lst<java.lang.Object> pymolAtoms, int apt, byte[] atomArray, int[] vArray, java.lang.String[] lexStr, int icoord, javajs.util.Lst<java.lang.Object> coords, float[] coordArray, javajs.util.Lst<java.lang.Object> labelPositions, float[] labelArray, javajs.util.BS bsState, int iState)`
    `private void` | `addBonds(javajs.util.Lst<Bond> bonds)`
    `private void` | `addColors(javajs.util.Lst<java.lang.Object> colors, boolean isClamped)` Add new colors from the main "colors" map object.
    `private void` | `addMolSS(java.lang.String ssType, STR type)` Secondary structure definition.
    `private void` | `addMolStructures()`
    `private boolean` | `atomBool(byte[] atomArray, int pt, int offset, int mask)`
    `private float` | `atomFloat(byte[] atomArray, int pt, int offset)`
    `private int` | `atomInt(byte[] atomArray, int pt, int offset)`
    `private java.lang.String` | `atomStr(byte[] atomArray, int pt, int offset, java.lang.String[] lexStr)`
    `private static java.lang.String` | `bytesToString(java.lang.Object object)`
    `private boolean` | `checkObject(javajs.util.Lst<java.lang.Object> execObject)`
    `(package private) static int` | `colorSettingClamped(javajs.util.Lst<java.lang.Object> c, javajs.util.P3 ptTemp)`
    `boolean` | `compareAtoms(int iPrev, int i)`
    `private void` | `createShapeObjects()` Create JmolObjects for all the molecular shapes; not executed for a state script.
    `private void` | `fillFloatArrayFromBytes(byte[] b, float[] array)`
    `private void` | `fillIntArrayFromBytes(byte[] b, int[] array)`
    `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.
    `private void` | `finalizeSceneData()` Make sure atom uniqueID (vectorX) and cartoonType (vectorY) are made permanent
    `protected void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `private static javajs.util.Lst<java.lang.Object>` | `fixMovieCommands(javajs.util.Lst<java.lang.Object> cmds)` Could possibly implement something here that interprets PyMOL script commands.
    `private static javajs.util.Lst<java.lang.Object>` | `fixMovieViews(javajs.util.Lst<java.lang.Object> views)` Could implement something here that creates a Jmol view.
    `private javajs.util.Lst<java.lang.Object>` | `fixSettings(javajs.util.Lst<java.lang.Object> settings)` Recent PyMOL files may not have all settings.
    `(package private) static float` | `floatAt(javajs.util.Lst<java.lang.Object> list, int i)`
    `(package private) static float[]` | `floatsAt(javajs.util.Lst<java.lang.Object> a, int pt, float[] data, int len)`
    `private void` | `getAtomAndStateCount(javajs.util.Lst<java.lang.Object> names)` Look through all named objects for molecules, counting atoms and also states; see if trajectories are compatible (experimental).
    `private javajs.util.Lst<Bond>` | `getBondList(javajs.util.Lst<java.lang.Object> bonds)` Create the bond set.
    `private static javajs.util.BS` | `getBsReps(javajs.util.Lst<java.lang.Object> list)`
    `int` | `getCartoonType(int iAtom)`
    `(package private) static int` | `getColorPt(java.lang.Object o, javajs.util.P3 ptTemp)`
    `private java.lang.String` | `getCStr(byte[] lex, int pt)`
    `private boolean` | `getFrameScenes(java.util.Map<java.lang.String,java.lang.Object> map)` remove all scenes that do not define a frame.
    `private java.lang.String[]` | `getLexStr(byte[] lex)`
    `private static javajs.util.Lst<java.lang.Object>` | `getMapList(java.util.Map<java.lang.String,java.lang.Object> map, java.lang.String key)`
    `int` | `getSequenceNumber(int iAtom)`
    `int` | `getUniqueID(int iAtom)`
    `float` | `getVDW(int iAtom)`
    `protected void` | `initializeReader()`
    `(package private) static int` | `intAt(javajs.util.Lst<java.lang.Object> list, int i)`
    `(package private) static javajs.util.Lst<java.lang.Object>` | `listAt(javajs.util.Lst<java.lang.Object> list, int i)`
    `(package private) static java.util.Map<java.lang.String,javajs.util.Lst<java.lang.Object>>` | `listToMap(javajs.util.Lst<java.lang.Object> list)` return a map of lists of the type: [ [name1,...], [name2,...], ...]
    `(package private) static javajs.util.P3` | `pointAt(javajs.util.Lst<java.lang.Object> list, int i, javajs.util.P3 pt)`
    `private void` | `process(java.util.Map<java.lang.String,java.lang.Object> map)` The main processor.
    `void` | `processBinaryDocument()`
    `private void` | `processCGO(javajs.util.Lst<java.lang.Object> pymolObject)` Create a CGO JmolObject, just passing on key information.
    `private void` | `processDefinitions()` Create a JmolObject that will define atom sets based on PyMOL objects
    `private void` | `processGadget(javajs.util.Lst<java.lang.Object> pymolObject)` Only process _e_pot objects -- which we need for color settings
    `private void` | `processMap(javajs.util.Lst<java.lang.Object> pymolObject, boolean isObject, boolean isGadget)` Create mapObjects and volumeData; create an ISOSURFACE JmolObject.
    `private void` | `processMeasure(javajs.util.Lst<java.lang.Object> pymolObject)` Create a MEASURE JmolObject.
    `private void` | `processMeshes()` Create mesh or mep JmolObjects.
    `private void` | `processMolCryst(javajs.util.Lst<java.lang.Object> cryst)` Pick up the crystal data.
    `private javajs.util.BS` | `processMolecule(javajs.util.Lst<java.lang.Object> pymolObject, int iState)` Create everything necessary to generate a molecule in Jmol.
    `private void` | `processMovie(javajs.util.Lst<java.lang.Object> mov, int frameCount)` Create a JmolObject that will represent the movie.
    `private void` | `processObject(javajs.util.Lst<java.lang.Object> execObject, boolean moleculeOnly, int iState)` The main object processor.
    `private void` | `processSelectionsAndScenes(java.util.Map<java.lang.String,java.lang.Object> map)` A PyMOL scene consists of one or more of: view frame visibilities, by object colors, by color reps, by type currently just extracts viewpoint
    `protected void` | `setAdditionalAtomParameters(Atom atom)` adaptable via subclassing
    `private int` | `setUniqueSettings(javajs.util.Lst<java.lang.Object> list)` Create uniqueSettings from the "unique_settings" map item.
    `protected void` | `setup(java.lang.String fullPath, java.util.Map<java.lang.String,java.lang.Object> htParams, java.lang.Object reader)`
    `(package private) static java.lang.String` | `stringAt(javajs.util.Lst<java.lang.Object> list, int i)`
    `static javajs.util.Lst<java.lang.Object>` | `sublistAt(javajs.util.Lst<java.lang.Object> mesh, int... pt)`

    - ### 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, 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, forceSymmetry, fractionalizeCoordinates, getElementSymbol, getFilter, getFortranFormatLengths, getInterface, getNewSymmetry, getStrings, getSymmetry, getTokens, getTokensFloat, initializeSymmetry, initializeSymmetryOptions, initializeTrajectoryFile, isLastModel, newAtomSet, parseFloat, parseFloatRange, parseFloatStr, parseInt, parseIntAt, parseIntRange, parseIntStr, 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, setSpaceGroupName, setSymmetryOperator, setTransform, setUnitCell, setUnitCellItem, setupASCR`

    - ### Methods inherited from class java.lang.Object

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

- - ### Field Detail

    - #### MIN_RESNO

          private static final int MIN_RESNO

      See Also:
        Constant Field Values

    - #### nucleic

          private static java.lang.String nucleic

    - #### allowSurface

          private boolean allowSurface

    - #### doResize

          private boolean doResize

    - #### doCache

          private boolean doCache

    - #### isStateScript

          private boolean isStateScript

    - #### sourcePNGJ

          private boolean sourcePNGJ

    - #### ac0

          private int ac0

    - #### ac

          private int ac

    - #### stateCount

          private int stateCount

    - #### structureCount

          private int structureCount

    - #### isHidden

          private boolean isHidden

    - #### bsStructureDefined

          private javajs.util.BS bsStructureDefined

    - #### bsBytesExcluded

          private javajs.util.BS bsBytesExcluded

    - #### atomMap

          private int[] atomMap

    - #### ssMapSeq

          private java.util.Map<java.lang.String,javajs.util.BS> ssMapSeq

    - #### pymolScene

          private PyMOLScene pymolScene

    - #### xyzMin

          private javajs.util.P3 xyzMin

    - #### xyzMax

          private javajs.util.P3 xyzMax

    - #### nModels

          private int nModels

    - #### logging

          private boolean logging

    - #### reps

          private javajs.util.BS[] reps

    - #### isMovie

          private boolean isMovie

    - #### pymolFrame

          private int pymolFrame

    - #### allStates

          private boolean allStates

    - #### totalAtomCount

          private int totalAtomCount

    - #### pymolVersion

          private int pymolVersion

    - #### trajectoryStep

          private javajs.util.P3[] trajectoryStep

    - #### trajectoryPtr

          private int trajectoryPtr

    - #### objectName

          private java.lang.String objectName

    - #### volumeData

          private java.util.Map<java.lang.String,javajs.util.Lst<java.lang.Object>> volumeData

    - #### mapObjects

          private javajs.util.Lst<javajs.util.Lst<java.lang.Object>> mapObjects

    - #### haveMeasurements

          private boolean haveMeasurements

    - #### frames

          private int[] frames

    - #### uniqueSettings

          private java.util.Hashtable<java.lang.Integer,javajs.util.Lst<java.lang.Object>> uniqueSettings

    - #### atoms

          private Atom[] atoms

    - #### haveScenes

          private boolean haveScenes

    - #### baseModelIndex

          private int baseModelIndex

    - #### sceneOrder

          private javajs.util.Lst<java.lang.Object> sceneOrder

    - #### bondCount

          private int bondCount

    - #### haveBinaryArrays

          private boolean haveBinaryArrays

    - #### ptTemp

          private final javajs.util.P3 ptTemp

    - #### aTemp

          byte[] aTemp

  - ### Constructor Detail

    - #### PyMOLReader

          public PyMOLReader()

  - ### Method Detail

    - #### setup

          protected void setup(java.lang.String fullPath,
                               java.util.Map<java.lang.String,java.lang.Object> htParams,
                               java.lang.Object reader)

      Overrides:
        `setup` in class `AtomSetCollectionReader`

    - #### initializeReader

          protected void initializeReader()
                                   throws java.lang.Exception

      Overrides:
        `initializeReader` in class `PdbReader`
      Throws:
        `java.lang.Exception`

    - #### processBinaryDocument

          public void processBinaryDocument()
                                     throws java.lang.Exception

      Overrides:
        `processBinaryDocument` in class `AtomSetCollectionReader`
      Throws:
        `java.lang.Exception`

    - #### setAdditionalAtomParameters

          protected void setAdditionalAtomParameters(Atom atom)

      Description copied from class: `PdbReader`
      adaptable via subclassing
      Overrides:
        `setAdditionalAtomParameters` in class `PdbReader`

    - #### finalizeSubclassReader

          protected void finalizeSubclassReader()
                                         throws java.lang.Exception

      Description copied from class: `AtomSetCollectionReader`
      optional reader-specific method run first.
      Overrides:
        `finalizeSubclassReader` in class `PdbReader`
      Throws:
        `java.lang.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 class `AtomSetCollectionReader`

    - #### process

          private void process(java.util.Map<java.lang.String,java.lang.Object> map)

      The main processor.
      Parameters:
        `map` -

    - #### fixSettings

          private javajs.util.Lst<java.lang.Object> fixSettings(javajs.util.Lst<java.lang.Object> settings)

      Recent PyMOL files may not have all settings. For now, we just add null values;
      Parameters:
        `settings` -
      Returns:
        settings

    - #### getFrameScenes

          private boolean getFrameScenes(java.util.Map<java.lang.String,java.lang.Object> map)

      remove all scenes that do not define a frame.
      Parameters:
        `map` -
      Returns:
        true if there are scenes that define a frame

    - #### setUniqueSettings

          private int setUniqueSettings(javajs.util.Lst<java.lang.Object> list)

      Create uniqueSettings from the "unique_settings" map item. This will be used later in processing molecule objects.
      Parameters:
        `list` -
      Returns:
        max id

    - #### addColors

          private void addColors(javajs.util.Lst<java.lang.Object> colors,
                                 boolean isClamped)

      Add new colors from the main "colors" map object. Not 100% clear how color clamping works.
      Parameters:
        `colors` -
        `isClamped` -

    - #### getAtomAndStateCount

          private void getAtomAndStateCount(javajs.util.Lst<java.lang.Object> names)

      Look through all named objects for molecules, counting atoms and also states; see if trajectories are compatible (experimental).
      Parameters:
        `names` -

    - #### checkObject

          private boolean checkObject(javajs.util.Lst<java.lang.Object> execObject)

    - #### processMovie

          private void processMovie(javajs.util.Lst<java.lang.Object> mov,
                                    int frameCount)

      Create a JmolObject that will represent the movie. For now, only process unscripted movies without views.
      Parameters:
        `mov` -
        `frameCount` -

    - #### fixMovieViews

          private static javajs.util.Lst<java.lang.Object> fixMovieViews(javajs.util.Lst<java.lang.Object> views)

      Could implement something here that creates a Jmol view.
      Parameters:
        `views` -
      Returns:
        new views

    - #### fixMovieCommands

          private static javajs.util.Lst<java.lang.Object> fixMovieCommands(javajs.util.Lst<java.lang.Object> cmds)

      Could possibly implement something here that interprets PyMOL script commands.
      Parameters:
        `cmds` -
      Returns:
        new cmds

    - #### processObject

          private void processObject(javajs.util.Lst<java.lang.Object> execObject,
                                     boolean moleculeOnly,
                                     int iState)

      The main object processor. Not implemented: ALIGNMENT, CALLBACK, SLICE, SURFACE
      Parameters:
        `execObject` -
        `moleculeOnly` -
        `iState` -

    - #### processCGO

          private void processCGO(javajs.util.Lst<java.lang.Object> pymolObject)

      Create a CGO JmolObject, just passing on key information.
      Parameters:
        `pymolObject` -

    - #### processGadget

          private void processGadget(javajs.util.Lst<java.lang.Object> pymolObject)

      Only process _e_pot objects -- which we need for color settings
      Parameters:
        `pymolObject` -

    - #### processMap

          private void processMap(javajs.util.Lst<java.lang.Object> pymolObject,
                                  boolean isObject,
                                  boolean isGadget)

      Create mapObjects and volumeData; create an ISOSURFACE JmolObject.
      Parameters:
        `pymolObject` -
        `isObject` -
        `isGadget` -

    - #### processMeasure

          private void processMeasure(javajs.util.Lst<java.lang.Object> pymolObject)

      Create a MEASURE JmolObject.
      Parameters:
        `pymolObject` -

    - #### processMolecule

          private javajs.util.BS processMolecule(javajs.util.Lst<java.lang.Object> pymolObject,
                                                 int iState)

      Create everything necessary to generate a molecule in Jmol.
      Parameters:
        `pymolObject` -
        `iState` -
      Returns:
        atom set only if this is a trajectory.

    - #### getLexStr

          private java.lang.String[] getLexStr(byte[] lex)

    - #### getCStr

          private java.lang.String getCStr(byte[] lex,
                                           int pt)

    - #### processMolCryst

          private void processMolCryst(javajs.util.Lst<java.lang.Object> cryst)

      Pick up the crystal data.
      Parameters:
        `cryst` -

    - #### getBondList

          private javajs.util.Lst<Bond> getBondList(javajs.util.Lst<java.lang.Object> bonds)

      Create the bond set.
      Parameters:
        `bonds` -
      Returns:
        list of bonds

    - #### fillIntArrayFromBytes

          private void fillIntArrayFromBytes(byte[] b,
                                             int[] array)

    - #### fillFloatArrayFromBytes

          private void fillFloatArrayFromBytes(byte[] b,
                                               float[] array)

    - #### addAtom

          private javajs.util.P3 addAtom(javajs.util.Lst<java.lang.Object> pymolAtoms,
                                         int apt,
                                         byte[] atomArray,
                                         int[] vArray,
                                         java.lang.String[] lexStr,
                                         int icoord,
                                         javajs.util.Lst<java.lang.Object> coords,
                                         float[] coordArray,
                                         javajs.util.Lst<java.lang.Object> labelPositions,
                                         float[] labelArray,
                                         javajs.util.BS bsState,
                                         int iState)

      Parameters:
        `pymolAtoms` - list of atom details
        `apt` - array pointer into pymolAtoms
        `atomArray` -
        `vArray` -
        `lexStr` -
        `icoord` - array pointer into coords (/3)
        `coords` - coordinates array
        `coordArray` -
        `labelPositions` -
        `labelArray` -
        `bsState` - this state -- Jmol atomIndex
        `iState` -
      Returns:
        true if successful

    - #### atomBool

          private boolean atomBool(byte[] atomArray,
                                   int pt,
                                   int offset,
                                   int mask)

    - #### atomFloat

          private float atomFloat(byte[] atomArray,
                                  int pt,
                                  int offset)

    - #### atomStr

          private java.lang.String atomStr(byte[] atomArray,
                                           int pt,
                                           int offset,
                                           java.lang.String[] lexStr)

    - #### atomInt

          private int atomInt(byte[] atomArray,
                              int pt,
                              int offset)

    - #### addBonds

          private void addBonds(javajs.util.Lst<Bond> bonds)

    - #### addMolStructures

          private void addMolStructures()

    - #### addMolSS

          private void addMolSS(java.lang.String ssType,
                                STR type)

      Secondary structure definition.
      Parameters:
        `ssType` -
        `type` -

    - #### createShapeObjects

          private void createShapeObjects()

      Create JmolObjects for all the molecular shapes; not executed for a state script.

    - #### processMeshes

          private void processMeshes()

      Create mesh or mep JmolObjects. Caching the volumeData, because it will be needed by org.jmol.jvxl.readers.PyMOLMeshReader

    - #### processDefinitions

          private void processDefinitions()

      Create a JmolObject that will define atom sets based on PyMOL objects

    - #### processSelectionsAndScenes

          private void processSelectionsAndScenes(java.util.Map<java.lang.String,java.lang.Object> map)

      A PyMOL scene consists of one or more of: view frame visibilities, by object colors, by color reps, by type currently just extracts viewpoint
      Parameters:
        `map` -

    - #### finalizeSceneData

          private void finalizeSceneData()

      Make sure atom uniqueID (vectorX) and cartoonType (vectorY) are made permanent

    - #### intAt

          static int intAt(javajs.util.Lst<java.lang.Object> list,
                           int i)

    - #### pointAt

          static javajs.util.P3 pointAt(javajs.util.Lst<java.lang.Object> list,
                                        int i,
                                        javajs.util.P3 pt)

    - #### floatsAt

          static float[] floatsAt(javajs.util.Lst<java.lang.Object> a,
                                  int pt,
                                  float[] data,
                                  int len)

    - #### floatAt

          static float floatAt(javajs.util.Lst<java.lang.Object> list,
                               int i)

    - #### listAt

          static javajs.util.Lst<java.lang.Object> listAt(javajs.util.Lst<java.lang.Object> list,
                                                          int i)

    - #### sublistAt

          public static javajs.util.Lst<java.lang.Object> sublistAt(javajs.util.Lst<java.lang.Object> mesh,
                                                                    int... pt)

    - #### listToMap

          static java.util.Map<java.lang.String,javajs.util.Lst<java.lang.Object>> listToMap(javajs.util.Lst<java.lang.Object> list)

      return a map of lists of the type: [ [name1,...], [name2,...], ...]
      Parameters:
        `list` -
      Returns:
        Hashtable

    - #### stringAt

          static java.lang.String stringAt(javajs.util.Lst<java.lang.Object> list,
                                           int i)

    - #### bytesToString

          private static java.lang.String bytesToString(java.lang.Object object)

    - #### colorSettingClamped

          static int colorSettingClamped(javajs.util.Lst<java.lang.Object> c,
                                         javajs.util.P3 ptTemp)

    - #### getColorPt

          static int getColorPt(java.lang.Object o,
                                javajs.util.P3 ptTemp)

    - #### getMapList

          private static javajs.util.Lst<java.lang.Object> getMapList(java.util.Map<java.lang.String,java.lang.Object> map,
                                                                      java.lang.String key)

    - #### getBsReps

          private static javajs.util.BS getBsReps(javajs.util.Lst<java.lang.Object> list)

    - #### getUniqueID

          public int getUniqueID(int iAtom)

      Specified by:
        `getUniqueID` in interface `PymolAtomReader`

    - #### getCartoonType

          public int getCartoonType(int iAtom)

      Specified by:
        `getCartoonType` in interface `PymolAtomReader`

    - #### getVDW

          public float getVDW(int iAtom)

      Specified by:
        `getVDW` in interface `PymolAtomReader`

    - #### getSequenceNumber

          public int getSequenceNumber(int iAtom)

      Specified by:
        `getSequenceNumber` in interface `PymolAtomReader`

    - #### compareAtoms

          public boolean compareAtoms(int iPrev,
                                      int i)

      Specified by:
        `compareAtoms` in interface `PymolAtomReader`