AFLOWReader
Date: 2019-10-22

org.jmol.adapter.readers.more

## Class AFLOWReader

- java.lang.Object
- - org.jmol.adapter.smarter.AtomSetCollectionReader
  - - org.jmol.adapter.readers.xtal.VaspPoscarReader
    - - org.jmol.adapter.readers.more.AFLOWReader

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class AFLOWReader
      extends VaspPoscarReader

  A reader for various AFLOW file types. For starters, we have output from the binaries page. see http://www.aflowlib.org/binary_alloys.php or, in Jmol, from: print load("http://aflowlib.mems.duke.edu/php/apool.php?POST?job=awrapper_apool&lattice=all&alloy=AgAu") Unit cells are centered. Selected compositions can be obtained using the filter "Ca=0.5" for example.
  Version:
    1.0
  Author:
    Bob Hanson

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private java.lang.String` | `aabb`
    `private java.util.Map<java.lang.String,float[]>` | `compositions`
    `private int` | `fileModelNumber`
    `private float` | `fracB`
    `private boolean` | `getComposition`
    `private boolean` | `havePRE`
    `private java.util.Map<java.lang.String,java.lang.String>` | `keyMap`
    `private java.lang.String` | `listKey`
    `private java.lang.String` | `listKeyCase`
    `private boolean` | `readPRE`
    `private java.lang.String` | `titleMsg`

    - ### Fields inherited from class org.jmol.adapter.readers.xtal.VaspPoscarReader

      `ac, atomLabels, defaultLabels, elementLabel, quiet, title`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `alignUnitCells()`
    `protected boolean` | `checkLine()`
    `private java.lang.String` | `cleanKey(java.lang.String key)` cleans key to just letters and digits
    `private void` | `finalizeModel()`
    `protected void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `private boolean` | `getData()`
    `protected void` | `initializeReader()`
    `private void` | `listCompositions()`
    `private void` | `readElementLabelsOnly()` scan the AFLOWReader PRE structure for elements in coord section
    `private boolean` | `readPrePost()`

    - ### Methods inherited from class org.jmol.adapter.readers.xtal.VaspPoscarReader

      `getElement, rdline, readCoordinates, readMolecularFormula, readStructure, readUnitCellVectors`

    - ### 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, 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

    - #### aabb

          private java.lang.String aabb

    - #### readPRE

          private boolean readPRE

    - #### fracB

          private float fracB

    - #### compositions

          private java.util.Map<java.lang.String,float[]> compositions

    - #### getComposition

          private boolean getComposition

    - #### listKey

          private java.lang.String listKey

    - #### listKeyCase

          private java.lang.String listKeyCase

    - #### fileModelNumber

          private int fileModelNumber

    - #### havePRE

          private boolean havePRE

    - #### titleMsg

          private java.lang.String titleMsg

    - #### keyMap

          private java.util.Map<java.lang.String,java.lang.String> keyMap

  - ### Constructor Detail

    - #### AFLOWReader

          public AFLOWReader()

  - ### Method Detail

    - #### initializeReader

          protected void initializeReader()
                                   throws java.lang.Exception

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

    - #### 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`

    - #### readPrePost

          private boolean readPrePost()
                               throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### finalizeModel

          private void finalizeModel()
                              throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### readElementLabelsOnly

          private void readElementLabelsOnly()
                                      throws java.lang.Exception

      scan the AFLOWReader PRE structure for elements in coord section
      Throws:
        `java.lang.Exception`

    - #### getData

          private boolean getData()
                           throws java.lang.Exception

      Throws:
        `java.lang.Exception`

    - #### cleanKey

          private java.lang.String cleanKey(java.lang.String key)

      cleans key to just letters and digits
      Parameters:
        `key` -
      Returns:
        cleaned key

    - #### finalizeSubclassReader

          protected void finalizeSubclassReader()
                                         throws java.lang.Exception

      Description copied from class: `AtomSetCollectionReader`
      optional reader-specific method run first.
      Overrides:
        `finalizeSubclassReader` in class `VaspPoscarReader`
      Throws:
        `java.lang.Exception`

    - #### listCompositions

          private void listCompositions()

    - #### alignUnitCells

          private void alignUnitCells()