State-of-the-art science on Steem: towards a new Python program for particle collision simulations

in #utopian-io6 years ago (edited)

Particle physics is living an exciting time. The Run 2 of the Large Hadron Collider at CERN is ongoing until the end of 2018, its Run 3 is expected to start in 2021 and the results to be collected promise a greater understanding of the Standard Model of particle physics and beyond. However, the exploration of the fundamental laws of Nature, beyond the Standard Model, depends on our ability to implement, in relevant simulation tools, any model physicists could dream of.


FROM EQUATIONS TO SIMULATIONS



[image credits: Stinging eyes (CC BY-SA 2.0)]

The FeynRules program has been developed in this context. Based on Mathematica, it allows to connect a Lagrangian, an equation containing in a non-ambiguous way the definition of a particle physics model, to numerical tools.

The strength of this approach is that a Lagrangian is a very compact and simple equation, and thus easy to implement or write down on a sheet of paper.

In contrast, numerical tools require to expand the Lagrangian into hundreds (sometimes thousands) of different particle interactions and implement them in a given programming language.


THE DRAWBACKS AND THE REASON FOR A NEW UTOPIAN.IO/STEEMSTEM PROJECT



[image credits: Simon Phipps (CC BY 2.5)]

Whilst FeynRules works very well, is open-source and is widely used in the high-energy physics community, it relies on Mathematica, a very expensive package.

The aim of this project is very simple: together with a team of developers to be formed, we will develop a Python version of FeynRules that anyone could run for free, without having to rely on a barely affordable framework.


The choice of the Python language is motivated by the fact that the UFO format, the standard way to share particle physics model information, already relies on the Python language.

Moreover, Python is widely used in high-energy physics, so that this choice ensures the best potential compatibility with existing frameworks.


IN PRACTICE



[image credits: Nick Youngson (CC BY-SA 3.0)]

This project is expected to run over the next 6 months. Well, more or less; we are not in a hurry but we hope to de able to deliver something soon as well too. Therefore, we will form the team quickly (this will take less than a week) and we will immediately start working.

The development will be divided in several big milestones, all of them involving discussions, brainstorming, as well as practical work.

More into details, the roadmap can be seen as follows.

  1. Discussion about the general infrastructure.
  2. Design of the input format, based on the FeynRules input format, and development of the corresponding readers.
  3. Design of internal tools allowing to connect a Lagrangian to factorized model information (particle content, model parameters, interactions, etc.).
  4. Design of algebraic methods allowing one to simplify the interactions as much as possible (aiming efficiency at the level of the simulation tools).
  5. Design of UFO writers.
  6. Test and validation.

Thanks to Utopian.io and SteemSTEM, all the work will be rewarded not only with STEEMs, but also with options to participate to particle physics workshops all over the world and to write (open access) scientific publications.

Please move on with Utopian.io and SteemSTEM to contribute to state-of-the-art particle physics. This post can be seen as a call of interest to join the development team currently being formed. Please leave us a comment!

Sort:  

This is an incredibly ambitious project, and a pretty darn impressive one to boot. I'm so happy to know that Utopian will have a part in making this idea come to fruition.

The post itself is well written and illustrated, if a little brief. But that, I suspect, is more of an issue of the nature of the post than a critique of its quality.

Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Write a ticket on https://support.utopian.io/.
Chat with us on Discord.
[utopian-moderator]

Concerning brevity, I indeed keep the more technical details for the next step. This consists more in an introduction to the project in order to assess who is on board. Also, with physics, one is quickly lost in details :)

Thanks for your support (as well as a utopian support)!

PS: I think this is my shortest post on Steem ever ;)

Thank you for your review, @didic!

So far this week you've reviewed 5 contributions. Keep up the good work!

Nice, I also lead development of several scientific packages in Python. Most recently, we've been working on hetmech, which is a toolset for network analyses. We make heavy use of numpy (arrays), scipy (sparse matrices), and pandas (dataframes). I'm guessing your project will share many of the same dependencies?

The scipy and numpy packages will definitely be used, as one needs to develop some algebraic methods involving spinors and four-vectors, deal with complex numbers, matrices, etc... I am not too sure pandas will be needed here (I however do not know the package).

Would you be interested in taking part of the development of this program? I would be happy to discuss in more details the needs of the project with you.

