Package org.jmol.util

Class ModulationSet

All Implemented Interfaces:
Serializable, JSONEncodable, JmolModulationSet

public class ModulationSet extends Vibration implements JmolModulationSet
A class to group a set of modulations for an atom as a "vibration" Extends V3 so that it will be a displacement, and its value will be an occupancy
Author:
Bob Hanson hansonr@stolaf.edu 8/9/2013
See Also:
  • Field Details

    • vib

      public Vibration vib
      vib is a spin vector when the model has modulation; otherwise an unmodulated vibration.
    • mxyz

      public V3 mxyz
      the modulated magnetic spin
    • htUij

      public Map<String,Float> htUij
      current value of anisotropic parameter modulation
    • vOcc

      public float vOcc
      the current value of the occupancy modulation
  • Constructor Details

    • ModulationSet

      public ModulationSet()
  • Method Details

    • getSubSystemUnitCell

      public SymmetryInterface getSubSystemUnitCell()
      Specified by:
      getSubSystemUnitCell in interface JmolModulationSet
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface JmolModulationSet
    • getScale

      public float getScale()
      Specified by:
      getScale in interface JmolModulationSet
    • setMod

      public ModulationSet setMod(String id, P3 r00, P3 r0, int d, Lst<Modulation> mods, M3 gammaE, Matrix[] factors, SymmetryInterface symmetry, int nOps, int iop, Vibration v, boolean isCommensurate)
      A collection of modulations for a specific atom.
      Parameters:
      id -
      r00 - originating atom position prior to application of symmetry
      r0 - unmodulated (average) position after application of symmetry
      d -
      mods -
      gammaE -
      factors - including sigma and tFactor
      symmetry -
      nOps -
      iop -
      v - TODO
      isCommensurate - TODO
      Returns:
      this
    • calculate

      public ModulationSet calculate(T3 tuv, boolean isQ)
      Calculate r_I internal d-space coordinate of an atom.
      Parameters:
      tuv -
      isQ -
      Returns:
      this ModulationSet, with this.rI set to the coordinate
    • addUTens

      public void addUTens(String utens, float v)
    • setModTQ

      public void setModTQ(T3 a, boolean isOn, T3 qtOffset, boolean isQ, float scale)
      Set modulation "t" value, which sets which unit cell in sequence we are looking at; d=1 only.
      Specified by:
      setModTQ in interface JmolModulationSet
      Parameters:
      isOn -
      qtOffset -
      isQ -
      scale -
    • addTo

      public void addTo(T3 a, float scale)
      Specified by:
      addTo in interface JmolModulationSet
    • getState

      public String getState()
      Specified by:
      getState in interface JmolModulationSet
    • getModPoint

      public T3 getModPoint(boolean asEnabled)
      Specified by:
      getModPoint in interface JmolModulationSet
    • getModulation

      public Object getModulation(char type, T3 tuv, boolean occ100)
      Specified by:
      getModulation in interface JmolModulationSet
    • setCalcPoint

      public T3 setCalcPoint(T3 pt, T3 t456, float vibScale, float scale)
      get updated value for offset vector and for occupancy
      Overrides:
      setCalcPoint in class Vibration
      Parameters:
      pt -
      t456 -
      vibScale -
      scale -
      Returns:
      pt
    • getInfo

      public void getInfo(Map<String,Object> info)
      Overrides:
      getInfo in class Vibration
    • setXYZ

      public void setXYZ(T3 v)
      Overrides:
      setXYZ in class Vibration
    • getVibration

      public Vibration getVibration(boolean forceNew)
      Specified by:
      getVibration in interface JmolModulationSet
    • getV3

      public V3 getV3()
      Specified by:
      getV3 in interface JmolModulationSet
    • scaleVibration

      public void scaleVibration(float m)
      Specified by:
      scaleVibration in interface JmolModulationSet
    • setMoment

      public void setMoment()
      Specified by:
      setMoment in interface JmolModulationSet
    • isNonzero

      public boolean isNonzero()
      Overrides:
      isNonzero in class Vibration
    • setOccupancy

      public float setOccupancy(double[] pt, double foccupancy, double siteMult)
      get the occupancy, first from the reader, then from renderer
      Parameters:
      pt -
      foccupancy -
      siteMult - or 0 is this is not relevant
      Returns:
      occupancy on [0,1]
    • getOccupancy100

      public int getOccupancy100(boolean forVibVis)
      Overrides:
      getOccupancy100 in class Vibration
      Parameters:
      forVibVis - used only in ModulationSet when calculating actual display offset
      Returns:
      Integer.MIN_VALUE if not applicable, occupancy if enabled, -occupancy if not enabled