As a rule of thumb, the more complex the theory, the better the performance of the resulting code. For example, the integral method can deal with almost any grating problem, a development that took twenty years. – Dr. Erwin G. Loewen and Dr. Evgeny Popov. ^{}^{31}^{}
The software has been designed for exact calculations by the modified boundary integral equation method (MIM) in xray to meter wavelength range of the diffraction order efficiency and diffuse light intensity (ghosts) of multilayer relief and phase gratings, rough mirrors, and photonic crystals, manyshaped, with nonconformal and nonfunction border profiles, working in conical mounts with general polarization states and nonplanar incident waves as well as taking into account rigorously various roughness types.


The Main application with an expertfriendly interface and input and output (GUI & Complete types) Open GL 2D and 3D plots.
The External solver, which performs calculations and provides full control over the calculation process (including smart internal cache and parallel solving by multicore/processor systems).
The Border Profile editor, which supports ten types of border profiles: Trapezoidal, Triangular, Lamellar, Sawtooth, Sine trapezoidal, Sinusoidal, Polygonal, Absolute plane, Trigonometric, and Cubic spline. The Border Profile Editor has a possibility to work with nonfunction border profiles and to add random microroughness on one facet (part) of a border profile and generate asperities of any kinds including those having the Gaussian correlation function.
The Refractive Index editor, which supports "ri" and "ari" formats.
The Console Solver utility (XML & Complete types), which employs a graphical version of the Solver application (PCGrateS(X) Solver).
The PCGrate®S(X) v. 6.7 32/64bit series toolkit:
Combines the brilliant performance of the earlier implementations of PCGrates.
Uses modern Graphical User Interface with 3D and 2D Open GL graphs.
Includes 2D scanning & 3D efficiency plots. 2D scanning allows one to vary two independent parameters together to solve grating efficiency tasks.
3D efficiency plots allow one to visualize the results obtained with 2D scanning.
All versions of PCGrate®S(X) have two series (S and SX) and three types: GUI, XML, and Complete. The PCGrateS(X) XML and PCGrateS(X) Complete types make it possible to calculate the grating efficiency from the command line with input/output data in XML format. The PCGrateS(X) GUI and PCGrateS(X) Complete types make it possible to obtain the calculated data using the Graphical User Interface (i.e. the PCGrateS(X) Main Application) and work with the results including saving, coping, exporting, plotting, printing, etc. The type is determined by a Sentinel HASP® HL USB or SL (pure software) key which is shipped with the product.
PCGrate®S(X) v. 6.66.7 32/64bit calculate the diffraction efficiency, amplitudes, phases, and the nearzone diffraction field for multilayer 1D reflection and transmission relief & phase gratings (holographic, ruled, photolithographic, replicated, obtained using various lithography and imprint techniques, and others) and 1D & 2D photonic crystals, as well as scattered intencities of rough mirrors:
It works with TE, TM, NP((P+S)/2) or General polarization states in Classical (inplane) or Conical (offplane) mounts for Plane, Cylindrical, Spherical, and Gaussian wave front types.
Software enables you to customize parameters of the beam and the optical mounting. There are several optical mount configurations: General, Constant A.D., Echelle, Bragg, Blazed and Fix Focus.
It operates with 0 to ±100 (S series of programs) or ±10 000 (SX series of programs) diffraction orders. The minimal value of the wavelengthtoperiod ratio lambda/d is 0.02 (S series of programs), while the minimal Wavelength is 0.01 nm (SX series of programs).
The software is suitable for design and simulation of conformal/nonconformal multilayer plane or shaped diffraction gratings based on the assumption of Finite (or Perfect for lower border) conductive or lossless layers.
The maximal number of different groups of plane sections N_{M} & N_{S} and waves L_{M} & L_{S} is 99 (up to 9 801 items for concave/convex grating or nonplanar wave modeling and up to 1 185 921 items – for modeling a nonplanar wave incident on a concave/convex grating).
It is possible to preset up to 20 (S series of programs) or 10 000 (SX series of programs) conformal/nonconformal layers of the grating surface multilayer material from the complete Refractive Index Libraries (RILs).
The program works with Trapezoidal, Sine trapezoidal, Polygonal, Trigonometric, Cubic spline and Section dependent border profiles, including real profiles with a possibility of periodical and random roughness simulation.
The maximal Number of collocation points N_{k} on the border is 10 000 and the programs have significant potential (special checkboxes or buttons included) to cope with weak convergence problems.
It is possible to scan over 38 different parameters in series and to use three types of inter/extrapolation (Constant, Linear, or Cubic spline) of RILs data when scanning in wavelength, and two types of profile size change when scanning in period or frequency (Resize the whole profile or Affect dependent parameter only).
Allowance is also made for data printing (including graphs) and for pointwise or full export of input and output data (including tables) to XML, Microsoft® Excel, and text format files.
It is possible to restore input parameters for a solved task (from a saved output *.pcg file).
The PCGrateS(X) v. 6.66.7 32/64bit series for Microsoft^{®} Windows^{®} 32/64bit requires:
Microsoft® Windows® Vista/Server 2008/7/Server 2012/8(.1)/10 or higher installed (Windows 8.1 or Server 2012 are recommended).
PCcompatible (Intel® or AMD® modern multicore processors are recommended for
better performance) single or multiprocessor computer.
At least 512 MB of free RAM per core (thread) (1 GB or more per core (thread) are recommended for complex problem modelling and paralleling).
Minimum 1 GB of free hard disk space (10 GB or more are recommended for storing complex problem results).
Web and email access for technical support and program updates.
The PCGrateS(X) v. 6.66.7 32/64bit programs most important settings are done with the Penetrating and Separating buttons in the Solver type group (the General tab, the Solver optimizing item – see Figure #5). Each button corresponds to the respective multilayer solver that is used in PCGrateS(X) v. 6.66.7 32/64bit.
The Separating solver finds a fast solution of the multistack problem with plane and/or conformal layers using the same solution of the integral equations on a single boundary. An example of the appropriate grating model may consist of one profile of arbitrary outline and several absolute plane interfaces above and/or below it. Since the field values on adjacent plane interfaces are connected by the known Fresnel coefficients, the whole multiboundary problem can be effectively reduced to the solution of integral equations on the corrugated boundary profiles only. The Separating solver is primarily intended for efficiency calculations of any uncoated gratings and mirrors including rough ones and specific types of coated gratings (see Figure #30). It is indispensable for 2D photonic crystals and XrayVUV gratings and mirrors covered with one or many plane or rather thick conformal layers and, especially, for grazing incidence.
The Penetrating solver finds a solution of the multistack problem with conformal and/or nonconformal layers using the solution of the integral equations on each boundary. An example of the appropriate grating model may consist of several boundaries of different profiles, which penetrate each other (see Figure #31). Since the Penetrating solver is more general than Separating solver, it is intended for efficiency calculations of any types of multilayer gratings and mirrors including rough ones. It is indispensable for coated echelles, thinmultilayer xrayVUV and thinoxidized gratings.
If one sets Perfect Type of low border conductivity, the perfect (infinite) conductivity type will be chosen for the grating's substrate (the bottom layer). In such a situation, the value of the real ( Re) part of refractive index is equal to zero and the value of the imaginary ( Im) part of the refractive index is equal to infinite (see Figure #13). The Perfect Type of low border conductivity mode is primarily used for xrayVUV wavelengths (for close to normal incidence Classical or grazing Conical mounts) or for a long wavelength spectrum from middle IR to radio waves.
When setting the Finite tab for Type of low border conductivity, a finite (absorbing or lossless) conductivity type will be chosen for the grating bottom layer. Therewith the values of the real and imaginary parts of the refractive index (or the electric permittivity and magnetic permeability) for the bottom layer are finite (see Figure #12). Selecting the Layers tab and choosing the bottom layer one can specify the real and imaginary parts of the refractive index of the grating's bottom layer in PCGrateS(X) 6.66.7 manually (the Custom mode) or choose it from the RIL (the From library mode). Finite Type of low border conductivity can be used in the entire working range from xrays to radio waves.
The major accuracy parameter refers to the Number of collocation points^{}^{}^{}^{}^{5}^{}^{,}^{}^{}^{}^{}^{7}^{} N_{j} for the scan range number j. It is the size of a square matrix which represents the system of linear equations (the maximal number of collocation points along all the borders). The N_{j} values of 100400 (100 is the default value) generally provide good accuracy, with the exception of the following cases: very deep (in respect to period and/or wavelength) borders; real border profiles with super fine structures including roughnesses and, especially, at small wavelengthtoperiod ratios; very close borders; very grazing incidence; `bad` points near Rayleigh wavelengths, resonance anomalies of different kinds; for high orders; and for high conductivity (especially for the TM polarization). For such difficult problems, an increase in the number of collocation points for borders may become necessary.
Among the Accuracy optimization options there is another important accuracy parameter L: Maximal number of accountable +/ terms or orders. It represents a number of positive or negative terms in the Green functions and their normal derivatives expansions ^{}^{}^{}^{}^{5}^{}^{,}^{}^{}^{}^{}^{7}^{} or a number of plus and minus propagating and evanescent diffraction orders taken into account. For many grating efficiency problems, the number of terms with plus (or minus) sign to be chosen should be fifty percent of the number of collocation points N_{j} ( Penetrating solver)  "the golden rule" and the default value. In difficult cases, like those of highly conducting blazed or very deep gratings, echelles, and, especially, for the TM polarization, one can try to optimize the convergence and accuracy by varying this parameter at a given number of collocation points on each boundary. The "truncation ratio" L is optimized at small values of N_{j} and is kept constant (relatively) as N_{j} increases. The number of plus or minus diffraction orders you choose for the Separating solver should be about the maximal number of propagating orders of any sign plus a few evanescent orders. ^{}^{}^{}^{}^{32}^{}
Type of integration step, i.e. EqualS interval or EqualX interval is one more accuracy parameter, which determines a function of the distance between collocation points. Better results are often obtained when using an equidistant distribution along the length of the arc, ^{}^{}^{}^{}^{7}^{}^{,}^{}^{}^{}^{}^{25}^{} i.e. the EqualS interval option (the default mode). In some cases, especially for small wavelengthtoperiod ratios and for small depthtoperiod ratios, the application of the Equal Xinterval type is more accurate than the default mode.
Sometimes, you may need to vary additional accuracy parameters available in the programs. The Accelerating convergence button from the Accuracy optimization group (see Figure #6 or Figure #5) is designed for the Green functions and their normal derivatives optimal computations, which take into account singleterm corrections (the logarithmic singularity, border profile curvature, bordercrossing phase jump, and convergenceaccelerating remainder term) in the integral equations method. ^{}^{}^{}^{}^{7}^{} For most grating efficiency problems, except some special cases for the xrayEUV wavelength region, you should use this option (button is pressed by default) that provides essentially faster convergence and much more accuracy.

