2.7.2. prismatique.scan.grid_dims_in_units_of_probe_shifts

grid_dims_in_units_of_probe_shifts(sample_specification, scan_config=None, skip_validation_and_conversion=False)[source]

The underlying grid dimensions of a given probe scan pattern, in units of probe shifts.

Parameters:
sample_specificationprismatique.sample.ModelParams | prismatique.sample.PotentialSliceSubsetIDs | prismatique.sample.SMatrixSubsetIDs | prismatique.sample.PotentialSliceAndSMatrixSubsetIDs

The simulation parameters specifying the sample model.

If sample_specification is of the type prismatique.sample.ModelParams, then sample_specifications specifies sample model parameters that are used to construct the model from scratch, i.e. the potential slices for each frozen phonon configuration subset are calculated from said model parameters. See the documentation for the classes prismatique.discretization.Params and prismatique.thermal.Params for discussions on potential slices and frozen phonon configuration subsets respectively. Note that of parameters stored in sample_specification, only the following are used:

  • sample_specification

    • atomic_coords_filename

    • unit_cell_tiling

Otherwise, if sample_specification is an instance of the class prismatique.sample.PotentialSliceSubsetIDs, the class prismatique.sample.SMatrixSubsetIDs, or the class prismatique.sample.PotentialSliceAndSMatrixSubsetIDs, then sample_specification specifies a set of files, where each file stores either the pre-calculated potential slices or \(S\)-matrices for a frozen phonon configuration subset. See the documentation for the aforementioned classes for further discussions on specifying pre-calculated objects. See the documentation for the subpackage prismatique.stem for a discussion on \(S\)-matrices.

scan_configarray_like (float, shape=(num_positions, 2)) | prismatique.scan.rectangular.Params | str | None, optional

If scan_config is a real-valued two-column matrix, then it specifies a set of probe positions, where scan_config[i][0] and scan_config[i][1] specify respectively the \(x\)- and \(y\)-coordinates of the probe position indexed by i, in units of angstroms, with 0<=i<num_positions and num_positions being the number of probe positions. If scan_config is of the type prismatique.scan.rectangular.Params, then it specifies a rectangular grid-like pattern of probe positions. See the documentation for this class for more details. If scan_config is a string, then scan_config is a path to a file that specifies a set of probe positions. The file must be encoded as ASCII text (UTF-8). The file should be formatted as follows: the first line can be whatever header the user desires, i.e. the first line is treated as a comment; each subsequent line except for the last is of the form “x y”, where “x” and “y” are the \(x\)- and \(y\)-coordinates of a probe position, in units of angstroms; and the last line in the file should be “-1”.

Since periodic boundaries conditions (PBCs) are assumed in the \(x\)- and \(y\)-dimensions, \(x\)- and \(y\)-coordinates can take on any real numbers. If scan_config is set to None, [i.e. the default value], then the probe is to be scanned across the entire unit cell of the simulation, in steps of 0.25 angstroms in both the \(x\)- and \(y\)-directions.

skip_validation_and_conversionbool, optional

If skip_validation_and_conversion is set to False, then validations and conversions are performed on the above parameters.

Otherwise, if skip_validation_and_conversion is set to True, no validations and conversions are performed on the above parameters. This option is desired primarily when the user wants to avoid potentially expensive validation and/or conversion operations.

Returns:
grid_dims“N/A” | array_like (float, shape=(2))

If prismatique.scan.pattern_type(scan_config) == "no underlying rectangular grid", then grid_dimensions_in_units_of_probe_shifts == "N/A", indicating that there is no notion of grid dimensions that is applicable to the scan pattern used. Otherwise, if prismatique.scan.pattern_type(scan_config) != "no underlying rectangular grid", then grid_dims[0] and grid_dims[1] are the number of probe positions along the \(x\)- and \(y\)-dimensions respectively of the underlying rectangular grid of the scanning pattern.