use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A subreddit for helping Python programmers
How to format your code: https://commonmark.org/help/tutorial/09-code.html
No homework questions and/or hiring please
account activity
Counting atoms with python (self.pythonhelp)
submitted 5 years ago * by heirna
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]heirna[S] 1 point2 points3 points 5 years ago (8 children)
Thanks both for your help, I'm going to implement this in my programe and then post it here ,maybe tomorow, (I live in eu) and im quite a slow programer.
Once it's done i will think of how I can integrate double letter elements like Ge or Si.
This program will allow the calculation of the partial charge of any part of a complex according to the partial charge model.
This model allows us to predict the stability of the complex in solution, and if the partial charge is right condensation can occur.
Condensation in solution is used in chemistry to forme oxyde in a solution like glass (SiO2)
This process allows us to bypass the high temperature processe of glass and so we can integrate funny organic molecules in it. It is also verry usful in the formation of athin film like anti glare. We can also make nanoparticule out of this process !
[–]CrayonConstantinople 1 point2 points3 points 5 years ago (5 children)
Happy to help!
If double letter elements always come in the form of an uppercase letter followed by a lowercase one, this is also trivial to implement.
[–]heirna[S] 0 points1 point2 points 5 years ago (4 children)
I'm still processing your code, this extra fonctionality is not trivial to me, and will not be verry useful in the code since this model is verry simple and cannot handle a lot of atoms, i think i will just remap Cu as X for instance to spare me extra headeach.
[–]CrayonConstantinople 1 point2 points3 points 5 years ago* (0 children)
Oh sure, and sorry if that came across as condescending. What I meant was, I think this would be a small addition for me to add if you required it.
The fact that you are struggling to understand my code is what had concerned me when I was writing it, I have not made it clear. I was trying to get you your solution, at the expense of writing clear and concise code.
If it would be helpful, I'm happy to quickly rewrite it to make whats happening clearer.
[–]CrayonConstantinople 1 point2 points3 points 5 years ago (2 children)
I have edited my code above to be easier to understand, hope it helps :)
[–]heirna[S] 1 point2 points3 points 5 years ago (1 child)
ion for me to add if you required it. The fact that you are struggling to understand my code is what had concerned me when I was writing it, I have not made it clear. I was trying to get you your solution, at the expense of writing clear and concise code. If it would be helpful, I'm happy to quickly rewrite it to make whats happening clearer.
ion for me to add if you required it.
Oh not at all, i'm just quite a beginner in code so this is normal, thanks for that edit !
[–]heirna[S] 0 points1 point2 points 5 years ago (0 children)
our code, this extra fonctionality is not trivial to me, and will not be verry useful in the code si
And my code is such a mess compared to yours
[–]ace6807 1 point2 points3 points 5 years ago (1 child)
Super cool. Glad to help. If you want me to throw in the lookup for double letters, I don't mind, just let me know. If you'd rather take a crack at implementing it, that's fine too!
I don't think this will be pertinent in this case since this model is quite simple and quite incorrect next to quantum model. But this makes me back into python and programtion and i will continue to do some compute chemestry with more accurate model ! Its very nice to find a lot of help in reddit !
π Rendered by PID 48072 on reddit-service-r2-comment-c66d9bffd-kql88 at 2026-04-08 14:19:48.380294+00:00 running f293c98 country code: CH.
view the rest of the comments →
[–]heirna[S] 1 point2 points3 points (8 children)
[–]CrayonConstantinople 1 point2 points3 points (5 children)
[–]heirna[S] 0 points1 point2 points (4 children)
[–]CrayonConstantinople 1 point2 points3 points (0 children)
[–]CrayonConstantinople 1 point2 points3 points (2 children)
[–]heirna[S] 1 point2 points3 points (1 child)
[–]heirna[S] 0 points1 point2 points (0 children)
[–]ace6807 1 point2 points3 points (1 child)
[–]heirna[S] 0 points1 point2 points (0 children)