public class MSReader extends Object implements MSInterface
Modifier and Type | Field and Description |
---|---|
private String |
atModel |
private int |
atomCount |
private Atom[] |
atoms |
protected AtomSetCollectionReader |
cr |
private javajs.util.M3 |
gammaE |
private boolean |
haveAtomMods |
private boolean |
haveOccupancy |
private Map<String,javajs.util.List<Modulation>> |
htAtomMods |
private Map<String,double[]> |
htModulation |
private Map<String,Subsystem> |
htSubsystems |
private int |
iopLast |
private javajs.util.P3 |
maxXYZ0 |
private javajs.util.P3 |
minXYZ0 |
protected boolean |
modAverage |
protected String |
modAxes |
private String |
modCell |
private int |
modCount |
private boolean |
modDebug |
protected int |
modDim |
private boolean |
modLast |
private javajs.util.Matrix[] |
modMatrices |
private boolean |
modPack |
private int |
modSelected |
private String |
modType |
private boolean |
modVib |
private int |
nOps |
private double[] |
q1 |
private javajs.util.P3 |
q1Norm |
private javajs.util.P3[] |
qs |
private javajs.util.Matrix |
sigma |
private static String |
U_LIST |
Constructor and Description |
---|
MSReader() |
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).
|
void |
addModulation(Map<String,double[]> map,
String id,
double[] pt,
int iModel)
Types include O (occupation) D (displacement) U (anisotropy) _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 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.
|
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.
|
private double[] |
getQCoefs(double[] p)
determine simple linear combination assuming simple -3 to 3 no more than
two dimensions.
|
(package private) javajs.util.Matrix |
getSigma() |
private Subsystem |
getSubsystem(Atom a) |
private SymmetryInterface |
getSymmetry(Atom a) |
int |
initialize(AtomSetCollectionReader r,
String data) |
private void |
initModForStructure(int iModel) |
private void |
modulateAtom(Atom a,
javajs.util.SB sb)
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)
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
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 double[] q1
private javajs.util.P3 q1Norm
private Map<String,javajs.util.List<Modulation>> htAtomMods
private int iopLast
private javajs.util.M3 gammaE
private int nOps
private boolean haveOccupancy
private Atom[] atoms
private int atomCount
private boolean haveAtomMods
private String atModel
private javajs.util.Matrix[] modMatrices
private javajs.util.P3[] qs
private int modCount
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, String data) 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)
setModulation
in interface MSInterface
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
- private void setModulationForStructure(int iModel, boolean isPost)
iModel
- isPost
- private void initModForStructure(int iModel)
private double[] getQCoefs(double[] p)
p
- 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, javajs.util.SB sb)
a
- sb
- 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()