Hi Christos,
Thanks, presently I iterate over all of the tags and copy them over.
That's really ugly and is identical to your suggestion. I was hopeful that
there was a more elegant way of doing things but I guess not. The pickling
thing really caught me by surprise. I can't tell you how many hours I
burned until I realized that was the problem.
Thanks for the quick response!
Matthew
On Thu, Mar 12, 2015 at 8:46 AM, Christos Kannas <chriskan...@gmail.com>
wrote:
> Hi Mathew,
>
> In order to store the tags and the data associated with them prior to
> writing the molecule to SDF/SMILES file you have to use SetProps(props)
> e.g. outfile.SetProps(props), where props is a list of the tags names your
> molecules have.
>
> In regards to when you pickle molecules you loose that extra
> information,you can convert your molecules to PropertyMol, e.g. from
> rdkit.Chem.PropertyMol import PropertyMol pmol = PropertyMol(mol)
>
> Hope the information above helps a bit.
>
> Regards,
>
> Christos
>
> Christos Kannas
>
> Researcher
> Ph.D Student
>
> [image: View Christos Kannas's profile on LinkedIn]
> <http://cy.linkedin.com/in/christoskannas>
>
> On 12 March 2015 at 15:33, Matthew Lardy <mla...@gmail.com> wrote:
>
>> Hi,
>>
>> I've noticed some strangeness between the Java and Python wrappers that I
>> have spent some time battling. If I load a SD file, via the SDMolSupplier
>> and then write out the file with SDWriter I lose all of the tags for the
>> molecules. Also if I pickle an SD file, reload it and then iterate over it
>> the tags are missing again. Is this the expected behaviour, or I am doing
>> something wrong?
>>
>> Thanks in advance!
>> Matthew
>>
>>
>> ------------------------------------------------------------------------------
>> Dive into the World of Parallel Programming The Go Parallel Website,
>> sponsored
>> by Intel and developed in partnership with Slashdot Media, is your hub
>> for all
>> things parallel software development, from weekly thought leadership
>> blogs to
>> news, videos, case studies, tutorials and more. Take a look and join the
>> conversation now. http://goparallel.sourceforge.net/
>> _______________________________________________
>> Rdkit-discuss mailing list
>> Rdkit-discuss@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>>
>>
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss