PDGui Settings Reference¶
This reference describes the keys in each tab’s settings dictionary. Use
these exact names, including spaces and capitalisation, in a saved PDGui
Python script. The PDGui guide describes the corresponding windows.
Save settings on the Main Tab provides a working starting point. For example:
tab = self.notebook.settingsTab
tab.settings['Sigma value'] = 5.0
tab = self.notebook.scenarios[0]
tab.settings['Legend'] = 'ZnO, parallel polarisations'
tab = self.notebook.plottingTab
tab.settings['Minimum frequency'] = 100.0
tab.settings['Maximum frequency'] = 800.0
tab.settings['Frequency increment'] = 1.0
Run the saved script with pdgui -script script.py. Scenario indices start
at zero. Set up the required spectroscopy and scenario type before editing
its settings; changing a type string alone does not reconstruct a tab.
Values below are Python values: use True and False for switches,
quoted strings for choices, and lists for arrays. Defaults refer to a newly
created tab and can be replaced by the input file or a restored session.
Entries marked derived, legacy or reserved are included because they
can occur in the dictionary, but are not independent calculation controls.
Main Tab¶
Use self.notebook.mainTab.settings.
ProgramInput reader:
'Abinit','Aims','Castep','Crystal','Experiment','Finite_field','Gulp','Phonopy','Quantum espresso','Vasp'or'PDGui'. The last choice reads a saved session. See Other Software Components for supported inputs, including Experimental File Format and Finite-Difference and Finite-Field JSON Format.Menu labels, saved reader names and CLI options are distinct:
Table 6 Reader names¶ Menu label
Saved
settings['Program']CLI
-programvalue (pdgui and preader)Quantum Espresso
'Quantum espresso'qeFinite field
'Finite_field'finite_fieldOutput file nameName of the calculation output to read. Saved sessions use the notebook’s working directory for associated files; retain companion input files required by the reader.
Excel file nameDestination spreadsheet name, ending in
.xlsx. An empty string means no spreadsheet has been selected.Script file nameFilename used by Save settings for the Python session script.
Compatibility modePlatform metadata, normally
'Linux'or'Window'. The current tab records this value but does not use it to select a calculation method.
Settings Tab¶
Use self.notebook.settingsTab.settings. These settings are common to all
scenarios. See Theory for Infrared Absorption in Powders for the dielectric response from normal
modes and Theory for Powder Raman for Raman tensors and activities.
Spectroscopy type'Powder Infrared','Powder ATR','Crystal Infrared','Powder Raman'or'Crystal Raman'. Selects the family of calculations and available scenario controls. Use a saved session of the required type or the Settings Tab spectroscopy selector to establish matching scenarios.Eckart flagBoolean, default
True. Projects out translational motion when rebuilding the dynamical matrix, helping to enforce the acoustic modes.Neutral Born chargesBoolean, default
False. Enforces charge neutrality on the Born effective charges before calculating the dielectric response.Sigma valueCommon Lorentzian half-width in cm⁻¹, default
5. Supplies the mode broadening; individual linewidths are held intab.sigmas_cm1.Mass definition'average'uses average atomic masses;'program'uses masses from the calculation;'isotope'uses the isotope mass table;'gui'uses user-entered masses fromtab.masses_dictionary. Default'average'. Mass changes affect the normal modes and their response.Optical permittivityThe dimensionless high-frequency dielectric tensor as a 3 × 3 nested list. Initially
None; normally obtained from the reader. Used for the dielectric background, local fields and NAC calculations. See Theory for Infrared Absorption in Powders and Theory for Crystal Layer Raman.Optical permittivity editedBoolean recording a manual tensor override. Set
Truewhen supplyingOptical permittivityexplicitly so that refresh and session saving preserve the edited tensor.Symmetrise optical permittivityBoolean, default
True. Applies the available crystal symmetry to the optical tensor;Falseretains the unsymmetrised reader tensor.Raman activity units'polarizability'displays activities in Å⁴/amu;'epsilon'uses the internalR_epsilonactivity convention in Å/amu. This changes the Settings table and Raman polar display, not the physical scenario spectrum. See Theory for Powder Raman for the tensor conventions.
The selected-mode mask, individual linewidths, masses and NAC diagnostic
controls are not additional settings[] keys. Saved scripts may also
contain assignments to tab attributes such as modes_selected,
sigmas_cm1 and masses_dictionary; retain those assignments when
reproducing a session.
Scenario Tabs: Common Settings¶
Use self.notebook.scenarios[index].settings. The following keys are
inherited by powder and crystal scenarios.
LegendText used to identify the scenario in plot legends and output.
Scenario typeRecords the scenario family. This is session metadata; use the notebook’s scenario creation and spectroscopy controls to change the type.
Materials databasePath to the Excel materials database, normally
MaterialsDataBase.xlsx. Provides support matrices and optical layer materials. See the materials database description in Other Software Components.
Powder Infrared and Powder ATR¶
Use a powder scenario’s settings dictionary. Most particle and support
settings are also present in Powder Raman, with the qualifications below.
See Theory for Infrared Absorption in Powders for effective-medium and particle-shape theory.
MatrixSupport-material name in the materials database, initially
'ptfe'.'Material defined manually'selects a user-defined constant support. Powder Raman also accepts'none': this uses the bulk TO Raman response without support local-field or particle NAC/EO corrections.Matrix densitySupport density in g/cm³. Normally supplied by the database; a positive manual value is used to convert between mass and volume fractions.
Matrix permittivityDimensionless constant support permittivity for a manually defined material; may be complex. Database materials can instead provide a frequency-dependent response.
Mass fractionCrystallite mass fraction between zero and one, not a percentage. The corresponding volume fraction is calculated using the densities.
Volume fractionCrystallite volume fraction between zero and one, not a percentage. Controls the effective-medium mixture and scales the powder Raman response. Default
0.1.Mass or volume fraction'mass'or'volume'identifies which fraction is the independent input when converting the other; default'volume'.Bubble volume fractionFraction of additional air voids, between zero and one; default
0. Used in the powder infrared mixture calculation.Bubble radiusAir-void radius in µm, default
30. Used by the infrared bubble correction when the bubble fraction is non-zero.Effective medium method'Maxwell-Garnett'or'Bruggeman'selects an effective-medium model;'Averaged Permittivity'averages the crystallite response;'Mie'includes finite-size spherical scattering. These choices govern powder infrared/ATR, not the separate Raman tensor calculation. See Theory for Infrared Absorption in Powders.Particle shape'Sphere','Needle','Plate'or'Ellipsoid'. Determines the depolarisation tensor and hence local fields and particle response.Particle size(mu)Particle radius in µm, default
0.0001. Relevant to finite-size infrared scattering, particularly Mie; not a Raman mode linewidth.Particle size distribution sigma(mu)Width parameter for the infrared particle-size distribution, default
0for a single size. This is the lognormal distribution parameter, not a Lorentzian frequency width.Ellipsoid a/bAxial aspect ratio for an ellipsoid; default
1gives a sphere.Unique direction - hFirst component of the particle’s unique direction.
Unique direction - kSecond component of the particle’s unique direction.
Unique direction - lThird component of the particle’s unique direction. Together the three keys specify a direct-lattice [abc] axis for a needle/ellipsoid or an (hkl) surface normal for a plate. The default is
[0, 0, 1]; spheres do not use this direction. See Theory for Infrared Absorption in Powders.ATR material refractive indexReal refractive index of the ATR prism, default
4. Powder ATR only; see Calculation of ATR Extinction Spectra.ATR thetaATR incidence angle in degrees, default
45.ATR S polarisation fractionFraction of s-polarised illumination:
0is pure p,1is pure s, and0.5is an equal mixture. Used to combine ATR responses.
Powder Raman¶
These keys supplement the common scenario and powder particle settings. See Theory for Powder Raman for orientation averaging, internal fields, particle-corrected phonons and the electro-optic contribution.
Raman laser wavelengthLaser wavelength in nm. A positive number, default
785; determines the excitation and Stokes frequency factors. Do not supply a frequency in Hz or cm⁻¹.Raman laser polarisation'VV'selects parallel polarisations,'VH'and'HV'select crossed polarisations, and'Unpolarised'selects the unpolarised response. Default'VV'.Raman temperatureTemperature in kelvin, default
298. Controls the Stokes thermal population factor.Raman orientation samplesNumber of numerical orientations for non-spherical particles. The GUI offers
4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096; default512. Increase to check convergence. Spheres use an analytic average.Raman electro-optic termBoolean, default
Falsefor a new powder scenario. Includes the electro-optic contribution when particle correction data and χ⁽²⁾ are available. Has no effect forMatrix = 'none'. See Theory for Powder Raman.
Crystal Infrared and Crystal Raman: Layers¶
Use a crystal scenario’s settings dictionary. See
Theory for Single Crystal Infrared Optics for the optical stack, orientation conventions
and coherent/incoherent propagation, and Theory for Crystal Layer Raman for Raman fields.
Global azimuthal angleRotation of the stack about its surface normal, in degrees; default
0.Angle of incidenceIncident angle from the surface normal in the superstrate, in degrees; default
0. See Crystal & Laboratory Coordinate Frames.Mode'Scattering matrix'(default) or'Transfer matrix'for the infrared optical solver. Scattering matrices avoid numerical problems that transfer matrices can encounter in strongly absorbing thick layers. See Theory for Single Crystal Infrared Optics.Layer material namesList of database material names, in order from superstrate to substrate.
'Dielectric layer'denotes the material read from the calculation. The initial stack is['air', 'Dielectric layer', 'air'].Layer hklsOne three-component (hkl) surface normal per layer. Used for anisotropic layers; isotropic layers do not need a crystal orientation.
Layer azimuthalsOne in-plane rotation in degrees per layer, applied with its surface orientation and the global azimuthal angle.
Layer thicknessesOne thickness per layer, in the corresponding
Layer thickness units. The first and last layers are semi-infinite ports, so their stored thicknesses do not represent finite films.Layer thickness unitsList of length-unit strings:
'ang'(Å),'nm','um','mm'or'cm'. The GUI offers the latter four; scripts can also use'ang'. Keep the list aligned with the thicknesses.Layer incoherent optionsOne optical propagation choice per layer:
'Coherent'retains phase;'Incoherent (intensity)'propagates intensities;'Incoherent (phase averaging)'averages sampled phases;'Incoherent (phase cancelling)'removes propagation phase; and'Incoherent (non-reflective)'treats a non-reflecting thick layer. See Theory for Single Crystal Infrared Optics. These are optical layer choices, distinct from the RamanDepth coherenceandLayer combination.Layer dielectric flagsBoolean list marking layers that use the loaded dielectric material. Keep these flags consistent with
Layer material names; the initial three-layer stack uses[False, True, False].
All seven layer lists must have the same length. Saved sessions restore the layer objects from these lists; live layer edits should use the layer editor so that both the objects and their serialised settings remain consistent.
Percentage average incoherencePhase range as a percentage of a full 2π cycle, default
100. Used for layers with phase averaging.Number of average incoherence samplesNumber of phase samples per phase-averaged layer, default
10. Multiple such layers require combinations of their sampled phases.Percentage partial incoherenceStrength of the infrared partial-incoherence sampling, default
0(disabled). Randomly perturbs the active crystal thickness, orientation and incidence angle; this is separate from phase averaging.Partially incoherent samplesNumber of random samples for that infrared average, default
20.Filter kernel sizeSavitzky–Golay smoothing window for the partially incoherent infrared spectrum. Default
1disables smoothing; an enabled window must be odd, exceed the polynomial order, and fit within the spectrum length.Filter polynomial sizePolynomial order for that smoothing filter, default
3. Relevant only when the kernel size is greater than two.Frequency unitsLegacy stored value, initially
'wavenumber'. The current crystal tab does not consume it; select display units with Plotting’s singularFrequency unitkey.
Crystal Raman: Scattering and Coherence¶
These settings supplement the crystal layer settings. See Theory for Crystal Layer Raman for the scattering geometry, reciprocal fields, NAC/EO corrections and the different coherence choices.
Laser wavelength nmPositive laser wavelength in nm, default
532.Incident polarisation'p'or's'selects the incident channel; default'p'. Mixed coherent polarisations can be represented by a two-component complex Jones vector in p/s order, as produced by a saved Porto setup.Detected polarisation'p'or's'selects an analyser, while'unpolarised'sums the two detected intensities. Default'p'. A two-component complex p/s Jones vector specifies a coherent analyser combination. Summing unpolarised intensities is different from summing field amplitudes.Temperature KTemperature in kelvin, default
298, used in the Stokes population factor.GL point densityGauss–Legendre integration-point density per µm of active material, default
20. Increase to check depth-integration convergence.Collection side'superstrate'collects backscattered light on the incident side;'substrate'collects forward-scattered light. Default'superstrate'.Collection angleCollection angle in degrees.
-1(default) requests automatic geometry; other values specify a signed angle explicitly. Automatic collection uses minus the incidence angle on the superstrate side (retro-backscattering) and plus the incidence angle on the substrate side (forward collection). An explicit positive angle equal to incidence selects the historical specular-reflection geometry on the superstrate side.Layer combination'Incoherent intensities'(default) sums the layer intensities;'Coherent amplitudes'sums complex layer amplitudes before squaring. Coherent layer combination is unavailable with incoherent depth integration.Depth coherence'Coherent amplitude'(default) integrates amplitudes over depth before squaring.'Incoherent intensity'integrates local intensities. This is a Raman emission choice, not the optical layer’s propagation coherence.Approximate ESScript-only boolean, default
False. IfTrue, evaluates the reciprocal detector field once at the laser frequency instead of at each mode’s Stokes frequency, retaining the resolved collection geometry. The incident field is reused only when the optical system and signed angle match. This changes the optical approximation; see Theory for Crystal Layer Raman.Coalesce equivalent layersScript-only boolean, default
True. Merges adjacent equivalent coherent layers before Raman integration.Falseretains the original layer boundaries and is useful for subdivision checks.Raman electro-optic termBoolean, default
Truefor crystal scenarios. Includes χ⁽²⁾ in the NAC-corrected Raman tensors when those data are available. Disabling it retains the NAC frequency correction without the EO tensor contribution.Layer NAC mode'none'uses bulk TO modes;'geometry'(default, displayed as Snell’s law) obtains phonon momentum from the macroscopic geometry;'dominant_mode'uses the dominant internal Berreman mode;'modal_pairs'(All modes) resolves the internal optical mode pairs. GUI labels may append (EO); that suffix is not part of the stored value.Modal pair combinationUsed with
Layer NAC mode = 'modal_pairs'.'Group q channels'(default) combines amplitudes sharing a phonon momentum and detector channel.'Incoherent pairs'squares pairs separately for comparison with older calculations.'Coherent all pairs'is a diagnostic option that mixes distinct phonon final states. See Theory for Crystal Layer Raman.Modal pair final-state modelFor incoherent-depth modal-pair calculations,
'Bulk phase matched'(default) selects internal momenta relative to the external transfer.'Local incoherent'assigns local field components to the externally selected phonon state without the q-angle filter.Modal pair q-angle toleranceMaximum angle in degrees between internal and external momentum transfer, from
0to90. Default90accepts the forward hemisphere in the bulk phase-matched model. Inactive for local incoherent depth.Modal pair include zero qReserved/legacy entry, initially
None. It is retained in the dictionary but is not read by the current scenario calculation; it does not control zero-momentum channel selection.Azimuthal sweep pointsPositive integer number of angles over 0–360°, excluding the repeated endpoint; default
36. Used when opening an azimuthal sweep.Porto notationStored normal-incidence geometry text, initially empty. For example,
'x(yy)x'denotes the backscattering shorthand and'x(yz)+x'explicit forward scattering. Applying the Porto entry in the GUI sets the layer normal, angles, collection side and polarisations. Preserve these accompanying values in a script; assigning the text alone is not a replacement for applying the geometry. See Crystal Raman Scenarios.Phonon boundary correctionLegacy key from older sessions. With
Layer NAC mode = 'none', the old values'NAC','slab-environment'and'slab'map to'geometry'. UseLayer NAC modein new scripts.
Plotting Tab¶
Use self.notebook.plottingTab.settings.
Minimum frequencyLower calculation limit in cm⁻¹, default
1. Stored in wavenumbers regardless of the chosen display unit.Maximum frequencyUpper calculation limit in cm⁻¹, default
200.Frequency incrementCalculation-grid spacing in cm⁻¹, default
0.2. Use sufficiently small spacing to resolve the selected mode linewidths.Frequency unitDisplay unit:
'wavenumber'(cm⁻¹),'THz','GHz', or the wavelength units'ang','nm','um','mm','cm','m'. Wavelength is reciprocal to frequency; the calculation-grid settings above remain in cm⁻¹.Molar definition'Unit cells'(default),'Atoms'or'Molecules'sets the amount used to normalise powder molar absorption. See Theory for Infrared Absorption in Powders.Number of atomsNumber of atoms per molecule for
Molar definition = 'Molecules'; default1. Used with the unit-cell atom count and volume to calculate the molecular concentration.Plot typeExact curve name. Powder infrared offers
'Powder Molar Absorption','Powder Absorption','Powder Real Permittivity'and'Powder Imaginary Permittivity'. Powder ATR additionally offers'Powder ATR'. Raman uses'Powder Raman'or'Crystal Raman'. Crystal infrared offers'Crystal Reflectance (P polarisation)','Crystal Reflectance (S polarisation)','Crystal Transmittance (P polarisation)','Crystal Transmittance (S polarisation)','Crystal Absorbtance (P polarisation)'and'Crystal Absorbtance (S polarisation)'. Preserve the historical spelling Absorbtance in scripts. See Theory for Infrared Absorption in Powders, Calculation of ATR Extinction Spectra, Theory for Single Crystal Infrared Optics, Theory for Powder Raman and Theory for Crystal Layer Raman for the corresponding observables.Spectrum renormalisation'none'retains the spectrum’s units;'max=1'divides each curve by its peak;'area=1'divides by its integrated area.'layer depth'is available for Crystal Raman and divides by the total active-layer depth. These are plotting normalisations.Scenarios to plotList of booleans, one per scenario in notebook order, for example
[True, False, True]. Controls visibility. An initially empty list is expanded by the tab to match the scenarios.concentrationDerived molar concentration in mol/L for the selected molar definition. Recalculated from the cell volume, atom count and molar definition; set those inputs rather than this value directly.
cell concentrationDerived unit-cell concentration in mol/L, used in molar normalisation.
Analysis Tab¶
Use self.notebook.analysisTab.settings. See Phonon Analysis for the
internal/external and molecular decomposition of modes.
RadiiList of covalent radii in Å, in the tab’s element order. Initially
None; populated from the element table and editable thereafter.Minimum frequencyLower frequency shown in the analysis plot, in cm⁻¹; default
-1.Maximum frequencyUpper frequency shown in the analysis plot, in cm⁻¹; default
400.titleAnalysis plot title, default
'Analysis'. This key is lower case.Covalent radius scalingMultiplier on the sum of the atomic covalent radii when deciding bonds; default
1.1. Changes molecular grouping and therefore mode analysis.Bonding toleranceAdditional distance in Å added to the scaled sum of radii when deciding bonds; default
0.1. Bonding information is also used by the Viewer.Bar widthWidth of the mode bars in the analysis plot, default
0.5.
3D Viewer Tab¶
Use self.notebook.viewerTab.settings. These are display settings; they do
not change the calculated spectrum. Colours use [red, green, blue, alpha]
with integer components from zero to 255.
Selected modeOne-based phonon number to display/animate; initially
4. This differs from zero-based Python array and scenario indices.Atom scalingMultiplier on covalent radii for atom spheres, default
0.5.Maximum displacementMaximum displayed displacement in Å, default
1. Scales the vibration for viewing rather than changing the normal-mode eigenvector.Bond colourBond-cylinder RGBA colour, default
[80, 80, 80, 255].Bond radiusBond-cylinder radius in Å, default
0.1.Cell colourUnit-cell edge RGBA colour, default
[255, 0, 0, 255].Cell radiusRadius of the cell-edge cylinders in Å, default
0.1.Text colourCell-label RGBA colour, default
[255, 255, 0, 255].Text sizeCell-label font size, stored as a string; default
'24'.Background colourViewport background RGBA colour, default
[120, 120, 120, 255].Arrow colourDisplacement-arrow RGBA colour, default
[0, 255, 0, 255].Arrow radiusDisplacement-arrow radius in Å, default
0.07.Number of phase stepsNumber of displacement steps for the animation, default
41. Must be odd; the Viewer increases an even value by one.Super CellThree positive integer repetitions along the cell vectors, for example
[2, 2, 1]. Default[1, 1, 1].Transform3 × 3 lattice transformation, normally stored as nested lists of strings. Default identity. Changes the displayed cell; see The Transformation Window.
Primitive transformDerived transformation obtained from the reader when the primitive-cell action is used. Normally preserve the value saved by that action.
hklThree-component surface normal used to orient the view, default
(0, 0, 1). See Crystal & Laboratory Coordinate Frames.uvwThree-component direct-lattice direction used to orient the view, default
(1, 0, 0).Element palette'Jmol'(default) or'Vesta'selects the element colour table; other names fall back to the built-in elemental palette.Element coloursOptional list of RGBA colours in the Viewer species order, overriding the palette for those species. Initially
None.Toggle statesFive booleans in this order: cell labels, cell edges, orientation axes, bonds, atoms. Default
[True, True, True, True, True].
Fitter Tab¶
Use self.notebook.fitterTab.settings. The Fitter compares an experimental
spectrum with the selected calculated spectrum; see the Fitter section in
PDGui for the fitting workflow and experimental spectrum columns.
Experimental file nameFilename of the measured spectrum to compare, initially empty. This is a frequency/intensity spectrum, distinct from an
.expmaterial input.Plot titleComparison plot title, initially
'Experimental and Calculated Spectral Comparison'.Fitting type'Minimise x-correlation'selects the correlation-based objective;'Minimise spectral difference'selects the spectral RMSE objective. The optimisation adjusts selected linewidths and, optionally, frequency scale.Number of iterationsOptimisation iteration control, default
20.Frequency scaling factorMultiplier on calculated frequencies in the comparison, default
1. Does not rescale the underlying normal modes in the input reader.Optimise frequency scalingBoolean, default
False. Includes the frequency scaling factor among the variables adjusted during fitting.Independent y-axesBoolean, default
True. Plots experimental and calculated spectra on independent y axes;Falseuses a shared intensity axis.Spectral difference thresholdThreshold applied after intensity normalisation when calculating the spectral difference, default
0.05. Values below it are set to zero in the comparison objective.Baseline removalBoolean, default
False. Applies a Hodrick–Prescott background removal to the resampled experimental spectrum.HPFilter lambdaBase-10 logarithm of the Hodrick–Prescott smoothing parameter, default
7(a coefficient of 10⁷). Used when baseline removal is enabled.Scenario indexZero-based index of the scenario being fitted; initially the last scenario in the notebook.
Spectrum scalingLegacy boolean, initially
False. The current Fitter stores this value but does not apply it in the plotting or fitting calculation.Spectrum scaling factorLegacy multiplier, initially
1. Retained withSpectrum scaling; it is not an active intensity-scaling control in the current Fitter.