Giter Site home page Giter Site logo

vawlpe / obsidian-chem Goto Github PK

View Code? Open in Web Editor NEW

This project forked from acylation/obsidian-chem

0.0 0.0 0.0 76 KB

Chemistry support for Obsidian. Rendering SMILES strings into chemistry structures.

License: MIT License

JavaScript 9.87% TypeScript 86.66% CSS 3.46%

obsidian-chem's Introduction

Obsidian Chem

Obsidian Downloads

简体中文 | English

Chem is a plugin for Obsidian.md providing chemistry support. It allows you to insert chemical structures into your notes through code blocks containing SMILES strings (powered by Smiles Drawer).

Features & Usage

Render SMILES strings as chemical structures

You can use this plugin to render chemical structures from SMILES strings. Just type the SMILES strings in a code block with smiles as the language. Each line should contain only one string.

The data is stored as plain text, so you won’t lose it. The renderer will always work, even if the plugin changes its cheminfo core.

Image

You can adjust the image size and configure light themes and dark themes of the molecule pictures in the plugin’s settings page.

Note
For now, you need to reopen the active notes containing SMILES blocks to apply the new settings, as well as adapting the Obsidian light/dark theme changes.

Image

What is SMILES?

SMILES stands for Simplified Molecular-Input Line-Entry System. It is a specification to describe chemical structures using linear ASCII strings. You can learn more about it from the official website or Wikipedia.

Why using SMILES?

Using SMILES strings to represent molecules is easier and more widely supported by chemistry drawing tools than using LaTeX packages like mhchem and chemfig.

How to generate SMILES strings?

For simple structures, you can type them in manually. However, for more complex ones, you may want to use structure editors, such as ChemDraw, ChemDrawJS, MarvinJS and Ketcher. Also, you can use translators like Open Bable, JOELib and the Chemical Translation Service to convert chemical names, CAS numbers and *.mol files into SMILES strings.

Installation

Note
Make sure that you are not in the Restricted Mode.

The plugin is available in the official plugin market. You can go to Settings → Community plugins → Browse, and search for the Chem plugin by Acylation. After installing, you need to enable the plugin to use it.

You can also follow the steps below to install the plugin manually.

  1. Go to the repo's latest release page, and download the main.js, style.css, and manifest.json. Alternatively, you can download the latest zip file and then unzip it to get the three files.
  2. Copy these files to your local path [yourvault]/.obsidian/plugins/obsidian-chem/. You may need to create the folder obsidian-chem by yourself.
  3. Launch/restart Obsidian, or refresh the plugin list, you will see this plugin.
  4. In the plugin list, enable Chem and enjoy!

Plugin Scope

I have a lot of ideas for this plugin, but my coding skills and resources are limited. I want to make it useful for anyone who needs to take notes on chemistry (such as research records, organic chemistry anki cards, etc.). As examples, here are some of the features I have in mind.

  • Displaying chemical formulas and structures.
  • Importing structures from the clipboard, .cdxml files, etc.
  • Appending chemical info (e.g. exact mass) next to the structures. This can help MS users and beginners in chemistry.
  • Supporting internal coordinates like .mol files. Would be useful in computational chemistry.
  • Shortcuts for physicochemical formulas in LaTeX.
  • ......

I'd love to hear your feedback and suggestions. Actually, the first feature of the plugin, to render SMILES strings, was suggested by community users! I’m very grateful for their input. (See the acknowledgment section for details)

Design Philosophy

Before working on a new feature, I will consider the following criteria. The feature should meet at least one of them to be useful.

  • It helps with taking notes on chemical research, like experimental records, literature notes, paper writing, etc.
  • It promotes a workflow that integrates well with other chemistry tools.
  • It aids in learning chemistry and related subjects.

As an Obsidian plugin, this project adheres to the following principles:

  • Localize: Data should be kept local and standalone packages are preferred over remote services.
  • Leave No Trace: The plugin must not leave plugin-specific content in notes, allowing them to be shared with non-Obsidian users.
  • Plain Text Central: Plain text is preferred over complex formats.

Contributing

Thank you for your interest in contributing to this project! We welcome bug reports, feature requests, and pull requests from anyone.

How to report a bug or suggest a feature

  • Please use the issue tracker to report any problems or suggest new features.
  • Before creating a new issue, please search for existing issues to avoid duplicates.
  • When creating a new issue, please follow the templates to provide necessary information.
  • You can also vote for existing issues by adding a 👍 reaction to show your support.

How to submit a pull request

  • If you want to contribute code, please fork the repository and create a new branch for your work.
  • If you are a beginner in plugin development, you can check the official developer documentation.
  • Please include a clear and concise description of your changes in the pull request title and body.
  • Please reference any related issues in the pull request body using keywords like fixes #123 or closes #456.
  • Please wait for a review before merging your pull request.

How to get help

  • If you have any questions or need help with using or developing this project, please join our Discussions right here in the repo.

Thank you for being a part of this project! 🙌

Roadmap

Check out the roadmap to see what's been working on.

Acknowledgement

The plugin relies on Smiles Drawer as the parsing and drawing core, and uses Mathpix as an example on how to integrate the package. Thank you very much!

During the whole process of development, I found the developer documentation super helpful. Massive thanks to @marcusolsson for leading this project!

The plugin is motivated by forum requests for including chemical structures in Obsidian. Thank you for the inspiring discussions and the great ideas!

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.