In high energy physics, accelerator physics, and other science disciplines, simulation codes are a vital tool in the research arsenal. The codes often run through the command line, use specialized input files, and sometimes have their own build system.
Learning how to use these codes is hard and can take weeks or months. This means that despite being very useful, many of these codes have only a handful of expert users.
Sirepo was built to bring that kind of scientific computing to the cloud. It’s a gateway for those science codes to be used on a browser, to be accessed via graphical user interface (GUI). By wrapping these codes in GUIs and maintaining them on the backend, we provide a place for scientists to focus on their physics over IT and CS issues.
But even if you’re familiar with codes for accelerators or X-ray beamlines, you might still be thinking, what exactly is Sirepo?
We’ve put together this bird’s-eye view of Sirepo to answer that. Think of it as your crash-course.
In it, we’ll cover how Sirepo relates to various science codes (elegant, WARP, SRW, etc.); how it can help make running simulations easier; how you can share your models with colleagues; and more. Feel free to skip around, or if you want to see Sirepo in action, check out the tutorial video at the bottom of this article.
Sirepo is a digital cloud-based framework for running simulation codes in your browser. It is the software that houses the simulation code, which is why we call it a scientific gateway.
Under the umbrella of Sirepo are a number of apps. These are the codes that Sirepo supports with graphical user interfaces you can access via web browser. These apps all share a similar visual language and interface, making it easy for users to switch between different codes.
Take the popular physics simulation code elegant. Sirepo/elegant is an app that runs elegant in your browser without you having to download, install, or keep the code up-to-date. Through Sirepo, elegant is prepackaged and ready to be used.
We at RadiaSoft believe that science is made better by the free flow of information and tools. That’s why we built Sirepo in the first place, to aid the accelerator community. Therefore, like the codes it supports, Sirepo is open-source.
The physics codes Sirepo currently supports fall into three families: codes for particle accelerators, codes for X-ray optics, and codes with electrostatic PIC capabilities.
The library of supported codes on Sirepo is always expanding. Below we’ll get into a few of the most popular codes and what they do to give you an idea of how versatile the Sirepo gateway can be.
This is a particle accelerator code for electron linacs, synchrotrons, and much more.
According to its user manual, “elegant stands for ‘ELEctron Generation ANd Tracking,’ a somewhat out-of-date description of a fully 6D accelerator program that now does much more than generate particle distributions and track them. elegant, written entirely in the C programming language, uses a variant of the MAD input format to describe accelerators, which may be either transport lines, circular machines, or a combination thereof. Program execution is driven by commands in a namelist format.”
Its full name is Synchrotron Radiation Workshop and it’s an X-ray optics code for synchrotron radiation and coherent X-ray beamlines, such as what you find at the ALS or NSLS-II.
“Frequency-domain near-field methods are used for the SR calculation, and the Fourier-optics based approach is generally used for the wavefront propagation simulation.
“The code enables both fully- and partially-coherent radiation propagation simulations in steady-state and in frequency-/time-dependent regimes. Besides the SR applications, the code can be efficiently used for various simulations involving conventional lasers and other sources. SRW versions interfaced to Python and to IGOR Pro (WaveMetrics), as well as cross-platform library with C API, are available,”according to its GitHub repo.
OPAL or “Object Oriented Parallel Accelerator Library” is a particle accelerator code for linacs and electron guns with 3D space charge. OPAL is open-source and you can learn more about it here.
This is a particle accelerator code for single or multiple bunch rings with 3D PIC. It’s a hybrid Python/C++ package. Learn more about Synergia here.
Originally developed in the 1970s, Zgoubi is a particle accelerator code for electron and ion spin dynamics in rings. Learn more about Zgoubi here.
Sirepo is designed to aid both the beginner and advanced coder. While a GUI interface is beneficial in many ways, there may be operations and tasks a researcher wishes to carry out in the command line.
This is why there are easy exports to other file formats, like a simple zipped file or Python source file. (Accessible from the top menu bar in your workspace, pictured here.)
Similarly, one can import full lattice files for whichever accelerator they wish to model.
Sharing and collaboration is not so smooth when done in the command line. First, software versions must be the same across all instances, or unexpected input file bugs can appear. Second, the files must all reach their destination intact and in full.
This sounds easy, but is harder to do in practice. And any mistakes mean a wrinkle in results or make a simulation impossible to reproduce.
Great science thrives in collaboration. Unlike traditional command line codes, a simulation in Sirepo is easy to share via link sharing.
Every simulation you create in Sirepo has a unique sharing URL, available in the top menu. Simply copy it and send to whomever you wish, and they will have access to an exact copy. It’s as easy as sending an email or a Slack message.
One thing to note is that Sirepo URL sharing is not like Google Docs. The link you share provides the recipient with a separate copy, not access to the original simulation. This way, you don’t have to worry about anyone altering your simulation.
It’s important to remember that Sirepo itself is just the container for the codes above and others. Its features change with the codes’ own capabilities. But no matter which one you use, the interface will stay the same.
That said, the best way to understand Sirepo is to see it for yourself.
We recommend this video tutorial of how to build a FODO cell in elegant: