Module used for atoms, ions (monoatomics/polyatomics) and molecules easy handling
You'll find a examples.py file with various features.
This module is compatible with Micro Python 1.9.4, therefore, also with calculators !
from atomion import *
oxygen = Atome('O') # With symbol
hydrogen = Atome(1) # With proton amount
water = hydrogen * 2 + oxygen
# Or
water = Molecule('H2O')
chloride = Ion('Cl')
# Or
chloride = IonMonoAtomique('Cl')
carbonate = Ion('CO3')
# Or
carbonate = IonPolyAtomique('CO3')
equation = Equation('Cu + O2 -> CuO')
equation.equilibrer()
equation == '2 Cu + O₂ -> 2 CuO'
reaction = Reaction(
equation = equation,
quantites_reactifs = {
Atome('Cu'): 1.6,
Molecule('O2'): 1.3
}
)
reaction.final() == {
Atome('Cu'): 0.0,
Molecule('O2'): 0.5,
Molecule('CuO'): 1.6
}
from atomion.raccourcis import *
water = H * 2 + O
# Or
water = H2O
print(water)To see the other functionnalities, look at examples.py file.
- Quarks adding (Up & down)
- Nucleus object adding.
- Will contain "proton" & "neutron" objects
- Will be able to be added with Electron objects to create atoms or ions.
- Nuclear fusion adding
- Nuclear fission adding
-
Open a Command Prompt.
How to ?
Appuyez sur la touche
Windows+ la toucheR, et écrivezcmddans la fenêtre qui s'est ouverte. PushWindowsandRkeys and writecmdin the window. -
Make sure to have Python 3.6 or greater installed.
How to know ?
Write
python --versionin command prompt. If python is installed, it will show the version (it has to be greater or egal to 3.6)If it doesn't show the version, you have to install Python in a version greater or egal to 3.6 to avoid compatibility issues.
-
Make sure to have
pipinstallHow to check ?
Write
pip --versionin command prompt. If pip is installed, it will show its version that has to be greater than 10.0.0.If it is lower than 10.0.0, write
python -m pip install --upgrade pipto update. -
Write the following command :
pip install atomion
-
To update it, just add
--upgradeto update the module :
pip install atomion --upgrade-
Then, create a new file, import the module and enjoy !
from atomion import * print(Atome('C') + Molecule('O2'))
Warning, for calculators that cannot have folders, it is not possible to use this module, but a single file version is WIP to permise you to use it
- Notice the green button with "Code" written on it on this page et push it.
- Click on "Download ZIP".
- When download is finished, open the .zip file et move the inside folder to another place (in an accessible place).
- Open the folder that you moved and put the
atomionfolder in your calculator (that you have plugged to your computer). - You can also add
exemples.pyfile in your calculator to check that all is functionning properly. - Now, unplug you calculator, execute
exemples.pyif you added it and, if all works, enjoy !
Not yet finished but available :
- 🇫🇷 En français
- 🇪🇸 En español
Made with DoxyTH.