Chemsolve

Latest version: v1.8.3

Safety actively analyzes 687881 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

1.8.3

This version fixes a major issue in that `Compound.from_formula` was unable to perform calculations for the molecular formula of a compound.

1.8.2

This version improves error raising and traceback in the library. Specifically, invalid element names passed to the `Element` class will now raise an appropriate `InvalidElementError` as opposed to an `IndexError` by the periodic table, and the `Reaction.from_string` method now raises an `InvalidReactionError` rather than a `ValueError`.

1.8.1

This version update adds all of the different Chemsolve errors to the top-level module, since all of them were originally not imported in `chemsolve/__init__.py`.

1.8.0

This version introduces the `chemsolve.ranking` module, with 4 new methods to rank elements based on different properties: atomic radius, electronegativity, first ionization energy, and electron affinity.

This version also adds proper error methods, including `ChemsolveError`, `InvalidChemistryArgumentError`, and its subclasses for elements, compounds, and reactions. If you want to use a try/except loop when working with chemical objects, you can import these methods directly from chemsolve, e.g. `from chemsolve import InvalidCompoundError`.

In addition, the `chemsolve.solutions` module has been updated with calculation methods for pH and pOH, both from hydronium and hydroxide (for each). Following the release of v2.0.0, this module will see further changes, but expect some more smaller additions in v1.9.0 as well.

**Additional Changes**:
- The `Reaction` class now uses `reactants` and `products` keyword arguments instead of just `*args`, although `*args` will continue to work for the time being it has been deprecated and will be removed in v2.0.0, start using the new functionality now.
- You can now create reactions directly from strings, through the `Reaction.from_string` method. More information about its specific usage can be found in its docstring.
- The top-level `chemsolve` module now has two new methods, `list_strong_acids` and `list_strong_bases`.
- The `Gas` object from the `chemsolve.gases` module now has better internal functionalities, so it is more useful for actual computation.

New information has been added pertaining to v2.0.0 in the FUTUREVERSION.md file, which can be found [here](https://github.com/amogh7joshi/chemsolve/blob/master/FUTUREVERSION.md).

1.7.0

This update to Chemsolve focuses on new features and updates to existing classes, as well as major reworkings of the internals of the Element, Compound, and Reaction classes, and finally the beginning of preparation for v2.0.0 (some point in a few months or so).

**Major Features**:
- Added the ability to create Element classes from a provided electron configuration or molar mass.
- Added the `SolutionCompound` class, similar to the `Compound` class but allows initialization through volume or molarity, and charge/state values.
- Added the ability to determine whether a certain compound is in a reaction, or an element is within a compound (through the `__contains__` magic method).
- Added the `chemsolve.physics` module with a few functions (namely kinetic and potential energy calculations).

**Transitional Features and Bug Fixes**:
- Added deprecations for classes which will be removed in v2.0.0, primarily `CombustionTrain`, `FormulaCompound`, `SpecialElement`, now you will get a warning whenever you use them.
- Migrated the functionalities of the `SpecialElement` class to the `Element` class.
- Added transitional `Compound.from_formula` method and `Reaction.from_combustion` to replace the `Compound.fromFormula` and `Reaction.fromCombustion` methods, respectively.
- Update the `molarity` method to accept a `SolutionCompound` rather than individual keyword arguments for moles/volume/molarity.

In addition, updated a lot of the internal workings of the `Compound` and `Reaction` classes, to improve class functionality, the most visible of which is a fixed display error when calling `Reaction.fromCombustion().main_reactant`.

1.6.0

This update adds the `IdealGas` class, which is able to perform basic `PV=nRT` calculations. In addition, a number of new methods have been added including:

1. Unit conversion for pressure. Convert between atm, psi, bar, Pa, etc.
2. Unit conversion for temperature. Convert between Celsius, Farenheit, and Kelvin.
3. Basic molarity calculations, when mole amounts and volume are provided.

In addition, each module has been updated to include an `__all__` variable, such that you can now run

python
from chemsolve import *


and get all the functionalities of the library.

Page 1 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.