Coder Social home page Coder Social logo

ele's Introduction

Ele

License Codecov Azure

Overview

Element is an extremely lightweight package that defines the elements of the periodic table and allows them to be accessed by symbol, name, atomic number, or mass. It has zero dependencies outside of the Python Standard Library.

Warning

Ele is still in early development (0.x releases). The API may change unexpectedly.

Usage

Ele only supports a few modes of use. You can retrieve an element from the symbol, the name, the atomic number, or the mass (in amu):

import ele
na = ele.element_from_symbol("Na")
na = ele.element_from_name("sodium")
na = ele.element_from_atomic_number(11)
na = ele.element_from_mass(22.990)

The mass is rounded to a single decimal before comparison. If you wish to retrieve the element with the mass closest to the specified value you may use the exact=False keyword.

Each Element has four attributes which can be accessed (as demonstrated below for na):

na.name
na.symbol
na.atomic_number
na.mass

The elements can also be accessed by symbol as follows:

import ele
na = ele.Elements.Na

Installation

Install via pip:

pip install ele

or conda:

conda install -c conda-forge ele

Installation from source is also an option:

git clone [email protected]/rsdefever/ele.git
cd ele
pip install .

Data Sources

Complete details of the sources are provided here

Credits

Development of Ele was supported by the National Science Foundation under grant NSF Grant Number 1835874. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.