SCAPS-1D

v0.1.0
io.github.asiff00/scaps-mcp Checked 3 days ago Published 1 month ago

Design, simulate, fit and sanity-check thin-film solar cells with SCAPS-1D on your own installation.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

scaps_status SCAPS installation status

Report the SCAPS installation in use and how it was found, other installations, run folder and jobs.

scaps_list_files List SCAPS files

List files in a SCAPS data folder: definitions, spectra, absorption, grading, generation and more.

ParameterTypeDescription
containsCase-insensitive substring filter.
kindstringSCAPS data folder to list.
limitinteger
offsetinteger

scaps_script_reference Search SCAPS script commands

Search the command list of the installed SCAPS version. layer, defect, interface and IFdefect stand for numbered forms (layer2, defect1); contact stands for contactleft or contactright; <none> marks commands without a value.

ParameterTypeDescription
query *stringWords to match, e.g. 'defect Ntotal' or 'action qe'.
limitinteger

scaps_describe_device Describe a SCAPS device

Read a .def file: layers, bulk defects, interfaces with band offsets, contacts and realism checks. Fields use script names and units, so any value can be passed back as a parameter (layers[0].NA -> 'layer1.NA'). Graded layers report their base value.

ParameterTypeDescription
definition *stringDefinition file in SCAPS def/, e.g. 'example CIGS.def'.

scaps_edit_device Edit a SCAPS device

Change a device and save it as a .def file: parameters, layers, defects, materials and solver settings.

ParameterTypeDescription
base *stringExisting definition to start from.
save_as *stringNew definition name, saved in SCAPS def/.
materialsobjectLoad .material files into layers before the operations, e.g. {1: 'CIGSe.material'}.
numericsobjectNumerical settings stored in the .def 'convergence' section, which scripts cannot set, e.g. {'maxiter': 2000, 'clamp_psi': 0.25, 'termination_psi': 1e-4, 'defectdiscretisations': 9}.
operationsobjectOrdered set commands, including structural ones: 'layer2.duplicate', 'layer3.remove', 'layer1.defect1.duplicate', 'layer1.defect2.gauss', 'interface1.2_default_IFdefects', 'layer1.Eg.file': 'profile.g…
overwritebooleanReplace an existing file of that name.

scaps_create_device Create a SCAPS device

Build a new device from scratch and save it as a .def file. A layer may name a .material file ('material': 'CIGSe.material'); its properties apply first and explicit keys override them.

ParameterTypeDescription
layers *arrayLayers from the left (back) contact. Each maps set-command suffixes to values, e.g. {'name': 'absorber', 'thickness': 0.5, 'Eg': 1.55, 'chi': 3.9, 'epsilon': 10, 'NC': 2.2e18, 'NV': 1.8e19, 'mun': 2,…
name *stringNew definition name, saved in SCAPS def/.
interfacesobjectInterface defects by interface number (1 lies between layers 1 and 2), up to 3 each, e.g. {1: [{'Ntotal': 1e10, 'singledonor': null}]}.
left_contactobjecte.g. {'workfunction': 5.1, 'Sn': 1e5, 'Sp': 1e7}; a work function switches flat band off.
numericsobjectNumerical settings stored in the .def 'convergence' section, which scripts cannot set, e.g. {'maxiter': 2000, 'clamp_psi': 0.25, 'termination_psi': 1e-4, 'defectdiscretisations': 9}.
optionsobjectOther set commands, e.g. {'illumination.fromleft': null, 'numerical.Shockley-Queisser_limit.always': null}.
overwriteboolean
right_contactobjectAs left_contact.

scaps_simulate Run a SCAPS simulation

Simulate a device: J-V metrics, QE, C-V, C-f and spatial profiles, with analysis and realism checks. Analysis gives the absorber's Shockley-Queisser limit, QE-integrated Jsc and a Mott-Schottky fit of C-V. Overrides apply to this run only; files stay available through scaps_results and scaps_plot.

ParameterTypeDescription
definition *stringDefinition file in SCAPS def/, e.g. 'example CIGS.def'.
actionsobjectSCAPS action commands, e.g. {'iv.startV': 0, 'iv.stopV': 1.2, 'iv.increment': 0.02, 'qe.startlambda': 300, 'cf.points.per.decade': 5, 'intensity.ND': 1, 'spectrumcutoff.on': null, 'spectrumcutoff.long…
frequency_hzWorking point frequency in Hz.
illuminationstringCalculate under the spectrum or in the dark.
measurementsarrayMeasurements: iv (J-V), qe, cv, cf. May be empty when profiles are requested.
parametersobjectOrdered SCAPS set commands in script units, e.g. {'layer1.thickness': 2, 'layer1.NA': 1e16, 'layer1.defect1.Ntotal': 1e14, 'layer1.defect1.singleacceptor': null, 'interface1.IFdefect1.Ntotal': 1e10, '…
profilesarraySpatial results at the working point voltage: eb (bands, quasi-Fermi levels, carriers, field, currents, generation and recombination rates) and genrec (occupation of every defect level); ac (small sig…
response_formatstringdetailed adds the key columns of each curve.
spectrumSpectrum file in SCAPS spectrum/; default AM1.5G 1 sun.
temperature_kWorking point temperature in K.
voltage_vWorking point bias in V.
wait_secondsnumberWait this long for the result; longer runs continue as a job.

scaps_batch Batch SCAPS simulations

Run one SCAPS session over many parameter values and tabulate the J-V metrics of every point. Covers thickness, doping, defect, band offset, temperature, intensity and bias studies. Every point's files are kept for scaps_results and scaps_plot.

ParameterTypeDescription
definition *stringDefinition file in SCAPS def/, e.g. 'example CIGS.def'.
variables *objectSet or action keys and their values, e.g. {'layer1.thickness': [0.3, 0.5, 1]} or {'workingpoint.temperature': [280, 300, 320], 'intensity.ND': [0, 1, 2]}.
actionsobjectSCAPS action commands, e.g. {'iv.startV': 0, 'iv.stopV': 1.2, 'iv.increment': 0.02, 'qe.startlambda': 300, 'cf.points.per.decade': 5, 'intensity.ND': 1, 'spectrumcutoff.on': null, 'spectrumcutoff.long…
illuminationstringCalculate under the spectrum or in the dark.
measurementsarrayMeasurements: iv (J-V), qe, cv, cf. May be empty when profiles are requested.
modestringgrid runs every combination; zip pairs the lists element-wise.
parametersobjectOrdered SCAPS set commands in script units, e.g. {'layer1.thickness': 2, 'layer1.NA': 1e16, 'layer1.defect1.Ntotal': 1e14, 'layer1.defect1.singleacceptor': null, 'interface1.IFdefect1.Ntotal': 1e10, '…
profilesarraySpatial results at the working point voltage: eb (bands, quasi-Fermi levels, carriers, field, currents, generation and recombination rates) and genrec (occupation of every defect level); ac (small sig…
spectrumSpectrum file in SCAPS spectrum/; default AM1.5G 1 sun.
temperature_kWorking point temperature in K.
wait_secondsnumberWait this long for the result; longer runs continue as a job.

scaps_jobs Manage SCAPS jobs

List recent runs, or get, wait for or cancel one. A finished job includes its full result.

ParameterTypeDescription
actionstringWhat to do.
job_idJob (run) id for status, wait and cancel.
limitinteger
wait_secondsnumberWait this long for the result; longer runs continue as a job.

scaps_results Read SCAPS results

Return one table of a result file: J-V, QE, C-V, C-f curves or band, generation and AC profiles.

ParameterTypeDescription
run_id *stringRun id from scaps_simulate, scaps_batch or scaps_run_script.
columnsColumns to keep; default all.
fileResult file of the run; omit to list the files.
max_rowsinteger
offsetinteger
stepintegerKeep every n-th row to thin long profiles.
tableTable title ('bulk', 'interface') or index; default the main table.

scaps_plot Plot SCAPS results

Render result curves as a PNG image. Requires the optional 'plot' extra.

ParameterTypeDescription
files *arrayResult files of the run to overlay.
run_id *stringRun id.
log_xboolean
log_yboolean
tableTable title or index, as in scaps_results.
title
width_pxinteger
xX column; default the natural axis of the file type.
yY columns; default the key column of the file type.

scaps_run_script Run a SCAPS script

Run a SCAPS script for workflows beyond the other tools: recorder, curve fitting, math, loops, tandem. The server prepends quit and error-log settings and 'clear all'. Commands are checked against the installed SCAPS; file names must be bare; system commands are rejected. Results saved with 'save results.<kind> name' are collected into the run.

ParameterTypeDescription
script *stringSCAPS script text, one command per line.
timeout_sOverride SCAPS_TIMEOUT.
validate_onlybooleanOnly check the script and report problems.
wait_secondsnumberWait this long for the result; longer runs continue as a job.

scaps_sq_limit Shockley-Queisser limit

Detailed-balance Jsc, Voc, FF and efficiency limits for given band gaps under a SCAPS spectrum.

ParameterTypeDescription
band_gaps_ev *arrayBand gaps in eV.
spectrumSpectrum file in SCAPS spectrum/; default AM1.5G 1 sun.
temperature_knumber

scaps_import_file Import a SCAPS file

Add a SCAPS file someone shared (device .def, .material, .abs, spectrum, measurement...) to the installation. Definitions and materials are parsed to confirm they are valid, and files they reference but that are missing (absorption, grading, filter) are listed.

ParameterTypeDescription
content *stringFull text of the file.
kind *stringFile type; decides the SCAPS folder.
name *stringFile name with its SCAPS extension, e.g. 'perovskite cell.def'.
overwriteboolean

scaps_write_data Write a SCAPS input file

Write numeric data as a SCAPS input file with the right format and units. Use it for measured absorption (alpha or extinction coefficient k), custom spectra, external optical generation profiles, contact filters, grading profiles and measurement files for comparison.

ParameterTypeDescription
kind *stringInput file type.
name *stringFile name; the SCAPS extension is added if missing.
x *arrayabsorption: wavelength or photon energy (x_unit); spectrum, filter: wavelength nm; generation: position um; grading: position um, relative position or composition; measurement: V (iv, cv), Hz (cf) or…
y *arrayabsorption: alpha or k (see quantity); spectrum: W/m2/nm or W/m2 per point; generation: G; filter: % transmission or reflection; grading: property in script units; measurement: mA, nF or QE %.
area_cm2numbermeasurement only.
bias_vmeasurement only.
darkbooleanmeasurement only.
extrameasurement only: conductance G in S.
frequency_hzmeasurement only.
interpolationgrading only.
normalise_w_m2spectrum only: scale total power.
noteSource or description, written as comment lines.
overwriteboolean
pin_mw_cm2measurement only.
positionstringgrading only.
quantityabsorption: alpha_per_cm (default), alpha_per_m or k; spectrum: irradiance_w_m2_nm (default) or power_w_m2; generation: per_cm3_s (default) or per_m3_s; grading: the property, e.g. composition, Eg, NA…
sharedbooleangrading only: one profile over adjacent layers.
temperature_kmeasurement only.
x_unitstringabsorption only: unit of x, wavelength or photon energy.

scaps_optimize Fit or optimise a SCAPS device

Fit device parameters to measured curves, or optimise efficiency, Voc, Jsc or FF, by bounded Nelder-Mead. Replaces the GUI-only SCAPS curve fitter and supports several measurements at once (light and dark J-V, QE, C-V). Each simplex step is one SCAPS session per measurement condition; long runs continue as a job past wait_seconds, so poll with scaps_jobs.

ParameterTypeDescription
definition *stringDefinition file in SCAPS def/, e.g. 'example CIGS.def'.
goal *stringfit measured curves, maximise or minimise a J-V metric, or reach a target value.
variables *objectSet or action keys to vary with bounds, e.g. {'layer1.defect1.Ntotal': {'min': 1e12, 'max': 1e16, 'log': true}, 'layer2.thickness': {'min': 0.03, 'max': 0.12, 'start': 0.05}}.
actionsobjectSCAPS action commands, e.g. {'iv.startV': 0, 'iv.stopV': 1.2, 'iv.increment': 0.02, 'qe.startlambda': 300, 'cf.points.per.decade': 5, 'intensity.ND': 1, 'spectrumcutoff.on': null, 'spectrumcutoff.long…
max_evaluationsinteger
measuredarrayFor fit: curves to match together, e.g. [{'kind': 'iv', 'file': 'Numos Ex 1 light.iv'}, {'kind': 'iv', 'x': [...], 'y': [...], 'illumination': 'dark', 'log': true, 'weight': 1}]. Files come from SCAPS…
metricMetric for maximize, minimize and target.
parametersobjectOrdered SCAPS set commands in script units, e.g. {'layer1.thickness': 2, 'layer1.NA': 1e16, 'layer1.defect1.Ntotal': 1e14, 'layer1.defect1.singleacceptor': null, 'interface1.IFdefect1.Ntotal': 1e10, '…
spectrumSpectrum file in SCAPS spectrum/; default AM1.5G 1 sun.
targetTarget value of the metric for goal 'target'.
temperature_kWorking point temperature in K.
wait_secondsnumberWait this long for the result; longer runs continue as a job.