SiestaReader
Date: 2019-10-22

org.jmol.adapter.readers.xtal

## Class SiestaReader

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

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class SiestaReader
      extends AtomSetCollectionReader

  SIESTA http://www.icmab.es/siesta/
  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 static double` | `ACF_ANG`
    `private static double` | `ACF_BOHR`
    `private static double` | `ACF_M`
    `private static double` | `ACF_NM`
    `private float` | `acfFactor`
    `private java.lang.String` | `acfUnits`
    `(package private) java.util.Map<java.lang.String,java.lang.String[]>` | `htSpecies`
    `private float` | `latticeConstant`
    `private java.lang.String` | `latticeUnits`
    `private int` | `noAtoms`
    `private int` | `state`
    `private int` | `STATE_INPUT`
    `private int` | `STATE_OUTPUT`
    `private int` | `STATE_UNKNOWN`
    `private java.lang.String[]` | `tokens`
    `private float[]` | `unitCellParamsS`
    `private float[]` | `unitCellVectors`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `checkLine()`
    `private java.lang.String` | `fixToken(int i)`
    `private float` | `getACFValue(float v)`
    `protected void` | `initializeReader()`
    `private void` | `newAtomSet()`
    `java.lang.String` | `rdSiesta()`
    `private void` | `readAtomicCoordinatesFormat()`
    `private boolean` | `readAtoms()`
    `private void` | `readAtomsCartGeomThenCell()`
    `private boolean` | `readBlock(java.lang.String key)`
    `private boolean` | `readSpecies()`
    `private void` | `readValue(java.lang.String key)`
    `void` | `setAtomCoordXYZ(Atom atom, float x, float y, float z)`
    `private boolean` | `setCell(java.lang.String key)`
    `private void` | `skipModel()`

    - ### 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, finalizeModelSet, finalizeReaderASCR, finalizeSubclassReader, 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, 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

    - #### noAtoms

          private int noAtoms

    - #### acfUnits

          private java.lang.String acfUnits

    - #### tokens

          private java.lang.String[] tokens

    - #### STATE_UNKNOWN

          private final int STATE_UNKNOWN

      See Also:
        Constant Field Values

    - #### STATE_INPUT

          private final int STATE_INPUT

      See Also:
        Constant Field Values

    - #### STATE_OUTPUT

          private final int STATE_OUTPUT

      See Also:
        Constant Field Values

    - #### state

          private int state

    - #### acfFactor

          private float acfFactor

    - #### htSpecies

          java.util.Map<java.lang.String,java.lang.String[]> htSpecies

    - #### unitCellVectors

          private float[] unitCellVectors

    - #### unitCellParamsS

          private float[] unitCellParamsS

    - #### latticeConstant

          private float latticeConstant

    - #### latticeUnits

          private java.lang.String latticeUnits

    - #### ACF_M

          private static final double ACF_M

      See Also:
        Constant Field Values

    - #### ACF_NM

          private static final double ACF_NM

      See Also:
        Constant Field Values

    - #### ACF_ANG

          private static final double ACF_ANG

      See Also:
        Constant Field Values

    - #### ACF_BOHR

          private static final double ACF_BOHR

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### SiestaReader

          public SiestaReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()

      Overrides:
        `initializeReader` 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`

    - #### readValue

          private void readValue(java.lang.String key)
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readBlock

          private boolean readBlock(java.lang.String key)
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readSpecies

          private boolean readSpecies()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### fixToken

          private java.lang.String fixToken(int i)

    - #### rdSiesta

          public java.lang.String rdSiesta()
                                    throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### getACFValue

          private float getACFValue(float v)

    - #### readAtomicCoordinatesFormat

          private void readAtomicCoordinatesFormat()

    - #### skipModel

          private void skipModel()
                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setCell

          private boolean setCell(java.lang.String key)
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readAtoms

          private boolean readAtoms()
                             throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### setAtomCoordXYZ

          public void setAtomCoordXYZ(Atom atom,
                                      float x,
                                      float y,
                                      float z)

      Overrides:
        `setAtomCoordXYZ` in class `AtomSetCollectionReader`

    - #### newAtomSet

          private void newAtomSet()
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readAtomsCartGeomThenCell

          private void readAtomsCartGeomThenCell()
                                          throws java.lang.Exception

      Throws:
        `java.lang.Exception`