![[CIF logo]](https://www.iucr.org/__data/assets/image/0003/125499/CIF_v2.5.jpg)
⋯ > [FUNCTION]
Modulated structures dictionary (msCIF) version 3.2.1
_function.Sawtooth
Name:_function.Sawtooth
Definition:
The function: s = Sawtooth(a, c, w, x4) returns 2* a * ((x4-c)/w) for x4 belonging to the interval [c-(w/2), c+(w/2)], where a is the array containing the the amplitudes (maximum displacements) along each crystallographic axis, w is the width of the sawtooth, 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 Sawtooth( a :[Array, Real] , c :[Single, Real], w :[Single, Real], x4 :[Single,Real] ) { Sawtooth = [0.0,0.0,0.0] If ( c-w/2.0 <= x4 and x4 <= c+w/2.0 ) Sawtooth = 2*a*(x4-c)/w } # Heavier alternative: only atom label and x4 Function Sawtooth( atlab :[Single, Code], x4 :[Single,Real] ) { # Atom not in list of sawtooth modulation or null sawtooth width Sawtooth = [-1.0,-1.0,-1.0] Loop d as atom_site_displace_special_func { If (atlab == d.atom_site_label and d.sawtooth_w != 0.0){ Sawtooth = [0.0,0.0,0.0] If ( d.sawtooth_c-d.sawtooth_w/2.0 <= x4 and x4 <= d.sawtooth_c+d.sawtooth_w/2.0 ) Sawtooth = 2*d.sawtooth_axyz*(x4- d.sawtooth_c)/d.sawtooth_w Break } # End of If } # End of Loop }
Category:
function