Skip to content

xmcp/chemcalc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ChemParser

计算原子量的有力工具 (非清真)

使用方法

安装依赖:py -3 -m pip install -r requirements.txt

用 chemparser 解释化学式:

>>> import chemparser
>>> chemparser.parser.parse('Fe2(SO4)3')
<chemparser.Materials object at 0x02BC70D0>
>>> _.mats
{'S': 3, 'O': 12, 'Fe': 2}

用 chemcalc 进行关于分子量的计算(支持四则运算、括号、负号、化学式和科学计数法)

>>> import chemcalc
>>> chemcalc.parser.parse('304 * Fe / FeSO4')
Fraction(112, 1)
>>> chemcalc.parser.parse('- 1e3 / CH4')
Fraction(-125, 2)

附赠:良心™计算器

LXcalc.pyw

image

About

计算原子量的有力工具 (非清真)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages