GithubHelp home page GithubHelp logo

readabilityone / epam-ketcher Goto Github PK

View Code? Open in Web Editor NEW

This project forked from epam/ketcher

0.0 0.0 0.0 221.87 MB

Web-based molecule sketcher

Home Page: https://lifescience.opensource.epam.com/ketcher/demo.html

License: Apache License 2.0

Shell 0.01% JavaScript 9.48% TypeScript 87.26% CSS 0.04% HTML 0.10% Dockerfile 0.01% Less 3.11%

epam-ketcher's Introduction

Ketcher npm version Downloads License

Ketcher is an open-source web-based chemical structure editor incorporating high performance, good portability, light weight, and ability to easily integrate into a custom web-application. Ketcher is designed for chemists, laboratory scientists and technicians who draw structures and reactions.

Key Features

  • โšก๏ธ Fast 2D structure representation that satisfies common chemical drawing standards
  • ๐Ÿ’  3D structure visualization
  • ๐Ÿ“ Template library (including custom and user's templates)
  • ๐Ÿ”ฉ Add atom and bond basic properties and query features, add aliases and Generic groups
  • ๐ŸŒ€ Stereochemistry support during editing, loading, and saving chemical structures
  • โžฟ Storing history of actions, with the ability to rollback to previous state
  • ๐Ÿ’พ Ability to load and save structures and reactions in MDL Molfile or RXN file format, InChI String, ChemAxon Extended SMILES, ChemAxon Extended CML file formats
  • ๐Ÿ”ฌ Zoom in/out, hotkeys, cut/copy/paste
  • ๐Ÿ”ฎ OCR - ability to recognize structures at pictures (image files) and reproduce them
  • ๐Ÿ“‹ Copy and paste between different chemical editors
  • ๐Ÿ› ๏ธ Settings support (Rendering, Displaying, Debugging)
  • ๐Ÿ“ท Use of SVG to achieve best quality in-browser chemical structure rendering

Editor builtin tools:

  • Atom Tool, Bond Tool, and Template Tool to draw and edit structures
  • Aromatize/De-aromatize Tool
  • Calculate CIP Descriptors Tool
  • Structure Check Tool
  • MW and Structure Parameters Calculate Tool
  • Select, modify, and erase connected and unconnected atoms and bonds using Selection Tool, or using Shift key
  • Advanced Structure Clean up Tool (+ stereochemistry checking and structure layout)
  • Simple Structure Clean up Tool (checks bonds length, angles and spatial arrangement of atoms)
  • Easy to use R-Group and S-Group tools (Generic, Multiple group, SRU polymer, peratom, Data S-Group)
  • Reaction Tool (reaction generating, manual and automatic atom-to-atom mapping)
  • Flip/Rotate Tool

Installation and usage

At this moment Ketcher can be embedded into your application in two ways:

  • as a react component library
  • as ready-to-run application (to find desired version please look at Assets block of releases). The application can be injected as IFrame or a separate page.

FAQ

How to use react component library

Look at the following link for details.

Configure indigo service

You can find the instruction for service installation here.

Packages

Project Status Description
ketcher-core npm version Core functionality: domain, shared services, functions and interface declarations
ketcher-standalone npm version Contains only the functionality necessary to start Ketcher in standalone mode
ketcher-react npm version Package contains only the functionality necessary to define components.

3D Viewer

Ketcher uses Miew-React for viewing and editing data in 3D.

You can find the latest version of Miew-React here. The last checked version - 1.0.0.

Ketcher API

Ketcher can return drawn structures using the following methods:

getSmiles(isExtended = false): Promise<string> โ€“ returns string representation of drawn structure in SMILES format.
Parameters: isExtended: boolean. By default, false. Indicates, whether extended SMILES format needs to be used.

getMolfile(molfileFormat): Promise<string> โ€“ returns string representation of drawn structure in MOL-format.
Parameters: molfileFormat: 'v2000' | 'v3000'. Optional, by default, 'auto'. Indicates, in which format result will be returned. If no desired format is provided, then it is chosen automatically, depending on drawn structure.

getRxn(molfileFormat): Promise<string> โ€“ returns string representation of drawn structure in RXN-format.
Parameters: molfileFormat: 'v2000' | 'v3000'. Optional, by default, 'v2000'. Indicates, in which format result will be returned.

getKet(): Promise<string> โ€“ returns string representation of drawn structure in internal Ket-format.

getSmarts(): Promise<string> โ€“ returns string representation of drawn structure in Smarts-format.

getCml(): Promise<string> โ€“ returns string representation of drawn structure in Cml-format.

getSdf(molfileFormat): Promise<string> โ€“ returns string representation of drawn structure in Sdf-format.
Parameters: molfileFormat: 'v2000' | 'v3000'. Optional, by default, 'v2000'. Indicates, in which format result will be returned.

getCDXml(): Promise<string> โ€“ returns string representation of drawn structure in CDXml-format.

getCDX(): Promise<string> โ€“ returns string representation of drawn structure in CDX-format.

getInchi(withAuxInfo = false): Promise<string> โ€“ returns string representation of drawn structure in Inchi-format.
Parameters: withAuxInfo: boolean. Optional, by default, false.

getInchiKey(): Promise<string> โ€“ returns string representation of drawn structure in InChiKey-format.

containsReaction(): boolean โ€“ returns true, in case drawn structure contains reaction; false otherwise.

isQueryStructureSelected(): boolean โ€“ returns true, in case selected structure has query.

setMolecule(structure: string): Promise<void> โ€“ draws passed structure on the canvas. Before drawing passed structure, current structure is removed.
Parameters: structure: string. Structure is a string in any supported format.

addFragment(structure: string): Promise<void> โ€“ adds passed structure on the canvas. Current structure is not changed.
Parameters: structure: string. Structure is a string in any supported format.

layout(): Promise<void> โ€“ performs layout algorithm for drawn structure.

recognize(image: Blob, version?: string): Promise<Struct> โ€“ recognizes a structure from image.
Parameters: image: Blob โ€“ image to recognize. Returns Struct โ€“ object, which represents recognized structure.

generateImage(data: string, options: {  
    outputFormat: 'png' | 'svg';
    backgroundColor: string;
    bondThickness: number;
}): Promise<Blob>

Generates image from passed structure.
Parameters:
data โ€“ string representation of structure in any supported format.
options โ€“ object with the following properties:
* outputFormat โ€“ can be 'png' or 'svg'
* backgroundColor โ€“ image background color
* bondThickness โ€“ thickness of bonds in output structure

Settings

You can add extra configuration in editor.setSetting

Allowed parameters:

  • disableQueryElements: Disable the elements from the Extended Table
ketcher.setSettings({ "disableQueryElements": ["Pol", "CYH", "CXH"] })
  • general.dearomatize-on-load: Dearomatize the molecule when ketcher application starts
ketcher.setSettings({ "general.dearomatize-on-load": true })
  • ignoreChiralFlag: Ignore the chiral flag from .mol files
ketcher.setSettings({ "ignoreChiralFlag": true })

Contribution

See Contributing Guide.

License

Apache 2.0

Please read LICENSE and NOTICE for details.

Copyright (c) 2021 EPAM Systems, Inc.

epam-ketcher's People

Contributors

andreimazol avatar nitvex avatar softcat23 avatar anamoskvina avatar rrodionov91 avatar elenaodnoshivkina avatar konstantinepam23 avatar r1z3risgod avatar zhirnoff avatar daniilsavchuk avatar tomas-light avatar evgeniifrolov1 avatar starlastarla avatar porcelain11 avatar yuleicul avatar magomedgasanov avatar dmitrysigaev avatar karen-sarkisyan avatar rybalkin-ggasoftware avatar captain2b avatar viktormakarov-epam avatar vitaepam avatar zaimbeshich1 avatar qnan avatar aelyseev avatar viktoriiafedotkina avatar chgayane avatar mariia-katkova avatar akzhuk avatar st-permiakov avatar

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.