mordred-descriptor / mordred

a molecular descriptor calculator
http://mordred-descriptor.github.io/documentation/master/
BSD 3-Clause "New" or "Revised" License
355 stars 95 forks source link

Unable to calculate a few hundred descriptors #68

Closed LewisJ142 closed 5 years ago

LewisJ142 commented 5 years ago

I am calculating all descriptors using mols from an SDF file containing molecules which I have washed and minimized using MOE. For a few hundred of the descriptors I am receiving error codes such as:

max() arg is an empty sequence (MAXssSiH2) min() arg is an empty sequence (MINssSnH2) invalid value encountered in true_divide (Mor25)

I have ran python -m modred.tests and I get the all OK.

Python 3.6.8 Mordred 1.1.1 rdkit 2018.09.1.0

philopon commented 5 years ago

It seems normal result in MAXssSiH2 and MINssSnH2.

For example, MAXssSiH2 descriptor cannot calculate to a molecule that don't have ssSiH2 (SMARTS pattern: SiD2H2-*) atom. It is a very rare atom type. So, almost all value of MAXssSiH2 will be missing value.

Same reason in MINssSnH2.

In MoRSE descriptor, zero division is occored when invalid atomic 3D coordinate is provided. It requires 3D coordinate include hydrogen atoms. Could you please check 3D coordinate of your file.

Thanks,

leosv123 commented 1 year ago

Can't we return as nan instead of error