public class JanaReader extends AtomSetCollectionReader
| Modifier and Type | Field and Description |
|---|---|
(package private) static int |
CELL |
(package private) static int |
END |
private boolean |
firstPosition |
private float[] |
floats |
private boolean |
haveM40Data |
private boolean |
isLegendre |
(package private) static int |
LATT |
private javajs.util.Lst<float[]> |
lattvecs |
private javajs.util.M3 |
matR |
private String |
modAxes |
private int |
modDim |
private javajs.util.Lst<javajs.util.P3> |
modelMolecule |
private javajs.util.Lst<Atom> |
molAtoms |
private boolean |
molHasTLS |
private String |
molName |
private javajs.util.Lst<Integer> |
molTtypes |
(package private) static int |
NDIM |
(package private) static int |
QI |
private int |
qicount |
(package private) static String |
records |
private javajs.util.P3 |
rho |
(package private) static int |
SPG |
(package private) static int |
SYM |
private int |
thisSub |
(package private) static int |
TITLE |
static String |
U_LIST |
private javajs.util.V3 |
v0Cart |
private javajs.util.V3 |
vR |
(package private) static int |
WMATRIX |
private static String[] |
XYZ |
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, line, lstNCS, matUnitCellOrientation, modelNumber, ms, mustFinalizeModelSet, next, out, packingError, prevline, ptLine, ptSupercell, reader, readerName, reverseModels, sgName, stateScriptVersionInt, strSupercell, symmetry, templateAtomCount, thisBiomolecule, trajectorySteps, unitCellOffset, unitCellParams, useAltNames, useFileModelNumbers, validation, vibrationNumber, vibsFractional, vwr| Constructor and Description |
|---|
JanaReader() |
| Modifier and Type | Method and Description |
|---|---|
private void |
addSinCos(int j,
String key,
String label,
boolean isPos)
Add x, y, and z modulations as [ csin, ccos, 0 ] or, possibly Legendre [
coef, order, 0 ]
|
private void |
adjustM40Occupancies()
M40 occupancies are divided by the site multiplicity;
here we factor that back in.
|
private void |
cartesianProduct(javajs.util.T3 vA,
javajs.util.T3 vB)
dual-purpose function for cross products,
proper rotations, and improper rotations
|
private void |
cell() |
protected boolean |
checkLine() |
private double[] |
combineModulation(String key,
float csin,
float ccos)
Retrieve cataloged displacement and add in this component,
returning a new double[3].
|
private void |
copyModulations(String label,
String newLabel)
Create a new catalog entry for an atom's modulation components.
|
void |
doPreSymmetry() |
private void |
ensureFourier(int j)
Make sure that F_n record is present.
|
void |
finalizeSubclassReader()
optional reader-specific method run first.
|
protected void |
finalizeSubclassSymmetry(boolean haveSymmetry) |
private boolean |
getFlag(int i)
safely get a one-character 0 or 1 as a boolean
|
private int |
getInt(int col1,
int col2)
safe int parsing of line.substring(col1, col2);
|
private String |
getStr(int col1,
int col2)
safe string parsing of line.substring(col1, col2);
|
void |
initializeReader() |
private void |
ndim() |
private void |
parseM40Floats() |
private void |
processPosition(String posName,
Atom pos,
boolean isAxial)
We process the Pos#n record here.
|
private void |
qi() |
private float[][] |
readAtomRecord(Atom atom,
javajs.util.P3 rm,
javajs.util.P3 rp,
boolean isPos)
Read the atom or pos# record, including occupancy, various flags, and,
especially, modulations.
|
private void |
readM40Data(boolean haveReader)
read the M40 file, possibly as the extension of M50+M40
|
private float[][] |
readM40FloatLines(int nLines,
int nFloats) |
private String |
readM40Floats() |
private void |
readM40WaveVectors() |
private void |
setMolecularModulation(String key,
float csin,
float ccos)
Add the modulation after applying rigid-body phase correction
|
private double[] |
setRigidBodyPhase(String key,
double[] v)
Adjust phases to match the difference between the atom's position and the
rigid molecular fragment's reference point.
|
private void |
setRigidBodyRotations(String label,
float[][] params)
Transform unphased Fourier x,y,z cos/sin coefficients in a rigid body
system based on distance from center.
|
private String |
skipToNextAtom() |
private void |
symmetry() |
addAtomXYZSymName, addJmolScript, addPrimitiveLatticeVector, addSites, addSiteScript, appendLoadNote, appendUunitCellInfo, applySymmetryAndSetTrajectory, applySymTrajASCR, checkCurrentLineForScript, checkFilterKey, checkLastModel, checkLineForScript, clearUnitCell, cloneLastAtomSet, discardLinesUntilBlank, discardLinesUntilContains, discardLinesUntilContains2, discardLinesUntilNonBlank, discardLinesUntilStartsWith, discardPreviousAtoms, doGetModel, doGetVibration, 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, 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, setupASCRprivate javajs.util.Lst<float[]> lattvecs
private int thisSub
private String modAxes
private int modDim
private boolean haveM40Data
static final String records
static final int TITLE
static final int CELL
static final int NDIM
static final int QI
static final int LATT
static final int SYM
static final int SPG
static final int END
static final int WMATRIX
private int qicount
private String molName
private javajs.util.Lst<Atom> molAtoms
private javajs.util.Lst<Integer> molTtypes
private javajs.util.Lst<javajs.util.P3> modelMolecule
private boolean molHasTLS
private javajs.util.M3 matR
private javajs.util.P3 rho
private boolean firstPosition
private javajs.util.V3 vR
private javajs.util.V3 v0Cart
private boolean isLegendre
public static final String U_LIST
private static String[] XYZ
private float[] floats
public void initializeReader()
throws Exception
initializeReader in class AtomSetCollectionReaderExceptionprotected boolean checkLine()
throws Exception
checkLine in class AtomSetCollectionReaderExceptionpublic void doPreSymmetry()
throws Exception
doPreSymmetry in class AtomSetCollectionReaderExceptionpublic void finalizeSubclassReader()
throws Exception
AtomSetCollectionReaderfinalizeSubclassReader in class AtomSetCollectionReaderExceptionprotected void finalizeSubclassSymmetry(boolean haveSymmetry)
throws Exception
finalizeSubclassSymmetry in class AtomSetCollectionReaderExceptionprivate void readM40Data(boolean haveReader)
throws Exception
haveReader - Exceptionprivate int getInt(int col1,
int col2)
col1 - col2 - private String getStr(int col1, int col2)
col1 - col2 - private boolean getFlag(int i)
i - private void processPosition(String posName, Atom pos, boolean isAxial) throws Exception
posName - pos - isAxial - Exceptionprivate void cartesianProduct(javajs.util.T3 vA,
javajs.util.T3 vB)
vA - vB - private float[][] readAtomRecord(Atom atom, javajs.util.P3 rm, javajs.util.P3 rp, boolean isPos) throws Exception
atom - rm - // rotation vector/point not implementedrp - // rotation point not implementedisPos - Exceptionprivate void addSinCos(int j,
String key,
String label,
boolean isPos)
throws Exception
j - key - label - isPos - Exceptionprivate void ensureFourier(int j)
j - private void parseM40Floats()
private float[][] readM40FloatLines(int nLines,
int nFloats)
throws Exception
Exceptionprivate void adjustM40Occupancies()
private void copyModulations(String label, String newLabel)
label - newLabel - private double[] setRigidBodyPhase(String key, double[] v)
key - v - private void setRigidBodyRotations(String label, float[][] params)
label - ";atomName"params - block of [nDisp][6] rotational parametersprivate double[] combineModulation(String key, float csin, float ccos)
key - csin - ccos - private void setMolecularModulation(String key, float csin, float ccos)
key - csin - ccos -