Skip to content

It is not possible to obtain an InChI Key from a molecule with the same options as in Python #449

Description

@BenClaveau

Is your feature request related to a problem? Please describe.
It seems that it is not possible to obtain an InChI Key from a molecule with the same options as in Python.

Describe the solution you'd like
In python I can pass options in MolToInchiKey

from rdkit.Chem import MolToInchiKey, SmilesParserParams, MolFromSmiles

params = SmilesParserParams()
params.removeHs = True
mol = MolFromSmiles(smiles, params)
inchi_key = MolToInchiKey(mol, options="-FixedH") 

In javascript not.

import initRDKitModule, { JSMol, RDKitModule } from "@rdkit/rdkit";

export const rdkit: RDKitModule = await initRDKitModule();

const mol = rdkit.get_mol(smiles, JSON.stringify({ removeHs: true }));
const inchiKey = rdkit.get_inchikey_for_inchi(mol.get_inchi());

Describe alternatives you've considered
I want to pass the same options

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions