public class MSRdr extends Object implements MSInterface
Modifier and Type | Field and Description |
---|---|
private int |
ac |
private String |
atModel |
private Atom[] |
atoms |
protected int |
commensurateSection1 |
protected AtomSetCollectionReader |
cr |
private boolean |
finalized |
private javajs.util.M3 |
gammaE |
private boolean |
haveAtomMods |
private boolean |
haveOccupancy |
private Map<String,javajs.util.Lst<Modulation>> |
htAtomMods |
private Map<String,double[]> |
htModulation |
(package private) Map<String,Subsystem> |
htSubsystems |
private int |
iopLast |
protected boolean |
isCommensurate |
private javajs.util.Lst<String> |
legendres |
private javajs.util.P3 |
maxXYZ0 |
private javajs.util.P3 |
minXYZ0 |
protected boolean |
modAverage |
protected String |
modAxes |
private String |
modCell |
private boolean |
modCoord |
private int |
modCount |
private boolean |
modDebug |
protected int |
modDim |
private boolean |
modLast |
private javajs.util.Matrix[] |
modMatrices |
private boolean |
modPack |
private int |
modSelected |
private javajs.util.T3 |
modTUV |
private String |
modType |
private boolean |
modVib |
private int |
nOps |
private double[] |
qlist100 |
private javajs.util.P3[] |
qs |
private javajs.util.Matrix |
sigma |
private SymmetryInterface |
supercellSymmetry |
private SymmetryInterface |
symmetry |
private static String |
U_LIST |
Constructor and Description |
---|
MSRdr() |
Modifier and Type | Method and Description |
---|---|
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).
|
boolean |
addLatticeVector(javajs.util.Lst<float[]> lattvecs,
String data) |
void |
addModulation(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 description
|
void |
addSubsystem(String code,
javajs.util.Matrix w) |
private void |
addUStr(Atom atom,
String id,
float val) |
private int |
approxInt(float fn) |
private double[] |
calculateQCoefs(double[] p)
determine simple linear combination assuming simple -3 to 3 no more than
two dimensions.
|
private String |
checkKey(String key,
boolean checkQ)
Filter keys only for this model.
|
private void |
expandMinMax(javajs.util.P3 pt,
SymmetryInterface sym,
javajs.util.P3 minXYZ,
javajs.util.P3 maxXYZ) |
void |
finalizeModulation()
Create a script that will run to turn modulation on and to display only
atoms with modulated occupancy >= 0.5.
|
private void |
fixDouble(double[] pt) |
private void |
fixLegendre() |
private javajs.util.P3 |
getAtomR0(Atom atom) |
SymmetryInterface |
getAtomSymmetry(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 SymmetryInterface |
getDefaultUnitCell() |
private javajs.util.Matrix[] |
getMatrices(Atom a) |
double[] |
getMod(String key)
Modulation data keys are keyed by model number as well as type using [at]n,
where n is the model number, starting with 0.
|
char |
getModType(String key) |
Map<String,double[]> |
getModulationMap() |
double[] |
getQCoefs(String key) |
(package private) javajs.util.Matrix |
getSigma() |
private Subsystem |
getSubsystem(Atom a) |
private SymmetryInterface |
getSymmetry(Atom a) |
SymmetryInterface |
getSymmetryFromCode(String code) |
int |
initialize(AtomSetCollectionReader r,
int modDim) |
private void |
initModForStructure(int iModel) |
private void |
modulateAtom(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.
|
void |
setMinMax0(javajs.util.P3 minXYZ,
javajs.util.P3 maxXYZ) |
protected void |
setModDim(int ndim) |
void |
setModulation(boolean isPost,
SymmetryInterface symmetry)
Both the Jana reader and the CIF reader will call this to set the
modulation for a given model.
|
private void |
setModulationForStructure(int iModel,
boolean isPost)
Called when structure creation is complete and all modulation data has been
collected.
|
private void |
setSubsystem(String code,
Subsystem system) |
private void |
setSubsystemOptions() |
private javajs.util.P3 |
toP3(double[] x) |
private void |
trimAtomSet() |
protected AtomSetCollectionReader cr
protected int modDim
protected String modAxes
protected boolean modAverage
protected boolean isCommensurate
protected int commensurateSection1
private boolean modPack
private boolean modVib
private String modType
private String modCell
private boolean modDebug
private int modSelected
private boolean modLast
private javajs.util.Matrix sigma
private Map<String,javajs.util.Lst<Modulation>> htAtomMods
private int iopLast
private javajs.util.M3 gammaE
private int nOps
private boolean haveOccupancy
private Atom[] atoms
private int ac
private boolean haveAtomMods
private boolean modCoord
private boolean finalized
private SymmetryInterface symmetry
private SymmetryInterface supercellSymmetry
private javajs.util.Lst<String> legendres
private String atModel
private javajs.util.Matrix[] modMatrices
private double[] qlist100
private javajs.util.P3[] qs
private int modCount
private javajs.util.T3 modTUV
private static final String U_LIST
private javajs.util.P3 minXYZ0
private javajs.util.P3 maxXYZ0
javajs.util.Matrix getSigma()
public int initialize(AtomSetCollectionReader r, int modDim) throws Exception
initialize
in interface MSInterface
Exception
private void setSubsystemOptions()
protected void setModDim(int ndim)
public void addModulation(Map<String,double[]> map, String id, double[] pt, int iModel)
addModulation
in interface MSInterface
map
- id
- pt
- iModel
- public void setModulation(boolean isPost, SymmetryInterface symmetry) throws Exception
setModulation
in interface MSInterface
Exception
public void finalizeModulation()
finalizeModulation
in interface MSInterface
private String checkKey(String key, boolean checkQ)
key
- checkQ
- public double[] getMod(String key)
getMod
in interface MSInterface
key
- public Map<String,double[]> getModulationMap()
getModulationMap
in interface MSInterface
private void setModulationForStructure(int iModel, boolean isPost) throws Exception
iModel
- isPost
- Exception
private void fixLegendre()
private void fixDouble(double[] pt)
public double[] getQCoefs(String key)
getQCoefs
in interface MSInterface
public char getModType(String key)
getModType
in interface MSInterface
private double[] calculateQCoefs(double[] p)
p
- private int approxInt(float fn)
private javajs.util.P3 toP3(double[] x)
private void addAtomModulation(String atomName, char axis, char type, double[] params, String utens, double[] qcoefs)
atomName
- axis
- type
- params
- utens
- qcoefs
- public void addSubsystem(String code, javajs.util.Matrix w)
addSubsystem
in interface MSInterface
private void modulateAtom(Atom a)
a
- private javajs.util.P3 getAtomR0(Atom atom)
public SymmetryInterface getAtomSymmetry(Atom a, SymmetryInterface defaultSymmetry)
getAtomSymmetry
in interface MSInterface
private javajs.util.Matrix[] getMatrices(Atom a)
private SymmetryInterface getSymmetry(Atom a)
public void setMinMax0(javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ)
setMinMax0
in interface MSInterface
private void expandMinMax(javajs.util.P3 pt, SymmetryInterface sym, javajs.util.P3 minXYZ, javajs.util.P3 maxXYZ)
private void trimAtomSet()
private SymmetryInterface getDefaultUnitCell()
public SymmetryInterface getSymmetryFromCode(String code)
getSymmetryFromCode
in interface MSInterface
public boolean addLatticeVector(javajs.util.Lst<float[]> lattvecs, String data) throws Exception
addLatticeVector
in interface MSInterface
Exception