JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 69
  • Score
    100M100P100Q68656F
  • License MIT

Chemical elements information

Package Exports

  • @chemistry/elements

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@chemistry/elements) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@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