@chemistry/elements
TypeScript icon, indicating that this package has built-in type declarations

2.9.0 • Public • Published

@chemistry/elements

npm version Build Status codecov License: MIT

Library that contains information about elements In periodic table: Number, Symbol, Name, Mass, max Bonds Count, Covalent & van der Waals Radius, typical color;

Install

npm install @chemistry/elements

Getting started:

import { ChemElement, ChemElementData } from '@chemistry/elements';

const hydrogen = ChemElement.getById(1);
console.log(hydrogen);
//   { 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" }

const carbon = ChemElement.getBySymbol('C');
console.log(carbon);
//   { 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" }

const elementsList = ChemElement.getAllSymbols();
console.log(elementsList);
// [H, He, Li, Be, B, C, N, O, F, Ne, .... ]

// Print out all list of elements
console.log(ChemElementData[9]);
// { 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" }

Contain following info about Carbon:

  • Number in periodic table: 6
  • Symbol of Element: C
  • Element name: Carbon
  • Element mass: 12.0107
  • Covalent Radius of element: 0.77
  • van der Waals radius of the element: 1.7
  • Element max Bonds: 4
  • Element color: 909090
  • Element color dark: 000000
  • Position X in periodic Table: 2
  • Position Y in periodic Table: 14

Commands:

  • Build project: npm run build

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i @chemistry/elements

      Weekly Downloads

      81

      Version

      2.9.0

      License

      MIT

      Unpacked Size

      63.3 kB

      Total Files

      9

      Last publish

      Collaborators

      • vreshch