@chemistry/elements 2.7.0 → 3.0.1

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.
package/README.md CHANGED
@@ -1,49 +1,52 @@
1
- # @chemistry/elements
2
- [![npm version](https://badge.fury.io/js/%40chemistry%2Felements.svg)](https://badge.fury.io/js/%40chemistry%2Felements)
3
- [![Build Status](https://travis-ci.com/chemistry/chem-js-lib.svg?branch=master)](https://travis-ci.org/chemistry/chem-js-lib)
4
- [![codecov](https://codecov.io/gh/chemistry/chem-js-lib/branch/master/graph/badge.svg)](https://codecov.io/gh/chemistry/chem-js-lib)
5
- [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
6
-
7
- Library that contains information about elements In periodic table: Number, Symbol, Name, Mass, max Bonds Count, Covalent & van der Waals Radius, typical color;
8
-
9
- ## Install
10
- ```bash
11
- npm install @chemistry/elements
12
- ```
13
-
14
- ## Getting started:
15
- ```javascript
16
- import { ChemElement, ChemElementData } from '@chemistry/elements';
17
-
18
- const hydrogen = ChemElement.getById(1);
19
- console.log(hydrogen);
20
- // { id: 1, symbol: "H", RCow: 0.37, RVdW: 1.2, maxBonds: 1, mass: 1.00794, name: "Hydrogen", posX: 1, posY: 1, color: "#FFFFFF", color2: "#808080" }
21
-
22
- const carbon = ChemElement.getBySymbol('C');
23
- console.log(carbon);
24
- // { id: 6, symbol: "C", RCow: 0.77, RVdW: 1.7, maxBonds: 4, mass: 12.0107, name: "Carbon", posX: 2, posY: 14, color: "#909090", color2: "#000000" }
25
-
26
- const elementsList = ChemElement.getAllSymbols();
27
- console.log(elementsList);
28
- // [H, He, Li, Be, B, C, N, O, F, Ne, .... ]
29
-
30
- // Print out all list of elements
31
- console.log(ChemElementData[9]);
32
- // { id: 7, symbol: "N", RCow: 0.75, RVdW: 1.6, maxBonds: 4, mass: 14.0067, name: "Nitrogen", posX: 2, posY: 15, color: "#3050F8", color2: "#304FF7" }
33
- ```
34
-
35
- ## Contain following info about Carbon:
36
- * Number in periodic table: 6
37
- * Symbol of Element: C
38
- * Element name: Carbon
39
- * Element mass: 12.0107
40
- * Covalent Radius of element: 0.77
41
- * van der Waals radius of the element: 1.7
42
- * Element max Bonds: 4
43
- * Element color: 909090
44
- * Element color dark: 000000
45
- * Position X in periodic Table: 2
46
- * Position Y in periodic Table: 14
47
-
48
- ## Commands:
49
- * Build project: `npm run build`
1
+ # @chemistry/elements
2
+
3
+ [![npm version](https://badge.fury.io/js/%40chemistry%2Felements.svg)](https://badge.fury.io/js/%40chemistry%2Felements)
4
+ [![License: MIT](https://img.shields.io/badge/License-MIT-gren.svg)](https://opensource.org/licenses/MIT)
5
+
6
+ Library that contains information about elements In periodic table: Number, Symbol, Name, Mass, max Bonds Count, Covalent & van der Waals Radius, typical color;
7
+
8
+ ## Install
9
+
10
+ ```bash
11
+ npm install @chemistry/elements
12
+ ```
13
+
14
+ ## Getting started:
15
+
16
+ ```javascript
17
+ import { ChemElement, ChemElementData } from '@chemistry/elements';
18
+
19
+ const hydrogen = ChemElement.getById(1);
20
+ console.log(hydrogen);
21
+ // { id: 1, symbol: "H", RCow: 0.37, RVdW: 1.2, maxBonds: 1, mass: 1.00794, name: "Hydrogen", posX: 1, posY: 1, color: "#FFFFFF", color2: "#808080" }
22
+
23
+ const carbon = ChemElement.getBySymbol('C');
24
+ console.log(carbon);
25
+ // { id: 6, symbol: "C", RCow: 0.77, RVdW: 1.7, maxBonds: 4, mass: 12.0107, name: "Carbon", posX: 2, posY: 14, color: "#909090", color2: "#000000" }
26
+
27
+ const elementsList = ChemElement.getAllSymbols();
28
+ console.log(elementsList);
29
+ // [H, He, Li, Be, B, C, N, O, F, Ne, .... ]
30
+
31
+ // Print out all list of elements
32
+ console.log(ChemElementData[9]);
33
+ // { id: 7, symbol: "N", RCow: 0.75, RVdW: 1.6, maxBonds: 4, mass: 14.0067, name: "Nitrogen", posX: 2, posY: 15, color: "#3050F8", color2: "#304FF7" }
34
+ ```
35
+
36
+ ## Contain following info about Carbon:
37
+
38
+ - Number in periodic table: 6
39
+ - Symbol of Element: C
40
+ - Element name: Carbon
41
+ - Element mass: 12.0107
42
+ - Covalent Radius of element: 0.77
43
+ - van der Waals radius of the element: 1.7
44
+ - Element max Bonds: 4
45
+ - Element color: 909090
46
+ - Element color dark: 000000
47
+ - Position X in periodic Table: 2
48
+ - Position Y in periodic Table: 14
49
+
50
+ ## Commands:
51
+
52
+ - Build project: `npm run build`
@@ -1,47 +1,48 @@
1
- export interface ChemElementInfo {
2
- /**
3
- * Number in periodic table
4
- */
5
- id: number;
6
- /**
7
- * Symbol of Element
8
- */
9
- symbol: string;
10
- /**
11
- * Element name
12
- */
13
- name: string;
14
- /**
15
- * Element mass
16
- */
17
- mass: number;
18
- /**
19
- * Covalent Radius of element
20
- */
21
- RCow: number;
22
- /**
23
- * van der Waals radius of the element
24
- */
25
- RVdW: number;
26
- /**
27
- * Element max Bonds
28
- */
29
- maxBonds: number;
30
- /**
31
- * Element representation color e.g. "#3050F8"
32
- */
33
- color: string;
34
- /**
35
- * Element darc color representation
36
- */
37
- color2: string;
38
- /**
39
- * Position X in periodic Table
40
- */
41
- posX: number;
42
- /**
43
- * Position Y in periodic Table
44
- */
45
- posY: number;
46
- }
47
- export declare const ChemElementData: ChemElementInfo[];
1
+ export interface ChemElementInfo {
2
+ /**
3
+ * Number in periodic table
4
+ */
5
+ id: number;
6
+ /**
7
+ * Symbol of Element
8
+ */
9
+ symbol: string;
10
+ /**
11
+ * Element name
12
+ */
13
+ name: string;
14
+ /**
15
+ * Element mass
16
+ */
17
+ mass: number;
18
+ /**
19
+ * Covalent Radius of element
20
+ */
21
+ RCow: number;
22
+ /**
23
+ * van der Waals radius of the element
24
+ */
25
+ RVdW: number;
26
+ /**
27
+ * Element max Bonds
28
+ */
29
+ maxBonds: number;
30
+ /**
31
+ * Element representation color e.g. "#3050F8"
32
+ */
33
+ color: string;
34
+ /**
35
+ * Element darc color representation
36
+ */
37
+ color2: string;
38
+ /**
39
+ * Position X in periodic Table
40
+ */
41
+ posX: number;
42
+ /**
43
+ * Position Y in periodic Table
44
+ */
45
+ posY: number;
46
+ }
47
+ export declare const ChemElementData: ChemElementInfo[];
48
+ //# sourceMappingURL=chem-elements-data.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chem-elements-data.d.ts","sourceRoot":"","sources":["../src/chem-elements-data.ts"],"names":[],"mappings":"AAMA,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IACX;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB;;OAEG;IACH,KAAK,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IACb;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,eAAe,EAAE,eAAe,EA28C5C,CAAC"}