Crystallographic Information Framework

[CIF logo]
⋯ > [FUNCTION]

Index

Modulated structures dictionary (msCIF) version 3.2.1

_function.Zigzag

Name:
_function.Zigzag

Definition:

   

      The function:

            z = Zigzag(a, c, w, x4)

      returns

            2* a * ((x4-c)/w)

      for x4 belonging to the interval [c-(w/2), c+(w/2)] or

           -2* a * ((x4-c)/w)

      for x4 in the interval [c+1/2-(w/2), c+1/2+(w/2)] 

      where a is the array containing the the amplitudes (maximum displacements)   
      along each crystallographic axis, w is the width of the zigzag, x4 is a 
      particular value of the internal coordinate and c is the centre of the function 
      in internal space. The use of this function is restricted to one-dimensional 
      modulated structures.     

Type: Real

Values appear in Array context.

Dimension: [3]

Evaluation method:

      Function Zigzag( a  :[Array, Real] ,
                       c  :[Single, Real],
                       w  :[Single, Real],
                       x4 :[Single,Real] )
      {
      
        Zigzag = [0.0,0.0,0.0]

        If ( c-w/2.0 <= x4 and x4 <= c+w/2.0 ) Zigzag = 2*a*(x4-c)/w

        Else if ( c+0.5-w/2.0 <= x4 and x4 <= c+0.5+w/2.0 ) Zigzag = -2*a*(x4-c)/w


      }

# Heavier alternative: only atom label and x4

      Function Zigzag( atlab :[Single, Code],
                         x4    :[Single,Real] )
      {
# Atom not in list of sawtooth modulation or null zigzag width            
        Zigzag = [-1.0,-1.0,-1.0]  

        Loop d as atom_site_displace_special_func {

          If (atlab == d.atom_site_label and d.zigzag_w != 0.0){

            Zigzag = [0.0,0.0,0.0]

            If ( d.zigzag_c-d.zigzag_w/2.0 <= x4 and 
                                            x4 <= d.zigzag_c+d.zigzag_w/2.0 ) 
             
                     Zigzag = 2*d.zigzag_axyz*(x4- d.zigzag_c)/d.zigzag_w

            Else if ( d.zigzag_c+0.5-d.zigzag_w/2.0 <= x4 and 
                                            x4 <= d.zigzag_c+0.5+d.zigzag_w/2.0 ) 
             
                     Zigzag = -2*d.zigzag_axyz*(x4- d.zigzag_c)/d.zigzag_w

            Break

          } # End of If

        }   # End of Loop

      }

Category:
function