Pandas is for tables with columnar data, i.e. when every value in a column is the same type, but different columns may have different types. There's also a young package named xarray, which extends numpy arrays with better axis labels and axis matching between datasets.

Would you be interested in taking part of the development of this program? I would be happy to discuss in more details the needs of the project with you.

I don't have a ton of time at the moment, but the most efficient way for me to get involved would be if you tag @dhimmel on a GitHub Issue or Pull Request (or on Steem) when you have a question. Happy to help in small ways like:

  1. style review of code
  2. continuous integration help
  3. help setting up conda environments
  4. pandas questions
  5. numpy or scipy.sparse questions

Cheers

I was not considering tabulating the data needed by the code (the inputs) because they are not that large, but I will think about it. If this could help for manipulating them, I am all good. In any case, everything will be pubic and transparent, so... :)

Thanks for proposing your help with the time you have. Appreciated! :)

After talking to you in Italy and hearing what this project is about I'm really excited about the thought of being involved - can't wait to see this get off the ground!

I am also very excited by your motivation! This makes me confident this project could work and that something will be delivered. Fingers are crossed! In the meantime, I am already preparing the point 1 of the to-do list :)

Hi @lemouth, do scientist in particle physics (especially in CERN) have their own preferred standard for Unit of Measurement? I have been wondering for a while since I only know 2 standard, SI and UCUM.

Btw, I highly recommend looking at dask in case you want to scale the project in the future. It's a library to design distributed and scalable computation. I've used it before to scale some task related to image processing that was written using OpenCV-python.

In particle physics, things are very easy. We use a system of units where the speed of light and the Planck constant are both equal to 1. In this case, anything can be expressed in terms of a power of an energy unit, that is usually some multiple of the electronvolt. At the LHC, the standards are thus GeV or TeV.

Concerning the dask part, I am not sure to follow. How the project should be scaled? The goal is well defined and I don't see what to add next (OK, this is not true, I have a couple of ideas but this still makes the project small). Do you mind elaborating a little bit? Thanks in advance!

I see, so most of the units are derived from Joule (if using SI) or electronvolt (if using UCUM). About Dask, it's an escape hatch in case the performance is slow or not satisfying. When the developer writes an algorithm using numpy/scipy/pandas, most of the time the computation are single threaded (using 1 core CPU) because of the nature of Python interpreter. Another thing is pandas will load the data into memory so we need to be careful when loading a huge amount of data (because it will exhaust the RAM).
For easier and faster development, writing it as the usual using numpy, scipy, etc could be an ideal solution for a community project. However, if the performance becomes a problem later on, Dask can be a solution by plugging the modules that have been written before into it (using Dask.delayed in my case). Just make sure most of the programs/libs (that not using Dask) are small enough that later on can be reused in other projects. This way it will be easier to break it down into multiple tasks and Dask will take care of the parallelization (multi core computation) and the scheduling (it can even make the computation distributed into multiple machines).

Joules are in fact not appropriate for particle physics as one will need too many decimals for anything :)

This project requires to develop a tools that is fast and efficient, so that parallelization will be in order (for the heavy part of the calculations to be done). But good to know that options like Dask exist. Of course, this will not be that relevant at the beginning, but definitely later.

Thanks for the inputs!

Hey @drsensor
Here's a tip for your valuable feedback! @Utopian-io loves and incentivises informative comments.

Contributing on Utopian
Learn how to contribute on our website.

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

i heard M.I.T. say "julia" is the future for supercomputing

https://www.techrepublic.com/article/is-julia-the-next-big-programming-language-mit-thinks-so-as-version-1-0-lands/

it's ofcourse something they developed themselves so they might suffer from observers paradox (i call it that .. probably not the psychological term)

but, then again

https://julia.mit.edu/
https://julialang.org/

it's M.I.T. ... one of the more respectable bits about the US of A lol

most of you here probably already heard of it, sadly i havent written one word of Python in my life yet ... maybe if this takes off i could jump on the bandwagon and start fresh :p

but, you know , stuff like

Cataloging the Visible Universe through Bayesian Inference at Petascale. sounds a bit above my current braingrade

Do you know that one of the most used program in particle physics... relies on a fortran core :)

