Package org.jmol.adapter.readers.cif
Class MSRdr
java.lang.Object
org.jmol.adapter.readers.cif.MSRdr
- All Implemented Interfaces:
MSInterface
- Direct Known Subclasses:
MSCifParser
generalized modulated structure reader class for CIF and Jana
-- includes Fourier, Crenel, Sawtooth; displacement, occupancy, and Uij
-- handles up to 6 modulation wave vectors
-- commensurate and incommensurate, including composites
-- not handling _cell_commen_t_section_1
- Author:
- Bob Hanson hansonr@stolaf.edu
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate intprivate Stringprivate Atom[]protected intprotected AtomSetCollectionReaderprivate booleanprivate javajs.util.M3private static final Stringprivate booleanprivate booleanprivate Map<String,javajs.util.Lst<Modulation>> private intprotected booleanprivate javajs.util.Lst<String>private javajs.util.P3private javajs.util.P3protected booleanprotected Stringprivate String(package private) booleannot usedprivate intprivate booleanprotected intprivate booleanprivate javajs.util.Matrix[]private booleanprivate intprivate javajs.util.T3private Stringprivate booleanprivate intprivate double[]private javajs.util.P3[]private javajs.util.Matrixprivate SymmetryInterfaceprivate SymmetryInterfaceprivate static final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddAtomModulation(String atomName, char axis, char type, double[] params, String utens, double[] qcoefs) Create a list of modulations for each atom type (atom name).booleanaddLatticeVector(javajs.util.Lst<float[]> lattvecs, String data) voidaddModulation(Map<String, double[]> map, String id, double[] pt, int iModel) Types include O (occupation) D (displacement) U (anisotropy) M (magnetic moment) _coefs_ indicates this is a wave descriptionvoidaddSubsystem(String code, javajs.util.Matrix w) private voidprivate intapproxInt(float fn) private double[]calculateQCoefs(double[] p) determine simple linear combination assuming simple -3 to 3 no more than two dimensions.private StringFilter keys only for this model.private voidexpandMinMax(javajs.util.P3 pt, SymmetryInterface sym, javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ) voidCreate a script that will run to turn modulation on and to display only atoms with modulated occupancy >= 0.5.private voidfixDoubleA(double[] pt) private voidprivate javajs.util.P3getAtomSymmetry(Atom a, SymmetryInterface defaultSymmetry) When applying symmetry, this method allows us to use a set of symmetry operators unique to this particular atom -- or in this case, to its subsystem.private SymmetryInterfaceprivate javajs.util.Matrix[]getMatrices(Atom a) double[]Modulation data keys are keyed by model number as well as type using [at]n, where n is the model number, starting with 0.chargetModType(String key) double[](package private) javajs.util.MatrixgetSigma()private SubsystemgetSubsystem(Atom a) private SymmetryInterfacegetSymmetry(Atom a) getSymmetryFromCode(String code) intinitialize(AtomSetCollectionReader r, int modDim) private voidinitModForStructure(int iModel) private voidmodulateAtom(Atom a) The displacement will be set as the atom vibration vector; the string buffer will be appended with the t value for a given unit cell.voidsetMinMax0(javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ) protected voidsetModDim(int ndim) voidsetModulation(boolean isPost, SymmetryInterface symmetry) Both the Jana reader and the CIF reader will call this to set the modulation for a given model.private voidsetModulationForStructure(int iModel, boolean isPost) Called when structure creation is complete and all modulation data has been collected.private voidsetSubsystem(String code, Subsystem system) private voidprivate javajs.util.P3toP3(double[] x) private void
-
Field Details
-
cr
-
modDim
protected int modDim -
modAxes
-
modAverage
protected boolean modAverage -
isCommensurate
protected boolean isCommensurate -
commensurateSection1
protected int commensurateSection1 -
modPack
private boolean modPack -
modVib
private boolean modVib -
modType
-
modCell
-
modDebug
private boolean modDebug -
modSelected
private int modSelected -
modLast
private boolean modLast -
sigma
private javajs.util.Matrix sigma -
htModulation
-
htAtomMods
-
iopLast
private int iopLast -
gammaE
private javajs.util.M3 gammaE -
nOps
private int nOps -
haveOccupancy
private boolean haveOccupancy -
atoms
-
ac
private int ac -
haveAtomMods
private boolean haveAtomMods -
modCoord
boolean modCoordnot used -
finalized
private boolean finalized -
symmetry
-
supercellSymmetry
-
legendres
-
atModel
-
modMatrices
private javajs.util.Matrix[] modMatrices -
qlist100
private double[] qlist100 -
generic
- See Also:
-
qs
private javajs.util.P3[] qs -
modCount
private int modCount -
modTUV
private javajs.util.T3 modTUV -
U_LIST
- See Also:
-
htSubsystems
-
minXYZ0
private javajs.util.P3 minXYZ0 -
maxXYZ0
private javajs.util.P3 maxXYZ0
-
-
Constructor Details
-
MSRdr
public MSRdr()
-
-
Method Details
-
getSigma
javajs.util.Matrix getSigma() -
initialize
- Specified by:
initializein interfaceMSInterface- Throws:
Exception
-
setSubsystemOptions
private void setSubsystemOptions() -
setModDim
protected void setModDim(int ndim) -
addModulation
Types include O (occupation) D (displacement) U (anisotropy) M (magnetic moment) _coefs_ indicates this is a wave description- Specified by:
addModulationin interfaceMSInterface- Parameters:
map-id-pt-iModel-
-
setModulation
Both the Jana reader and the CIF reader will call this to set the modulation for a given model.- Specified by:
setModulationin interfaceMSInterface- Throws:
Exception
-
finalizeModulation
public void finalizeModulation()Create a script that will run to turn modulation on and to display only atoms with modulated occupancy >= 0.5.- Specified by:
finalizeModulationin interfaceMSInterface
-
checkKey
Filter keys only for this model.- Parameters:
key-checkQ-- Returns:
- trimmed key without model part or null
-
getMod
Modulation data keys are keyed by model number as well as type using [at]n, where n is the model number, starting with 0.- Specified by:
getModin interfaceMSInterface- Parameters:
key-- Returns:
- modulation data
-
getModulationMap
- Specified by:
getModulationMapin interfaceMSInterface
-
setModulationForStructure
Called when structure creation is complete and all modulation data has been collected.- Parameters:
iModel-isPost-- Throws:
Exception
-
initModForStructure
- Throws:
Exception
-
fixLegendre
private void fixLegendre() -
fixDoubleA
private void fixDoubleA(double[] pt) -
getQCoefs
- Specified by:
getQCoefsin interfaceMSInterface
-
getModType
- Specified by:
getModTypein interfaceMSInterface
-
calculateQCoefs
private double[] calculateQCoefs(double[] p) determine simple linear combination assuming simple -3 to 3 no more than two dimensions.- Parameters:
p-- Returns:
- {i j k}
-
approxInt
private int approxInt(float fn) -
toP3
private javajs.util.P3 toP3(double[] x) -
addAtomModulation
private void addAtomModulation(String atomName, char axis, char type, double[] params, String utens, double[] qcoefs) Create a list of modulations for each atom type (atom name).- Parameters:
atomName-axis-type-params-utens-qcoefs-
-
addSubsystem
- Specified by:
addSubsystemin interfaceMSInterface
-
addUStr
-
modulateAtom
The displacement will be set as the atom vibration vector; the string buffer will be appended with the t value for a given unit cell. Modulation generally involves x4 = q.r + t. Here we arbitrarily set t = modT = 0, but modT could be a FILTER option MODT=n. There would need to be one modT per dimension or modU, modV.- Parameters:
a-
-
getAtomR0
-
getAtomSymmetry
When applying symmetry, this method allows us to use a set of symmetry operators unique to this particular atom -- or in this case, to its subsystem.- Specified by:
getAtomSymmetryin interfaceMSInterface
-
setSubsystem
-
getMatrices
-
getSymmetry
-
getSubsystem
-
setMinMax0
public void setMinMax0(javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ) - Specified by:
setMinMax0in interfaceMSInterface
-
expandMinMax
private void expandMinMax(javajs.util.P3 pt, SymmetryInterface sym, javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ) -
trimAtomSet
private void trimAtomSet() -
getDefaultUnitCell
-
getSymmetryFromCode
- Specified by:
getSymmetryFromCodein interfaceMSInterface
-
addLatticeVector
- Specified by:
addLatticeVectorin interfaceMSInterface- Throws:
Exception
-