SimCodes
Note
SimFrame, contact Alex Brynes.SimFrame has been tested with the most recent versions of the code below [2025], and may not be compatible with earlier versions.SimCodes is a container for the particle accelerator tracking codes used by SimFrame.
While most of the accelerator code executables are open-source, we prefer not to provide these as an installable package. The user can install the following codes from the links below:
Note that the following python-based simulation packages are included in the dependencies of SimFrame:
SimFrame does, however, require these codes to be accessible. This functionality is provided in various ways.
Creating a SimCodes Directory
One can create a top-level directory containing sub-folders for each tracking code, and instantiate SimFrame
with a simcodes_location argument:
import SimulationFramework.Framework as fw
directory = "/path/to/working_directory"
simcodes_location = "/path/to/simcodes/folder"
fw = Framework(
directory=directory,
simcodes_location=simcodes_location,
)
Alternatively, one can set up SimFrame without this argument and set up the SimCodes location afterwards:
import SimulationFramework.Framework as fw
directory = "/path/to/working_directory"
simcodes_location = "/path/to/simcodes/folder"
fw = Framework(directory=directory)
fw.setSimCodesLocation(simcodes_location)
These executables are then accessible to the run() function of the frameworkLattice object.
In SimulationFramework/Executables.yaml the required structure is provided for this
schema to work for different hardware architectures, either by the OS type or the computer name.
Editing the Executables.yaml file
If the user already has these executables installed, they can point directly to them in
SimulationFramework/Executables.yaml
Pointing to a specific location
An instance of SimFrame has access to these executables via the executables attribute, and these
can be modified once SimFrame is instantiated.
For example, in order to point to a local install of the ELEGANT code, the user can run the following code:
import SimulationFramework.Framework as fw
directory = "/path/to/working_directory"
elegant_location = "/path/to/elegant/binary"
fw = Framework(directory=directory)
fw.executables.define_elegant_command(location=elegant_location)
This will then allow SimFrame to call the correct version of ELEGANT.
Citing the codes used
Please consider citing the code(s) used if any work performed with SimFrame leads to a publication:
K. Floettmann. ASTRA. https://www.desy.de/ mpyflo/. URL: https://www.desy.de/~mpyflo/.
Pulsar Physics. General Particle Tracer. www.pulsar.nl/gpt. URL: http://www.pulsar.nl/gpt.
M. Borland. Elegant: A flexible SDDS-compliant code for accelerator simulation. Proceedings of ICAP'00, Darmstadt, Germany, 2000. URL: https://www1.aps.anl.gov/icms_files/lsnotes/files/APS_1418218.pdf.
M. Dohlus and T. Limberg. CSRtrack : Faster Calculation of 3-D CSR Effects. Proceedings of FEL 2004, Trieste, Italy, pages MOCOS05, 2004. URL: https://accelconf.web.cern.ch/f04/papers/MOCOS05/MOCOS05.PDF.
I. Agapov, G. Geloni, S. Tomin, and I. Zagorodnov. Ocelot: A software framework for synchrotron light source and FEL studies. Nucl. Instrum. Meth. A, 768:151–156, 2014. URL: https://www.sciencedirect.com/science/article/pii/S0168900214010882, doi:https://doi.org/10.1016/j.nima.2014.09.057.
D. Angal-Kalinin, A. Bainbridge, A. D. Brynes, R. K. Buckley, S. R. Buckley, G. C. Burt, R. J. Cash, H. M. Castaneda Cortes, D. Christie, J. A. Clarke, R. Clarke, L. S. Cowie, P. A. Corlett, G. Cox, K. D. Dumbell, D. J. Dunning, B. D. Fell, K. Gleave, P. Goudket, A. R. Goulden, S. A. Griffiths, M. D. Hancock, A. Hannah, T. Hartnett, P. W. Heath, J. R. Henderson, C. Hill, P. Hindley, C. Hodgkinson, P. Hornickel, F. Jackson, J. K. Jones, T. J. Jones, N. Joshi, M. King, S. H. Kinder, N. J. Knowles, H. Kockelbergh, K. Marinov, S. L. Mathisen, J. W. McKenzie, K. J. Middleman, B. L. Militsyn, A. Moss, B. D. Muratori, T. C. Q. Noakes, W. Okell, A. Oates, T. H. Pacey, V. V. Paramanov, M. D. Roper, Y. Saveliev, D. J. Scott, B. J. A. Shepherd, R. J. Smith, W. Smith, E. W. Snedden, N. R. Thompson, C. Tollervey, R. Valizadeh, A. Vick, D. A. Walsh, T. Weston, A. E. Wheelhouse, P. H. Williams, J. T. G. Wilson, and A. Wolski. Design, specifications, and first beam measurements of the compact linear accelerator for research and applications front end. Phys. Rev. Accel. Beams, 23:044801, Apr 2020. URL: https://link.aps.org/doi/10.1103/PhysRevAccelBeams.23.044801, doi:10.1103/PhysRevAccelBeams.23.044801.
E. W. Snedden, D. Angal-Kalinin, A. R. Bainbridge, A. D. Brynes, S. R. Buckley, D. J. Dunning, J. R. Henderson, J. K. Jones, K. J. Middleman, T. J. Overton, T. H. Pacey, A. E. Pollard, Y. M. Saveliev, B. J. A. Shepherd, P. H. Williams, M. I. Colling, B. D. Fell, and G. Marshall. Specification and design for full energy beam exploitation of the compact linear accelerator for research and applications. Phys. Rev. Accel. Beams, 27:041602, Apr 2024. URL: https://link.aps.org/doi/10.1103/PhysRevAccelBeams.27.041602, doi:10.1103/PhysRevAccelBeams.27.041602.