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 eight (ten for v. 6.56.6) types of border profiles: Trapezoidal, Triangular, Lamellar, Sawtooth, Sine trapezoidal, Sinusoidal, Polygonal, Absolute plane (v. 6.56.6), Trigonometric, and Cubic spline. The PCGrate 6.56.6 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. Note that only 32bit version of Border Profile Editor and RI Editor is available.
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).
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 key which is shipped with the product.
PCGrate®S(X) v. 6.1 32bit and PCGrate®S(X) v. 6.56.6 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 (v. 6.56.6) 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 (v. 6.6 programs).
It operates with 0 to ±100 (S series of v. 6.1 and v. 6.56.6 programs), or ±5 000 (SX series of v. 6.1 programs), or ±10 000 (SX series of v. 6.56.6 programs) diffraction orders. The minimal value of the wavelengthtoperiod ratio lambda/d is 0.02 (S series of v. 6.1 and v. 6.56.6 programs), while the minimal Wavelength is 0.01 nm (SX series of v. 6.1 and v. 6.56.6 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 v. 6.1 and v. 6.56.6 programs), or 5 000 (SX series of v. 6.1 programs), or 10 000 (SX series of v. 6.5 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 (v. 6.56.6) 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 5 000 (v. 6.1) or 10 000 (v. 6.56.6) and the programs have significant potential (special checkboxes or buttons included) to cope with weak convergence problems.
It is possible to scan over 32 (v. 6.1) or 38 (v. 6.56.6) 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.1 32bit and PCGrateS(X) v. 6.56.6 32/64bit series for Microsoft^{®} Windows^{®} 32/64bit requires:
Microsoft® Windows® 2000/XP/Server 2003/Vista/Server 2008/7/Server 2012/8(.1) or higher installed (Windows 7 or Server 2012 are recommended).
PCcompatible (Intel® Pentium® IV 2 GHz or AMD® Athlon® 2500+ and higher are recommended for better performance) single or multi core/processor computer.
At least 256 MB (512 MB for v. 6.56.6) of free RAM (512 MB (1024 MB for v. 6.56.6) or more are recommended for complex problem modelling and paralleling).
Minimum 100 MB (200 MB for v. 6.56.6) of free hard disk space (200 MB for v. 6.1 and 500 MB for v. 6.56.6 or more are recommended for storing complex problem results).
Web and email access for technical support and program updates.
The PCGrateS(X) v. 6.1 32bit programs have two calculation modes: Normal and Resonance (see Figure #6). In PCGrateS(X) v. 6.56.6 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.56.6 32/64bit.
The Normal mode is used only for absolute efficiency calculations of the reflective uncoated gratings or reflective gratings coated with conformal thin or lowmodulated layers. It enables calculations for concave (convex) gratings, Conical mounts, General Type of polarization states, nonplanar incident waves, and takes into account random roughness and diffuseness in multilayers. The Normal mode is primarily intended for efficiency calculations of any uncoated gratings and is indispensable for the xrayVUV and echelle (echelette) gratings covered with one or many thin conformal layers.
The Resonance mode or Penetrating and Separating solvers are applicable to the efficiency modeling of the Plane and concave/convex (v. 6.5) reflection and transmission gratings which are irradiated by Plane and nonplanar (v. 6.56.6) incident waves in Classical and Conical (v. 6.56.6) mounts and to TE(P), TM(S), NP((S+P)/2), and General polarizations. The borders in the Resonance mode can be nonconformal with possibility to simulate rigorously roughnesses of different types and one can calculate nearzone field diffraction patterns. This calculation mode usually is not as fast as the Normal mode, since it uses integral equation solving on all boundaries and is not based on any asymptotical (physical) assumptions for multilayer gratings. ^{}^{}^{}^{}^{5}^{} As a rule, the Resonance mode takes more physical and virtual RAM. This mode works fast in many practical cases with the exception of very short wavelengths, very high orders, and very deep gratings with high conductivity of the absorbing layers for TM polarization, as well as gratings with very close adjacent borders. In the presence of waveguide modes or other resonance peculiarities connected with the existing covering layer(s), the calculation model used by the Normal solver is not valid. In such cases, one must only choose the Resonance mode.
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 values of the real ( Re) and imaginary ( Im) parts of the refractive index (the electric permittivity and magnetic permeability (v. 6.56.6)) of the substrate in the Resonance calculation mode (v. 6.1) and in the Separating and Penetrating solvers (v. 6.56.6) are preset for Perfect Type of low border conductivity (see Figure #13). However, the values of the real and imaginary parts of the refractive index for the substrate in the Normal calculation mode (v. 6.1) are preset for Finite Type of low border conductivity directly or by connecting RIL. Thus, in the Normal calculation mode, despite choosing the Perfect conductive substrate, the program applies the existing refractive index (the electric permittivity) for the bottom medium and multiplies the efficiencies obtained by the corresponding Fresnel factor. 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 (v. 6.56.6)) for the bottom layer in the Normal and Resonance calculation modes (v. 6.1) and in the Separating and Penetrating solvers (v. 6.56.6) 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.1 and PCGrateS(X) 6.56.6 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_{k}^{ }for the border number k (v. 6.1) or N_{j} for the scan range number j (v. 6.56.6). 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_{k} or 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: Number of terms, % of points N for v. 6.1 or Maximal number of accountable +/ terms or orders for v. 6.56.6. It represents a number of positive or negative terms in the Green functions and their normal derivatives expansions (v. 6.1 and v. 6.56.6) ^{}^{}^{}^{}^{5}^{}^{,}^{}^{}^{}^{}^{7}^{} or a number of plus and minus propagating and evanescent diffraction orders taken into account (v. 6.56.6). 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_{k} (v. 6.1) or N_{j} (v. 6.56.6, 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_{k} or N_{j} and is kept constant (relatively) as N_{k} or N_{j} increases. The number of plus or minus diffraction orders you choose for the Separating solver (v. 6.56.6) 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 special checkboxes from the Green functions and their normal derivatives group (v. 6.1) or the Accelerating convergence button from the Accuracy optimization group (v. 6.56.6) (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 (checkboxes are checked in v. 6.1 or button is pressed in v. 6.56.6 by default) that provides essentially faster convergence and much more accuracy.

