Re: [Rdkit-discuss] Error from qed

2019-07-04 Thread Greg Landrum
Yeah, to reinforce what Paolo said: we're not going to be able to help
unless you show us the code that you're using that's producing the error.

-greg


On Thu, Jul 4, 2019 at 11:00 AM Paolo Tosco 
wrote:

> Hi Navid,
>
> based on the adjacency matrix that you reported the first molecule has the
> following topology:
>
> i.e., it features an oxygen atom with 3 valences, plus a disconnected
> oxygen (the last one in the node). That molecule makes little chemical
> sense to me - it looks like some sort of slightly broken sydnonimine.
> However, unless you set a +1 formal charge on the oxygen wth index 6 in
> your node the RDKit will fail to sanitize that molecule.
>
> The second compound is nitromethane followed by a bunch of disconnected
> atoms:
>
> Again, as that nitrogen has a valence of 4, RDKit will fail to sanitize
> the molecule unless you set a formal charge of +1 on that nitrogen (and
> most likely a formal charge of -1 on the single-bonded oxygen). However,
> all those disconnected atoms (C, N, H) in the rest of your node seem
> suspicious to me - I wonder if something has gone wrong somewhere in your
> workflow.
>
> I hope the above helps, cheers
> p.
> On 03/07/2019 22:10, Navid Shervani-Tabar wrote:
>
> Hello,
>
> I was trying to find quantitative estimation of drug-likeness (QED)  for
> qm9 dataset. qm9 dataset provides a graph representation of the molecule,
> these are translated into mol objects and then qed is estimated.
>
> ```
> from rdkit.Chem.QED import qed
> .
> .
> .
> mol = Graphs2Mol(node, adj_mat)
> my_qed = qed(mol)
> ```
>
> I was trying to find qed for molecule with node and adjacency matrix
>
> ```
> node = ['C', 'C', 'C', 'C', 'C', 'N', 'O', 'N', 'O']
>
> adj_mat =
> [[0 1 0 0 0 0 0 0 0]
>  [1 0 2 1 0 0 0 0 0]
>  [0 2 0 0 0 0 0 0 0]
>  [0 1 0 0 1 0 0 0 0]
>  [0 0 0 1 0 1 2 0 0]
>  [0 0 0 0 1 0 0 0 0]
>  [0 0 0 0 2 0 0 1 0]
>  [0 0 0 0 0 0 1 0 0]
>  [0 0 0 0 0 0 0 0 0]]
> ```
>
> and I received following error
>
> `ValueError: Sanitization error: Explicit valence for atom # 6 O, 3, is
> greater than permitted
> `
> Same happened with
> ```
> node = ['O', 'N', 'O', 'C', 'C', 'C', 'C', 'N', 'H']
>
> adj_mat =
> [[0 2 0 0 0 0 0 0 0]
>  [2 0 1 1 0 0 0 0 0]
>  [0 1 0 0 0 0 0 0 0]
>  [0 1 0 0 0 0 0 0 0]
>  [0 0 0 0 0 0 0 0 0]
>  [0 0 0 0 0 0 0 0 0]
>  [0 0 0 0 0 0 0 0 0]
>  [0 0 0 0 0 0 0 0 0]
>  [0 0 0 0 0 0 0 0 0]]
> ```
>
> and I received
>
> `ValueError: Sanitization error: Explicit valence for atom # 1 N, 4, is
> greater than permitted
> `
> Any suggestions on what might be incorrect? Thanks.
>
> Navid
>
>
> ___
> Rdkit-discuss mailing 
> listRdkit-discuss@lists.sourceforge.nethttps://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
> ___
> Rdkit-discuss mailing list
> Rdkit-discuss@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
>
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss


Re: [Rdkit-discuss] Error from qed

2019-07-04 Thread Paolo Tosco

Hi Navid,

based on the adjacency matrix that you reported the first molecule has 
the following topology:


i.e., it features an oxygen atom with 3 valences, plus a disconnected 
oxygen (the last one in the node). That molecule makes little chemical 
sense to me - it looks like some sort of slightly broken sydnonimine. 
However, unless you set a +1 formal charge on the oxygen wth index 6 in 
your node the RDKit will fail to sanitize that molecule.


The second compound is nitromethane followed by a bunch of disconnected 
atoms:


Again, as that nitrogen has a valence of 4, RDKit will fail to sanitize 
the molecule unless you set a formal charge of +1 on that nitrogen (and 
most likely a formal charge of -1 on the single-bonded oxygen). However, 
all those disconnected atoms (C, N, H) in the rest of your node seem 
suspicious to me - I wonder if something has gone wrong somewhere in 
your workflow.


I hope the above helps, cheers
p.

On 03/07/2019 22:10, Navid Shervani-Tabar wrote:

Hello,

I was trying to find quantitative estimation of drug-likeness (QED) 
 for qm9 dataset. qm9 dataset provides a graph representation of the 
molecule, these are translated into mol objects and then qed is 
estimated.


```
from rdkit.Chem.QED import qed
.
.
.
mol = Graphs2Mol(node, adj_mat)
my_qed = qed(mol)
```

I was trying to find qed for molecule with node and adjacency matrix

```
node = ['C', 'C', 'C', 'C', 'C', 'N', 'O', 'N', 'O']

adj_mat =
[[0 1 0 0 0 0 0 0 0]
 [1 0 2 1 0 0 0 0 0]
 [0 2 0 0 0 0 0 0 0]
 [0 1 0 0 1 0 0 0 0]
 [0 0 0 1 0 1 2 0 0]
 [0 0 0 0 1 0 0 0 0]
 [0 0 0 0 2 0 0 1 0]
 [0 0 0 0 0 0 1 0 0]
 [0 0 0 0 0 0 0 0 0]]
```

and I received following error

`ValueError: Sanitization error: Explicit valence for atom # 6 O, 3, 
is greater than permitted

`
Same happened with
```
node = ['O', 'N', 'O', 'C', 'C', 'C', 'C', 'N', 'H']

adj_mat =
[[0 2 0 0 0 0 0 0 0]
 [2 0 1 1 0 0 0 0 0]
 [0 1 0 0 0 0 0 0 0]
 [0 1 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0]
 [0 0 0 0 0 0 0 0 0]]
```

and I received

`ValueError: Sanitization error: Explicit valence for atom # 1 N, 4, 
is greater than permitted

`
Any suggestions on what might be incorrect? Thanks.

Navid


___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss
___
Rdkit-discuss mailing list
Rdkit-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rdkit-discuss