Hi Greg,
thanks for your input, this is quite faster!
Cheers,
Jose Manuel
On 21.02.19 09:48, Greg Landrum wrote:
This is a nice solution to the problem. Thanks for sharing it!
I think there is, however a minor mistake. This line:
df['mol'] = df['mol'].map(lambda x:
base64.b64encode(pickle.d
This is a nice solution to the problem. Thanks for sharing it!
I think there is, however a minor mistake. This line:
df['mol'] = df['mol'].map(lambda x:
base64.b64encode(pickle.dumps(x)).decode())
should be:
df['mol'] = df['mol'].map(lambda x: base64.b64encode(x.ToBinary()).decode())
You could
Dear all,
in case this is helpful for others, here is the solution I came up with
by combining 2 snippets of code [1, 2]:
# init
import base64
from rdkit import Chem
n_records = 10
file='/tmp/test.hdf'
key='test'
df = pd.DataFrame({'mol': [Chem.MolFromSmiles('C1C1')] * n_records})
# s
Dear Peter,
thank you for your reply.
That might work for me, I'll look into it.
As a side note, if I convert the Mol into RWMol, I don't get the warning
anymore (but then I cannot read the molecules anymore...)
Cheers,
Jose Manuel
On 15.02.19 17:14, Peter St. John wrote:
you might be bette
you might be better off not storing the molecule RDkit objects themselves
in the hdf file; but rather some other representation of the molecule. If
you need 3D atom coordinates, you could call MolToMolBlock() on each of the
rdkit mols, and then MolFromMolBlock later to regenerate them. If you don't
5 matches
Mail list logo