Skip to main content

gds2openEMS: FDTD simulation workflow for RFIC

The files provided here enable openEMS EM simulation with layouts created for the IHP SG13G2 RFIC technology.

Intro

Install

pip install gds2openEMS

Full documentation, installation guide, and usage walkthrough: https://github.com/VolkerMuehlhaus/gds2openEMS

Recent changes

19-Nov-2026 (0.8.0)

gdstk instead of gdspy: the GDSII reader uses gdstk instead of gdspy, which is no longer maintained and whose polygon fracturing could hang. pip install gds2openEMS installs gdstk. The results are the same: read_gds() on all GDS files shipped in workflow/ and more_examples/, with and without via merging, gives every layer the same area as before. The mirror/offset options of read_gds() now also move paths; before, only polygons moved. The same port as gds2palace 0.11 and gds_prepare_for_EM 1.8.

Changed behaviour, the cell read without a cell name: with cellname="" (or a name not in the file), read_gds() reads the design cell: the top-level cell with the largest bounding box, never KLayout's $$$CONTEXT_INFO$$$. Before, it read the first top-level cell, which depends on the order in the file. gds2palace, gds_prepare_for_EM, setupEM and the gds2palace MCP server use the same rule (select_design_cell()).

Fix, via array merging: with merge_polygon_size > 0, merged vias no longer have strips cut out of them. A via array around an opening, e.g. a guard ring of contacts, came out cut open: shrinking back after merging opened the slit that encodes the hole, and, for large arrays, the lines along which the merged shape was split into pieces. The same for derived layers with a negative Oversize. Of the shipped layouts only gsg_through_50ohm.gds changes, by +0.003 % merged via area.

Fix, model files with decimal commas: openEMS and CSXCAD write the numbers of the model file (sub-<n>/<model>.xml) and of the CSX file for the model hash in the number format of the C library. When the program had set a locale with decimal commas (Qt does that from LANG, e.g. a model script that opens a Qt matplotlib window first, with LANG=de_DE), the files got numbers like endCriteria="0,0001", which the openEMS binary does not read as the number, and the model hash changed. The files are now always written with decimal points. The simulation started from Python was not affected: it does not read these files.

17-Nov-2026 (0.7.1)

Model file for the openEMS command line: sub-<n>/<model>.xml is now the complete openEMS model, written with FDTD.Write2XML() (openEMS v0.37.0 and newer): besides geometry, mesh and ports, it has the excitation, the end criterion and the boundaries, so openEMS <model>.xml runs it without Python. Before, it held only the CSX (CSX.Write2XML()), which the openEMS program can't run. runSimulation() prints the command for each excitation, with the options the script passes to openEMS (--engine, --gpu-device, --numThreads, --verbose), since they are not part of the file. Nothing else changes: the simulation still starts from Python as before, and the hash that detects an unchanged model is still taken from the CSX alone, so existing results are not simulated again. With an older openEMS the file holds the CSX only, as before. Checked: the via port line run from the command line gives the same S-parameters as the run from the script.

L6n2 study redone (more_examples/measured_vs_simulated/more_accurate_models_L6n2). All models were run again with a larger simulation box and today's software, so that all numbers and times in the README come from one setup:

  • The box: the PEC walls were too close: 250 µm margin and no air beyond it, with the bottom wall directly under the 180 µm substrate. A sweep of the air around the model (step 0 of the README) shows L 1.8 % too low and the SRF 0.9 % too high with that box. All models now use 250 µm margin and 800 µm air on all sides.
  • The software: gds2openEMS 0.7.0 and openEMS built from source (1d710c2), with its new CPU engine, on the same machine as before. The earlier runs used gds2openEMS 0.5.0 (the 1 µm models with the z mesh fix of 28-Sep-2026, which removed a 0.1 µm cell in TopMetal2) and openEMS v0.0.36 with its default engine; the 1 µm model took 34 min then, 7 min now.
  • The order of the steps: the end criterion now comes before the mesh check, which runs at −60 dB. Before, the mesh was checked at −40 dB, where the low-frequency resistance still carries the truncation error of the end criterion. At −60 dB, peak Q changes by 6 % from 1 µm to 0.5 µm, so the final model now uses a 0.5 µm mesh (102 min).
  • What changed in the results: the conclusions of all steps hold. Against the measurement, the earlier final model (1 µm mesh) was 3.9 % low in L, 8.9 % low in peak Q and within 0.1 % in SRF; the new final model (0.5 µm mesh, box far enough) is 2.1 % low in L, 2.4 % low in peak Q and 0.5 % high in SRF.
  • The comparison with Palace now uses the gds2palace v5 model, whose boundary is far enough away too. The earlier comparison used the v2 model (100 µm margin) and agreed within 1.9 % in peak Q. With both boundaries far enough and the 0.5 µm mesh in openEMS, the two solvers agree within 1.4 % in peak Q and 0.5 % in SRF; L is 2.3 % lower in openEMS, not explained yet.

16-Nov-2026

GPU device: settings['gpu_device'] selects the GPU of the GPU engine on a machine with more than one GPU (default: openEMS takes the best one). It is passed to openEMS only if the installed openEMS has this option; older ones would stop with an unknown-option error, so gds2openEMS prints a warning instead. See Choosing the GPU in the user's guide.

More openEMS messages: openEMS now runs at verbose level 1. Its output adds about 30 lines per excitation: the model statistics (cells, memory of operator and field data, PEC edges, timestep, excitation length, time to build the operator) and, for the GPU engine, the list of GPU devices.

Engine from the environment: without settings['engine'], current openEMS takes the engine from the environment variable OPENEMS_ENGINE. gds2openEMS now writes that engine to time_information.txt too, and warns for OPENEMS_ENGINE=gpu with an openEMS without the GPU engine, as for settings['engine']. Older openEMS ignores the variable; gds2openEMS warns about that. See The engine from the environment in the user's guide.

Full history: CHANGES.md


Note: the gds2openEMS PyPI package itself only requires:

  • gdstk
  • CSXCAD
  • openEMS
  • numpy
  • shapely
  • PySide6

(Other Python modules mentioned above are only needed to run the example/model scripts in this repository, not to use the installed package.)

Metadata

Release files for gds2openEMS 0.8.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gds2openEMS 0.8.0
File Size Uploaded Provenance Actions
gds2openems-0.8.0.tar.gz 254.1 kB Without provenance Details for gds2openems-0.8.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gds2openEMS 0.8.0
File Interpreter ABI Platform Actions
gds2openems-0.8.0-py3-none-any.whl Python 3 none any Details for gds2openems-0.8.0-py3-none-any.whl

Total release size: 498.2 kB

Release files / gds2openems-0.8.0.tar.gz

Download URL gds2openems-0.8.0.tar.gz
Size 254.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0203795a19d70dc2a0c511dde76f71ace8935531f9df04547a188dda5c790c9d
BLAKE2b-256 checksum
How to use checksums
ac4fc65788d52dcf6c332e0511fd9ced66de4828765ef6a806cd5318f770096a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / gds2openems-0.8.0-py3-none-any.whl

Download URL gds2openems-0.8.0-py3-none-any.whl
Size 244.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6ae8faf8a183e087c72b5c36f11574c75cf61a94db5118a99033c4bdf5d9b1b2
BLAKE2b-256 checksum
How to use checksums
57b8ada90de9845e28b79c3caad4abd3ed559846305e03f3e5b52cec904d8ede
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Security for gds2openEMS 0.8.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page