Re: [Rdkit-discuss] Building RDKit on Windows for pgAdmin (Postgres)

2022-04-14 Thread Paolo Tosco
Hi Charmaine, my suggestion is to build starting from a conda environment. That will significantly simplify your dependencies, since most packages are available pre-built. You can look into .azure-pipelines\vs_build_dll.yml for how to set up your conda environment and for the cmake flags to use.

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Giovanni Tricarico
Thank you Ivan, that's great! It does exactly what I wanted. OK, I cannot read the properties for wrong records, but one could argue when the molecule is wrong there is no point reading the properties. I only adjusted a couple of details (made sure that the file is read as text, not binary,

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Andrew Dalke
On Apr 14, 2022, at 12:57, Ivan Tubert-Brohman wrote: > How about splitting the file on lines consisting of "", and then parsing > each record? If the parsing fails, you can write out the bad record for > future inspection. (This addresses the basic use case, but not the "even > better"

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Ivan Tubert-Brohman
How about splitting the file on lines consisting of "", and then parsing each record? If the parsing fails, you can write out the bad record for future inspection. (This addresses the basic use case, but not the "even better" one.) Here's a proof of concept: from rdkit import Chem def

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Andrew Dalke
On Apr 14, 2022, at 09:16, Gyro Funch wrote: > I don't know the sdf format well, so please excuse my ignorance, but instead > of a custom parser, would it be possible to write a preprocessor to eliminate > the offending information? Perhaps something using regular expressions in > python,

[Rdkit-discuss] Building RDKit on Windows for pgAdmin (Postgres)

2022-04-14 Thread Charmaine Siu Man Chu
Hello, I've been trying to build RDKit on Windows so that I can get the RDKit extension in pgAdmin (Postgres) but I've been unsuccessful. I've tried to follow the instruction on https://www.rdkit.org/docs/Install.html to build RDKit and encountered several problems. Some of them I manage to

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Gyro Funch
On 2022-04-14 08:12 AM, Giovanni Tricarico wrote: Thank you Nils. In fact I do want the sanitize + parse to happen, and I do some further checks on the molecules, too (ChEMBL pipeline etc). The issue is that whatever does not pass the initial steps just completely disappears and cannot be

Re: [Rdkit-discuss] how to report SDF records for which Chem.ForwardSDMolSupplier returns None?

2022-04-14 Thread Giovanni Tricarico
Thank you Nils. In fact I do want the sanitize + parse to happen, and I do some further checks on the molecules, too (ChEMBL pipeline etc). The issue is that whatever does not pass the initial steps just completely disappears and cannot be reported or inspected in any way. Indeed, making a