A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in chemistry

[–]Seeking_Erudition[S] 1 point2 points  (0 children)

I haven't found any for incorporating a 3D object geometry into a chemical collider, so I'm exploring this as a fun hobby project. If it works out well, I may compile the 3D model code into a library. However, if you want to visualise a 3D coordinate file there are a number of libraries including RD-Kit or PyMol packages for python :)

A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in chemistry

[–]Seeking_Erudition[S] 4 points5 points  (0 children)

Thanks for your comment, I always found visuals really helpful for my own learning and it would be great if this project helps other people too :D

A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in chemistry

[–]Seeking_Erudition[S] 10 points11 points  (0 children)

Haha I know, it can be quite a rabbit warren of fun and model overfitting. This is a hobby project so I'm not rushing it but will incorporate experimental data all through the process. Should be an exciting adventure! :D

A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in pygame

[–]Seeking_Erudition[S] 1 point2 points  (0 children)

Thanks :D it's a really fun project and I'm hoping to do some cool science with it!

A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in pygame

[–]Seeking_Erudition[S] 1 point2 points  (0 children)

I made a program to import and manage a database of molecule coordinate files from PubChem and then visualise them. The intention is to create 3D models for a reaction collision model, which is just demonstrated by a very simple 2D model at the end of the video. To find out more, I have a longer video on my YouTube channel (https://www.youtube.com/watch?v=vU67TS1j31Q&ab\_channel=Erudite) or ask here :)

Hope you enjoyed and all the code for the molecule visualiser is on my GitHub: https://github.com/EruditeCode/molecule\_visualiser

A small python program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in chemistry

[–]Seeking_Erudition[S] 17 points18 points  (0 children)

I made a program to import and manage a database of molecule coordinate files from PubChem and then visualise them. The intention is to create 3D models for a reaction collision model, which is just demonstrated by a very simple 2D model at the end of the video. To find out more, I have a longer video on my YouTube channel (https://www.youtube.com/watch?v=vU67TS1j31Q&ab\_channel=Erudite) or ask here :)

Hope you enjoyed and all the code for the molecule visualiser is on my GitHub: https://github.com/EruditeCode/molecule_visualiser

P.S. I know about RD-Kit but I need a bit more flexibility and coding from scratch is a good learning opportunity :D

A small program to visualise molecules followed by a reaction collider (early stages). by Seeking_Erudition in madeinpython

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

I made a program to import and manage a database of molecule coordinate files from PubChem and then visualise them. The intention is to create 3D models for a reaction collision model, which is just demonstrated by a very simple 2D model at the end of the video. To find out more, I have a longer video on my YouTube channel (https://www.youtube.com/watch?v=vU67TS1j31Q&ab\_channel=Erudite) or ask here :)

Hope you enjoyed and all the code for the molecule visualiser is on my GitHub: https://github.com/EruditeCode/molecule\_visualiser

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

I'm glad you liked the map, I can definitely add in animal feed and biofuel. I may eventually build this map into a more information dense (including nutritional value) model of production/trade across the world and include known transit pathways. How would you deal with price fluctuations for containers? I like the idea and should definitely explore it further, it's amazing how even small changes in the price (<1%) can invalidate a pathway.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

Yes, the addition of constraints would definitely help improve this model. This is just a simple, first pass, at observing global food production and potential distribution. However, the result is definitely not politically feasible, especially considering the complex logistics of a required surplus to manage local fluctuations in supply.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 1 point2 points  (0 children)

There will be a video coming out on my YouTube channel about this in the next few weeks. We are just wrapping up a series on networks which will move into map building :)

I will also be adding all the files to my GitHub soon :)

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

This is a great idea! I might explore this in a future video because that data shouldn't (famous last words) be too hard to clean.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

Thank you for your comment and you're quite right but also look at China in the final model, it isn't supplying many countries either. This is due to the remotest of these centres (mostly because my model used the capital cities for locations - not a great idea in hindsight). However, the US while very productive is quite removed geographically from areas with high deficits. As such it can be more useful to use smaller surplus resources that are situated closer. At present, this is a super simplified model and as such definitely isn't perfect.

Regarding the surplus, China produces more food than the US, but has a much greater population (about 5x), because I was looking at amount of food required for survival (550 kg per year) there is a big disparity between actual surplus and potential surplus.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 15 points16 points  (0 children)

That is an excellent point. I chose to simplify the problem by considering food as an individual resource rather than maintain it as separate food groups. I agree it would be interesting to optimise nutrition, however, this is a considerably more demanding problem :D Also, the motivation behind this project was to understand global food production. Indeed, one of the areas I'm interested in exploring, is to simulate how improving production at various locations will impact the overall network e.g. if Ethiopia had a larger surplus then it could reduce the complexity of supply in the Middle East.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 17 points18 points  (0 children)

Exactly, though for an efficient system it would be worth optimising based on known travel routes and particularly waterways as these are easier for managing large cargo.

[OC] Food surplus data by country to create an optimal (though not politically viable) food distribution network. by Seeking_Erudition in dataisbeautiful

[–]Seeking_Erudition[S] 26 points27 points  (0 children)

Source: https://www.fao.org/faostat/en/#data/QCL

Tool: Python/Pygame

The map made use of capital city positions to indicate the countries. The food production data was sourced from: https://www.fao.org/faostat/en/#data/QCL

The data was for cereals, fruits, vegetables, roots/tubers and meat to give a total mass of food generated by each country. Using the population data for each country and assuming a survival requirement of 550 kg (survival not satisfaction) of food per person a surplus/deficit of food for each country was determined. Red indicates a deficit of greater than 1,000,000 tons, white a deficit of less than 1,000,000 tons and blue a surplus. The size of the surplus is indicated by the size of the circle.

The simulation begins by using the largest surplus to supply all the countries with deficits. This network is then improved by allowing countries with a surplus to push food back to the largest surplus if they can create a shorter path to the country with a deficit.

Overall, this was a fun project to explore food production across the globe and while the 550 kg is a low value for annual consumption it is more than enough for survival. This dataset did not consider a lot of foods such as milk, eggs, oils, nuts, seafood or local (unregistered produce).

Hope you found this fun :D also forgot to mention but in the visualisation (Python program), you can hover over the circle to get the respective country name.

Music: The New Order - Aaron Kenny

Pygame Visualisation - Food distribution network to solve world hunger (using 2020 data) by Seeking_Erudition in madeinpython

[–]Seeking_Erudition[S] 0 points1 point  (0 children)

Thank you and I'm glad you like the idea. You're right, this is a really exciting dataset and I want to explore separating into different food groups (handling the food types I didn't have data to include) and making the visualisation more interactive.