Package org.jmol.util

Class Modulation


  • public class Modulation
    extends Object
    A class to allow for more complex vibrations and associated phenomena, such as modulated crystals, including Fourier series, Crenel functions, and sawtooth functions
    Author:
    Bob Hanson hansonr@stolaf.edu 8/8/2013
    • Field Detail

      • qCoefs

        private double[] qCoefs
      • a1

        private double a1
      • a2

        private double a2
      • center

        private double center
      • left

        private double left
      • right

        private double right
      • order

        private int order
      • axis

        private char axis
      • type

        private final char type
      • params

        private double[] params
      • delta2

        private double delta2
      • legendre

        static double[][] legendre
    • Constructor Detail

      • Modulation

        public Modulation​(char axis,
                          char type,
                          double[] params,
                          String utens,
                          double[] qCoefs)
        Each atomic modulation involves a fractional coordinate wave vector q, a Fourier power n, a modulation axis (x, y, or, z), and specified parameters that depend upon the type of function. Types supported: Fourier [csin, ccos] Legendre [center, width, coeff, order] Crenel [center, width, amplitude] Sawtooth [center, width, amplitude]
        Parameters:
        axis -
        type -
        params -
        utens - TODO
        qCoefs -
    • Method Detail

      • apply

        void apply​(ModulationSet ms,
                   double[][] t)
        Parameters:
        ms -
        t - -- Vector of coordinates for [x4, x5, x6, ...]
      • range

        private boolean range​(double x4)
        Check that left < x4 < right, but allow for folding
        Parameters:
        x4 -
        Returns:
        true only if x4 is in the (possibly folded) range of left and right
      • calcLegendre

        void calcLegendre​(int m)