GulpReader
Date: 2019-10-22

org.jmol.adapter.readers.xtal

## Class GulpReader

- java.lang.Object
- - org.jmol.adapter.smarter.AtomSetCollectionReader
  - - org.jmol.adapter.readers.xtal.GulpReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class GulpReader
      extends AtomSetCollectionReader

  Problems identified (Bob Hanson) -- -- Coordinates for the asymmetric unit are conventional. Default right now is to read conventional cell, not primitive celll -- Frequency data number of atoms does not correspond to initial atom count. It looks like there is a missing report of symmetry-generated atoms. see https://projects.ivec.org/gulp/
  Version:
    1.0
  Author:
    Pieremanuele Canepa, Room 104, FM Group School of Physical Sciences, Ingram Building, University of Kent, Canterbury, Kent, CT2 7NH United Kingdom, pc229@kent.ac.uk

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private float` | `a`
    `private float` | `alpha`
    `private java.util.Map<java.lang.String,java.lang.Float>` | `atomCharges`
    `private float` | `b`
    `private float` | `beta`
    `private boolean` | `bTest`
    `private float` | `c`
    `private boolean` | `coordinatesArePrimitive`
    `private java.lang.String` | `energyUnits`
    `private float` | `gamma`
    `private boolean` | `isPolymer`
    `private boolean` | `isPrimitive`
    `private boolean` | `isSlab`
    `private float[]` | `primitiveData`
    `private java.lang.String` | `sep`
    `private static java.lang.String[]` | `tags`
    `private java.lang.Double` | `totEnergy`

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

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `applySymmetryAndSetTrajectory()`
    `protected boolean` | `checkLine()`
    `protected void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `protected void` | `initializeReader()`
    `private void` | `newAtomSet(boolean doSetUnitCell)`
    `private static int` | `parameterIndex(java.lang.String key)`
    `private void` | `readAtomicPos(boolean finalizeSymmetry)`
    `private void` | `readCellParameters(boolean isLatticeVectors)`
    `private boolean` | `readDimensionality()`
    `private void` | `readEnergy()`
    `private void` | `readFinalCell()`
    `private void` | `readPartialCharges()`
    `private void` | `readSpaceGroup()`
    `private void` | `scalePrimitiveData(int i, float value)`
    `private void` | `setEnergy()`
    `private void` | `setModelParameters(boolean isPrimitive)`
    `private void` | `setParameter(java.lang.String key, float value)`

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

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

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

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

- - ### Field Detail

    - #### isSlab

          private boolean isSlab

    - #### isPolymer

          private boolean isPolymer

    - #### isPrimitive

          private boolean isPrimitive

    - #### sep

          private java.lang.String sep

    - #### coordinatesArePrimitive

          private boolean coordinatesArePrimitive

    - #### atomCharges

          private java.util.Map<java.lang.String,java.lang.Float> atomCharges

    - #### bTest

          private boolean bTest

    - #### a

          private float a

    - #### b

          private float b

    - #### c

          private float c

    - #### alpha

          private float alpha

    - #### beta

          private float beta

    - #### gamma

          private float gamma

    - #### primitiveData

          private float[] primitiveData

    - #### tags

          private static final java.lang.String[] tags

    - #### totEnergy

          private java.lang.Double totEnergy

    - #### energyUnits

          private java.lang.String energyUnits

  - ### Constructor Detail

    - #### GulpReader

          public GulpReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()
                                   throws java.lang.Exception

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

    - #### finalizeSubclassReader

          protected void finalizeSubclassReader()

      Description copied from class: `AtomSetCollectionReader`
      optional reader-specific method run first.
      Overrides:
        `finalizeSubclassReader` in class `AtomSetCollectionReader`

    - #### checkLine

          protected boolean checkLine()
                               throws java.lang.Exception

      Overrides:
        `checkLine` in class `AtomSetCollectionReader`
      Returns:
        true if need to read new line
      Throws:
        `java.lang.Exception`

    - #### readDimensionality

          private boolean readDimensionality()
                                      throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readSpaceGroup

          private void readSpaceGroup()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### parameterIndex

          private static int parameterIndex(java.lang.String key)

    - #### setParameter

          private void setParameter(java.lang.String key,
                                    float value)

    - #### newAtomSet

          private void newAtomSet(boolean doSetUnitCell)

    - #### setModelParameters

          private void setModelParameters(boolean isPrimitive)

    - #### readCellParameters

          private void readCellParameters(boolean isLatticeVectors)
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readFinalCell

          private void readFinalCell()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### scalePrimitiveData

          private void scalePrimitiveData(int i,
                                          float value)

    - #### applySymmetryAndSetTrajectory

          public void applySymmetryAndSetTrajectory()
                                             throws java.lang.Exception

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

    - #### readAtomicPos

          private void readAtomicPos(boolean finalizeSymmetry)
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readPartialCharges

          private void readPartialCharges()
                                   throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readEnergy

          private void readEnergy()
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setEnergy

          private void setEnergy()