Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
BenoitClaveau opened this issue Mar 12, 2024 · 1 comment
Assignees

Comments

@BenoitClaveau
Copy link

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

@ptosco
Copy link

ptosco commented Mar 12, 2024

@BenoitClaveau I will expose the standard InChI options to JS, I can see how that can be useful.

@ptosco ptosco self-assigned this Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants