CgdReader
Date: 2019-10-22

org.jmol.adapter.readers.xtal

## Class CgdReader

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

- All Implemented Interfaces:
    javajs.api.GenericLineReader

      public class CgdReader
      extends AtomSetCollectionReader

  A reader for TOPOS systre file Crystal Graph Data format. http://www.topos.samsu.ru/manuals.html http://gavrog.org/Systre-Help.html#file_formats H-M aliases from gavrov distribution geometry/sgtable.data

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private javajs.util.Lst<java.lang.String>` | `edgeData`
    `private java.util.Map<Atom,javajs.util.V3[]>` | `htEdges`
    `private java.lang.String` | `lastName`
    `private boolean` | `noBondSym`
    `private static java.lang.String` | `SG_ALIASES`
    `private java.lang.String[]` | `tokens`
    `private static javajs.util.V3[]` | `vecs`

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

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `private void` | `atom()`
    `protected boolean` | `checkLine()`
    `private void` | `finalizeEdges()` Now that we have all the edge data we can add edges to atoms
    `private void` | `finalizeNet()` Using atom.vib as a proxy indicating rotation, make all the bonds indicated in the atom's htEdges
    `void` | `finalizeSubclassReader()` optional reader-specific method run first.
    `private Atom` | `findAtom(javajs.util.P3 pt)`
    `private javajs.util.P3` | `getCoord(int i)`
    `private java.lang.String` | `getName(java.lang.String name)`
    `private java.lang.String` | `group(java.lang.String name)`
    `void` | `initializeReader()`

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

    - #### noBondSym

          private boolean noBondSym

    - #### tokens

          private java.lang.String[] tokens

    - #### htEdges

          private java.util.Map<Atom,javajs.util.V3[]> htEdges

    - #### lastName

          private java.lang.String lastName

    - #### edgeData

          private javajs.util.Lst<java.lang.String> edgeData

    - #### SG_ALIASES

          private static final java.lang.String SG_ALIASES

      See Also:
        Constant Field Values

    - #### vecs

          private static final javajs.util.V3[] vecs

  - ### Constructor Detail

    - #### CgdReader

          public CgdReader()

  - ### Method Detail

    - #### initializeReader

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

    - #### group

          private java.lang.String group(java.lang.String name)

    - #### atom

          private void atom()

    - #### getName

          private java.lang.String getName(java.lang.String name)

    - #### finalizeSubclassReader

          public void finalizeSubclassReader()
                                      throws java.lang.Exception

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

    - #### finalizeEdges

          private void finalizeEdges()

      Now that we have all the edge data we can add edges to atoms

    - #### getCoord

          private javajs.util.P3 getCoord(int i)

    - #### finalizeNet

          private void finalizeNet()

      Using atom.vib as a proxy indicating rotation, make all the bonds indicated in the atom's htEdges

    - #### findAtom

          private Atom findAtom(javajs.util.P3 pt)