Skip to content
David Bruhwiler edited this page Nov 13, 2017 · 18 revisions

Run the elegant examples from a GUI

We present here the full suite of official elegant example simulations.

These examples are available directly from the development team. Search the page for 'example files and scripts' to quickly find the link.

Each example will be imported into the Sirepo implementation of elegant, with a browser-based GUI to enable immediate use of the code and instantaneous sharing with colleagues.

To date, only a small fraction of the examples have been imported into Sirepo; however, you can help!

Select examples that interest you, from the sidebar along the right -->

We encourage the elegant user community to make changes that will improve the quality of this repository. 😄 If you wish to edit this wiki or otherwise contribute, then please create an issue in this repository requesting access.

Run the elegant examples from the command line

If you prefer to work from the command line, then you can execute the elegant examples from our JupyterHub server

You have to authorize the server with GitHub so it can verify your identity and provide a simulation workspace that persists when you login again from any computer or browser. The server acquires and saves your GitHub username, but never sees your password. RadiaSoft does not use your GitHub username for any purpose other than to identify you when you login to our JupyterHub server.

When you first login, you might see the following screen. If so, just select 'My Server' to activate your personal instance of the server, which provides access to many pre-installed accelerator and radiation codes (Elegant, Warp, Synergia, Opal, Genesis, SRW and Shadow).

Screenshot1

After that, you should see something like the following, except that there will be no files or folders present:

Screenshot2

To upload a Jupyter notebook (aka IPython notebook), or a Python script, or any kind of file at all, click on the 'Upload' button to browse your local computer for files.

To create a subdirectory for organizing your files and notebooks, click on the 'New' button and then select 'Folder'. If you want to rename, delete or move a file or folder, then select the box to its left, which will cause the necessary buttons to appear in the upper-left region of your browser.

To work from the command line in a bash terminal, click on the 'New' button and select 'Terminal'. The terminal window will open in a new tab of your browser, looking something like the following.

Screenshot3

It's just like working in any Linux terminal with bash, but you don't have any X11 features. The working directory is

 /home/vagrant/jupyter/ 

and everything uploaded via the JupyterHub interface will appear within that directory. However, you are free to 'cd' upward and create other directories. You can also 'scp' files to/from other computers.

elegant is pre-installed on the JupyterHUb server, but you need to get copies of the example input and configuration files. One good way to do that is to clone this GitHub repository with the following command:

 git clone https://github.com/radiasoft/elegant.git

You can then find and execute the examples as follows:

 cd elegant/examples
 ls
 cd alphaMagnet
 ls
 elegant compress.ele

This will result in the generation of relevant output files. You will need to know how to post-process and visualize the data generated by elegant.

If you don't know how to post-process or visualize elegant output data, then it is recommended that you work with the Sirepo browser-based GUI. Just click on the relevant example link along the right side of this page. If the example has already been imported into Sirepo, then click the specified simulation link and begin getting results in minutes. If the example has not yet been imported into Sirepo, then feel free to try doing this yourself, or else browse the other examples to find one that is ready to use.

Support

For assistance with using elegant via the Sirepo-based GUI, please create a GitHub issue by clicking on the green 'New issue' button.

If you want to be notified of what's going on with the JupyterHub server (i.e. problems identified, problems solved, code versions updated, etc.), then please 'watch' the GitHub repository.

If you have questions or want to report problems with the JupyterHub server, then please create a GitHub issue by selecting the green 'New issue' button.

If you have problems or questions that you do not want to address in a public forum, then please send us an email to support@radiasoft.net (but we do encourage public dialogue).

Funding Acknowledgements

Support for the development and maintenance of elegant is provided by the US Department of Energy, Office of Science, Office of Basic Energy Sciences, through it's support of Argonne National Laboratory and the Advanced Photon Source.

Sirepo and JupyterHub server development has been supported by the U.S. Department of Energy, Office of Science, under multiple awards, including:

  DE-SC0006284, DE-SC0011340, DE-SC0011237, DE-SC0013855,
  DE-SC0015209, DE-SC0015897, DE-SC0017161, DE-SC0017162,
  DE-SC0017057

The elegant interface is supported by the Office of Basic Energy Sciences under Award Nos.

 DE-SC0006284 and DE-SC0017161.

The suite of 'elegant' examples

Clone this wiki locally