fortran, i dont think i ever even saw how that looks ... back when i was in hischool (which is called college here more or less) informatics consisted of "to get started turn the computer on"

(just some of my audiovisual heroes there, to which i hope to hold a candle on my flixxo experiments , after all one needs people to look up to or one will grow only closer to the ground lol)
i think they taught pascal or something which looked a look like basic to me, maybe that's when i got the weird notion syntax is a waste of brainspace since the logic across all languages is the same , the grammar if you like, as your adept in C i doubt i need to elaborate on that.
I think that was the only teacher in that school who could actually stand me

I wish I could comment meaningfully, unfortunately I don't understand anything as particle physics ain't my area of interest. But going by the responses here, I trust this is indeed a great piece. Respect

The needed skills are more on the programming side her. I can explain the physics behind the problem in 10 minutes (please wait for the next post), but it is definitely more how to treat information and output it in another form that is required.

Okay sir. I am always tuned

Great, its encouraging to see Python used for this, I managed to teach myself a bit of Python so Im glad its used for more than just dummies like me :)

Python is heavily used in particle physics (and probably elsewhere as well). This is one of the main motivation on going with python here. May I count you on board for this project? :)

Well I'm not very good, but if you need something I can try. Im very interested, I just dont know how capable I will be.

The progresses will be shared via my blog, and we will probably have live chat sessions on some discord server. I will let you know, don't worry (or my blog will let you know ;) ).

Would this then also implemented in LHC@home or this completely other stuff?
#Gridcoin

There is no need of CPU power here, so that I assume that no. The heart of the project is really to streamline the input of a physics model in the simulation tools, instead of simulating anything.

Ah okay, so "only" the cost saving part is motivation.

Collider simulation processes are factorized into many smaller bit. Here, I want to focus on something that is achievable with the people around, and that does not require any simulation or CPU-intensive task. The cost motivation is also there of course.

If we want to run a project involving CPU-intensive simulations (why not? I am open to anything ;) ), it also requires much more physics knowledge. I am not sure the right public is on Steem for now, from my past experience. But I keep this in mind. Actually, it could work within the context of the previous project (that is still on-going).

LOL I think you got this in the completely wrong way. I just wanted to know if that stuff gets feed back into BOINC :D (or, if the reason is only the immense cost that you talked about)

That stuff in connected. Several @Home project connected to the LHC require to simulate collisions for specific studies. Here, the idea is to design a code allowing to easily plugin into these simulation tools a new physics context. For the moment, there are three codes allowing to do that, two of them relying on this mathematica platform that is expensive and the third one offering much less options.

So in a way, this could be connected but the project itself won't necessitate to simulate anything.

Does it make it clearer?

I'm all for simplification and running of projects at low cost. If Python language is the program that makes the implication less hassle-free, then, by all means, let's use that. Thank you to everyone that had contributed and will contribute to the project. I, like the proverbial cheerleader, is cheering the team to victory :)

It may be hard, because it requires analytical computations that may be complicated to handle. However, difficulties are the fun part. I hope this will work. The next episode is for the next Montuesday :)

That's true, if a test is not difficult passing it is not fun :)

Posted using Partiko Android

Sounds exciting.
I think that this is going to be quite popular with steemian developers,.
Time to freshen up with numpy! 😁

At the beginning, I am pretty convinced no extra knowledge in python package will be needed at all. This will come after. I hope we will see you on board! Please stay tuned (early next week for the next episode).

This is cool. I don't have much background in Python, but I have been trying to teach myself some of the basics. I had no idea it was used for applications like this.

Well, it is not yet used for applications like this, which is one of the core goals of this project. Let's see where this will lead us, and feel free to join the first discussion sessions (to be announced) if you are interested!

Extraordinary project. One progress in physics
Please permit, I translate in language of Indonesia

Thanks for this @lemounth

Thanks! I would however prefer no translation, because I need to work with people understanding English and who thus can communicate with the rest of the team on the project. Thanks for your consideration.

Excellent work @lemouth !
Regards.

Thanks! Glad you enjoyed this new project! Let's see how it will lead us!

Hi @lemouth!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Congratulations @lemouth!
Your post was mentioned in the Steemit Hit Parade in the following category:

  • Upvotes - Ranked 8 with 1179 upvotes

Hey, @lemouth!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!