MMTFReader
Date: 2019-10-22

org.jmol.adapter.readers.cif

## Class MMTFReader

- java.lang.Object
- - org.jmol.adapter.smarter.AtomSetCollectionReader
  - - org.jmol.adapter.readers.cif.CifReader
    - - org.jmol.adapter.readers.cif.MMCifReader
      - - org.jmol.adapter.readers.cif.MMTFReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class MMTFReader
      extends MMCifReader

  JmolData RCSB MMTF (macromolecular transmission format) file reader see https://github.com/rcsb/mmtf/blob/master/spec.md full specification Version: v0.2+dev (as of 2016.08.08) is implemented,including: reading atoms, bonds, and DSSP 1.0 secondary structure load =1f88.mmtf filter "DSSP1" [Note that the filter "DSSP1" is required, since mmtf included DSSP 1.0 calculations, while the standard for Jmol itself is DSSP 2.0. These two calculations differ in their treating of helix kinks as one (1.0) or two (2.0) helices.] reading space groups and unit cells, and using those as per other readers load =1crn.mmtf {1 1 1} reading bioassemblies (biomolecules) and applying all symmetry transformations load =1auy.mmtf FILTER "biomolecule 1;*.CA,*.P" reading both biomolecules and lattices, and loading course-grained using the filter "BYCHAIN" or "BYSYMOP" load =1auy.mmtf {2 2 1} filter "biomolecule 1;bychain";spacefill 30.0; color property symop Many thanks to the MMTF team at RCSB for assistance in this implementation.
  Author:
    Bob Hanson hansonr@stolaf.edu

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private int` | `ac0`
    `private int[]` | `atomGroup`
    `private Atom[]` | `atomMap`
    `private javajs.util.BS[]` | `bsStructures`
    `private java.lang.Object[]` | `entities`
    `private int` | `fileAtomCount`
    `private int` | `groupCount`
    `private int[]` | `groupDSSP`
    `private int[]` | `groupMap`
    `private int[]` | `groupModels`
    `private boolean` | `haveStructure`
    `private java.lang.String[]` | `labelAsymList`
    `private int` | `lastGroup`
    `private java.util.Map<java.lang.String,java.lang.Object>` | `map`
    `private int` | `opCount`
    `private java.lang.String` | `pdbID`

    - ### Fields inherited from class org.jmol.adapter.readers.cif.MMCifReader

      `done, htHetero, htSites, isBiomolecule, mident, vBiomolecules`

    - ### Fields inherited from class org.jmol.adapter.readers.cif.CifReader

      `ac, col2key, data, FAMILY_ATOM, field, firstChar, haveCellWaveVector, haveHAtoms, htGroup1, iHaveDesiredModel, isCourseGrained, isLigand, isMagCIF, isMMCIF, key, key0, key2col, lastDataSetName, maxSerial, modelMap, nAtoms, nAtoms0, NONE, parser, skipping, thisDataSetName, useAuthorChainID`

    - ### 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, 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
    `MMTFReader()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected void` | `addHeader()`
    `private void` | `addMMTFBonds(int[] bo, int[] bi, int a0, boolean doMulti, boolean isInter)`
    `private void` | `addStructureSymmetry()` We must add groups to the proper bsStructure element
    `void` | `applySymmetryAndSetTrajectory()`
    `private java.lang.Object` | `decode(java.lang.String key)`
    `private void` | `getMMTFAtoms(boolean doMulti)` set up all atoms, including bonding, within a group
    `private void` | `getMMTFBioAssembly()`
    `private void` | `getStructure()` Get and translate the DSSP string from digit format input data
    `protected void` | `processBinaryDocument()`
    `private void` | `setMMTFSymmetry()`
    `protected void` | `setup(java.lang.String fullPath, java.util.Map<java.lang.String,java.lang.Object> htParams, java.lang.Object reader)` standard set up

    - ### Methods inherited from class org.jmol.adapter.readers.cif.MMCifReader

      `addAssembly, addHetero, addMatrix, checkFilterAssembly, checkPDBModelField, checkSubclassSymmetry, finalizeSubclass, incrementModel, initSubclass, processSubclassAtom, processSubclassEntry, processSubclassLoopBlock, sortAssemblyModels`

    - ### Methods inherited from class org.jmol.adapter.readers.cif.CifReader

      `checkAllFieldsPresent, doPreSymmetry, fieldProperty, filterCIFAtom, finalizeSubclassReader, finalizeSubclassSymmetry, getBondOrder, getCifDataParser, getField, initializeReader, isNull, newModel, nextAtomSet, parseLoopParameters, parseLoopParametersFor, processAtomSiteLoopBlock, processLoopBlock`

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

      `addAtomXYZSymName, addExplicitLatticeVector, addJmolScript, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLine, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, fill3x3, fillDataBlock, fillDataBlockFixed, fillFloatArray, fillFrequencyData, filterAtom, filterReject, finalizeMOData, finalizeModelSet, finalizeReaderASCR, 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

    - #### haveStructure

          private boolean haveStructure

    - #### pdbID

          private java.lang.String pdbID

    - #### map

          private java.util.Map<java.lang.String,java.lang.Object> map

    - #### fileAtomCount

          private int fileAtomCount

    - #### opCount

          private int opCount

    - #### groupModels

          private int[] groupModels

    - #### groupMap

          private int[] groupMap

    - #### groupDSSP

          private int[] groupDSSP

    - #### atomGroup

          private int[] atomGroup

    - #### labelAsymList

          private java.lang.String[] labelAsymList

    - #### atomMap

          private Atom[] atomMap

    - #### entities

          private java.lang.Object[] entities

    - #### groupCount

          private int groupCount

    - #### ac0

          private int ac0

    - #### bsStructures

          private javajs.util.BS[] bsStructures

    - #### lastGroup

          private int lastGroup

  - ### Constructor Detail

    - #### MMTFReader

          public MMTFReader()

  - ### Method Detail

    - #### addHeader

          protected void addHeader()

      Overrides:
        `addHeader` in class `CifReader`

    - #### setup

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

      standard set up
      Overrides:
        `setup` in class `AtomSetCollectionReader`
      Parameters:
        `fullPath` -
        `htParams` -
        `reader` -

    - #### processBinaryDocument

          protected void processBinaryDocument()
                                        throws java.lang.Exception

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

    - #### applySymmetryAndSetTrajectory

          public void applySymmetryAndSetTrajectory()
                                             throws java.lang.Exception

      Overrides:
        `applySymmetryAndSetTrajectory` in class `CifReader`
      Throws:
        `java.lang.Exception`

    - #### getMMTFAtoms

          private void getMMTFAtoms(boolean doMulti)
                             throws java.lang.Exception

      set up all atoms, including bonding, within a group
      Parameters:
        `doMulti` - true to add double bonds
      Throws:
        `java.lang.Exception`

    - #### addMMTFBonds

          private void addMMTFBonds(int[] bo,
                                    int[] bi,
                                    int a0,
                                    boolean doMulti,
                                    boolean isInter)

    - #### setMMTFSymmetry

          private void setMMTFSymmetry()

    - #### getMMTFBioAssembly

          private void getMMTFBioAssembly()

    - #### getStructure

          private void getStructure()

      Get and translate the DSSP string from digit format input data

    - #### addStructureSymmetry

          private void addStructureSymmetry()

      We must add groups to the proper bsStructure element

    - #### decode

          private java.lang.Object decode(java.lang.String key)