New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

rdkit-rb

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rdkit-rb

  • 0.1.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

RDKit.rb

Cheminformatics for Ruby, powered by RDKit

Build Status

Installation

Add this line to your application’s Gemfile:

gem "rdkit-rb"

Getting Started

Create a molecule

mol = RDKit::Molecule.from_smiles("c1ccccc1O")

Get the number of atoms

mol.num_atoms

Get substructure matches

mol.match(RDKit::Molecule.from_smarts("ccO"))

Get fragments

mol.fragments

Generate an SVG

mol.to_svg

Fingerprints

A number of fingerprints are supported.

RDKit

mol.rdkit_fingerprint

Morgan

mol.morgan_fingerprint

Pattern

mol.pattern_fingerprint

Atom pair

mol.atom_pair_fingerprint

Topological torsion

mol.topological_torsion_fingerprint

MACCS

mol.maccs_fingerprint

You can use a library like pgvector-ruby to find similar molecules. See an example.

Updates

Add or remove hydrogen atoms

mol.add_hs!
mol.remove_hs!

Standardize

mol.cleanup!
mol.normalize!
mol.neutralize!
mol.reionize!
mol.canonical_tautomer!
mol.charge_parent!
mol.fragment_parent!

Conversion

SMILES

mol.to_smiles

SMARTS

mol.to_smarts

CXSMILES

mol.to_cxsmiles

CXSMARTS

mol.to_cxsmarts

JSON

mol.to_json

Reactions

Create a reaction

rxn = RDKit::Reaction.from_smarts("[CH3:1][OH:2]>>[CH2:1]=[OH0:2]")

Generate an SVG

rxn.to_svg

History

View the changelog

Contributing

Everyone is encouraged to help improve this project. Here are a few ways you can help:

To get started with development:

git clone https://github.com/ankane/rdkit-ruby.git
cd rdkit-ruby
bundle install
bundle exec rake vendor:all
bundle exec rake test

FAQs

Package last updated on 29 Dec 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc