molformula 0.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- molformula/__init__.py +49 -0
- molformula/_core.py +759 -0
- molformula/_error.py +206 -0
- molformula/_hill.py +100 -0
- molformula/_parser.py +232 -0
- molformula/py.typed +0 -0
- molformula-0.1.0.dist-info/METADATA +373 -0
- molformula-0.1.0.dist-info/RECORD +10 -0
- molformula-0.1.0.dist-info/WHEEL +4 -0
- molformula-0.1.0.dist-info/licenses/LICENSE +11 -0
molformula/__init__.py
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# Copyright 2026 Hiroshi Nakayama and RIKEN
|
|
2
|
+
# SPDX-License-Identifier: BSD-3-Clause
|
|
3
|
+
|
|
4
|
+
from importlib.metadata import version
|
|
5
|
+
|
|
6
|
+
from ._core import (
|
|
7
|
+
Formula, IonFormula,
|
|
8
|
+
atom_species_counts, exact_mass,
|
|
9
|
+
protonated, deprotonated, deelectronated, ion_mz, apply_formula_change,
|
|
10
|
+
make_formula_change, sum_formulas, to_str,
|
|
11
|
+
)
|
|
12
|
+
from ._error import (
|
|
13
|
+
ChemicalFormulaError, FormulaChangeError, InvalidProtonCountError,
|
|
14
|
+
IonizationError, InsufficientHydrogenError, EmptyIonFormulaError,
|
|
15
|
+
FormulaParseError, EmptyParenthesisError, UnmatchedParenthesesError,
|
|
16
|
+
InvalidBracketError, EmptyFormulaError, InvalidFormulaError,
|
|
17
|
+
UnsupportedAtomSpeciesError, InvalidCountError,
|
|
18
|
+
)
|
|
19
|
+
|
|
20
|
+
__version__ = version(__package__) # type: ignore[arg-type]
|
|
21
|
+
|
|
22
|
+
__all__ = [
|
|
23
|
+
'Formula',
|
|
24
|
+
'IonFormula',
|
|
25
|
+
'to_str',
|
|
26
|
+
'atom_species_counts',
|
|
27
|
+
'exact_mass',
|
|
28
|
+
'protonated',
|
|
29
|
+
'deprotonated',
|
|
30
|
+
'deelectronated',
|
|
31
|
+
'ion_mz',
|
|
32
|
+
'apply_formula_change',
|
|
33
|
+
'make_formula_change',
|
|
34
|
+
'sum_formulas',
|
|
35
|
+
'ChemicalFormulaError',
|
|
36
|
+
'FormulaChangeError',
|
|
37
|
+
'InvalidProtonCountError',
|
|
38
|
+
'IonizationError',
|
|
39
|
+
'InsufficientHydrogenError',
|
|
40
|
+
'EmptyIonFormulaError',
|
|
41
|
+
'FormulaParseError',
|
|
42
|
+
'EmptyParenthesisError',
|
|
43
|
+
'UnmatchedParenthesesError',
|
|
44
|
+
'InvalidBracketError',
|
|
45
|
+
'EmptyFormulaError',
|
|
46
|
+
'InvalidFormulaError',
|
|
47
|
+
'UnsupportedAtomSpeciesError',
|
|
48
|
+
'InvalidCountError',
|
|
49
|
+
]
|