Giter Club home page Giter Club logo

chemistry-explorer's People

Contributors

smenjas avatar

Stargazers

 avatar

Watchers

 avatar

chemistry-explorer's Issues

Compare formulas

Provide a way to compare molecular formulas for equivalence. For example, H2O & OH2 should be considered equivalent despite the elements being in a different order.

Detect chemical formulas, regardless of letter case

Goal & Context

I'd like to provide an intuitive search feature. Users should be able to type chemical formulas in all lowercase, or all uppercase, or mixed case, and the software should be able to detect whether the input looks like a molecular formula.

Status Quo

Currently the software can only parse chemical formulas when the element symbols have the first letter capitalized, and the 2nd letter miniscule if it exists. I think this makes sense, so it seems like there should be a separate method to test and convert arbitrary strings, before attempting to parse them. Perhaps I'm wrong about this, and case-insensitive formula parsing would not have performance or accuracy costs, but that needs to be investigated.

Non Goals

This new formula detection code need not take into account whether the formula makes sense chemically. For example, a user might enter a substring of a formula where the charge of the ions does not add up correctly. Don't worry about this for now. Perhaps the search is just a partial formula. See issue #63.

Bonus Features

Once we get the initial substring search working correctly for molecular formulas, we might want to look into more options.

  • Search for equivalent formulas. Given the search term "OH2", match "H2O".
  • Search by empirical formula. Given the search term "CH2O", match "C6H12O6". See issue #61.

These may not be performant given the current data architecture. We could solve this by caching empirical or even equivalent formulas at the expense of storage capacity, but the app is not presently designed to accommodate those performance optimizations.

Prerequisites

This depends on: #48

Explore oxidation states

Start with oxidation states for elements. Try to analyze molecular formulas to see if they make sense, in terms of the oxidation states of their elements.

This is related to issue #11.

Safari shows errant borders on table cells

On the periodic table, there are empty table cells for the first 3 rows/periods. td.empty has border: none and Chrome v111 honors this. However, Safari v16.3 & v16.4 shows a border between rows 1 & 2 (it's a black border in light mode and a white border in dark mode).

This bug also appears on the isotopes view, at the top of the bottom left th for the x-axis.

Fix responsive breakpoints

In 641985c I added links to the period pages on either side of the periodic table, increasing its width. Now the breakpoints cut off the right side of the table at some sizes.

v0.8.0 doesn't work on GitHub Pages

Commit dbc3cff split the code into several files, and this broke the GitHub Pages environment. It works on my local environment, using both NodeJS v19 & v20. The previous commit, tagged v0.7.4 works fine on GitHub Pages.

Split data from logic

All of our JS is in one file currently. This includes all our data about elements, isotopes, and molecules.

A feature of the current architecture is that you can run the app from a desktop computer without installing NodeJS.

A downside is that there is more mental overhead in trying to navigate the codebase. It could be easier to compartmentalize logic, and that might encourage a cleaner design.

If we move to a module-based architecture, that could allow backend functionality, such as automated testing.

Fix group nav

Element 13 (aluminum) through 18 (argon) have a bug in their navigation. Attempting to navigate down the column/group takes us 10 elements to the left. For example, aluminum suggest the next element down is scandium instead of gallium.

Convert molecular formulas to empirical formulas

A molecular formula counts how many of each element are present in a molecule, whereas an empirical formula describes the ratios of elements to one another.

For example, the empirical formula for glucose in C6H12O6, and the empirical formula is CH2O.

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.