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

cannot create molecule from pickle #15

Closed
thegodone opened this issue May 21, 2015 · 2 comments
Closed

cannot create molecule from pickle #15

thegodone opened this issue May 21, 2015 · 2 comments

Comments

@thegodone
Copy link
Contributor

implementation of molfrompickle done but issue to convert the moltobinary back to molecule using this function. 4879a12

we try to reproduce this python code

The RDKit pickle format is fairly compact and it is much, much faster to build a molecule from a pickle than from a Mol file or SMILES string, so storing molecules you will be working with repeatedly as pickles can be a good idea.

The raw binary data that is encapsulated in a pickle can also be directly obtained from a molecule:

binStr = m.ToBinary()
This can be used to reconstruct molecules using the Chem.Mol constructor:

m2 = Chem.Mol(binStr)
Chem.MolToSmiles(m2)
'c1ccncc1'
len(binStr)
123
len(pkl)
475

@thegodone
Copy link
Contributor Author

the issue is on Chem.Mol function

@thegodone
Copy link
Contributor Author

solve commited

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

1 participant