-
Notifications
You must be signed in to change notification settings - Fork 1
/
README.Rmd
82 lines (53 loc) · 3.44 KB
/
README.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
---
output: github_document
---
```{r, include = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "man/figures/README-",
out.width = "100%"
)
```
# chemboxR
<!-- badges: start -->
[![R-CMD-check](https://github.com/UBC-MDS/chemboxR/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/UBC-MDS/chemboxR/actions/workflows/R-CMD-check.yaml)
[![Codecov test coverage](https://codecov.io/gh/UBC-MDS/chemboxR/branch/main/graph/badge.svg)](https://app.codecov.io/gh/UBC-MDS/chemboxR?branch=main)
<!-- badges: end -->
## Introduction
`chemboxR` is a package for molecular information calculator based
on empirical formulas of chemicals in raw text. It is designed to
intelligently process text input containing the chemical formula and provide
associated information on the inquired molecule. It is able to provide the
molar mass, check a formula's validity, and provide a balanced combustion
equation if the input is combustible. This tool can be utilized for various
educational and research purposes for simple and fast information retrieval.
## Installation
You can install the development version of chemboxR from [GitHub](https://github.com/) with:
``` r
# install.packages("devtools")
devtools::install_github("UBC-MDS/chemboxR")
```
## Usage
The package includes 4 functions for solving chemistry problems:
- `get_elements`a parser that takes a chemical formula in string format and returns a dictionary that contains the elements and their respective count.
- `is_valid`: a checker that returns a boolean indicating whether a given input is chemically reasonable.
- `get_molec_props`: a method that takes a chemical formula in string format and returns a dataframe with various useful properties of each element in the formula.
- `get_combustion_equation`: a method that takes a text chemical formula that only contains carbon (`C`) and hydrogen (`H`) and outputs a balanced equation resulting from combustion.
## Dataset
In order to be able to perform some of the functions above, a dataset will need to be used that contains various atomic properties of the elements in the periodic table. The data can be found in the Chembox repo [here](https://github.com/UBC-MDS/chembox/tree/main/src/chembox/data) which was sourced from [here](https://github.com/Bluegrams/periodic-table-data/tree/master/Periodica.Data/Data). Please note that we do not take credit for the dataset, it is merely for use with our functions.
## Fitting into the R ecosystem
A similar package [chemr](https://github.com/paleolimbot/chemr) is available online that employs a similar string-parsing design and molar mass calculation. Additionally, they have string-parsing for chemical reactions implemented.
What we do differently:
- We support validity checks for unambiguous acids, bases and salts.
- We include methods specifically for automated combustion equation generation and balancing.
## Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a [Code of Conduct](CODE_OF_CONDUCT). By contributing to this project, you agree to abide by its terms.
## License
`chembox` is licensed under the terms of the [MIT license](LICENSE.md).
## Contributors
The contributors of this project are
Wilfred Hass, Vikram Grewal, Luke Yang, and Nate Puangpanbut.
<a href="https://github.com/UBC-MDS/chembox/graphs/contributors">
<img src="https://contrib.rocks/image?repo=UBC-MDS/chembox&max=1000" />
</a>