I see the line here, namely dx = prod(Dv, dtype=longdouble) ** (1.0 / (2.0 * n)), was a response to an overflow error which led some Mordred descriptors to be silently equal to zero.
I still got an overflow error (and therefore silently equal to 0 descriptors) because of the prod for large enough SMILES strings such as CCCCCC=CCCC(CCCCCCCC(=O)O)C(CCCCCCCC)CCCCCCCCC(=O)O
This PR is a bugfix for this overflow error by computing log_dx first and then exponentiating to get dx:
I see the line here, namely
dx = prod(Dv, dtype=longdouble) ** (1.0 / (2.0 * n))
, was a response to an overflow error which led some Mordred descriptors to be silently equal to zero.I still got an overflow error (and therefore silently equal to 0 descriptors) because of the
prod
for large enough SMILES strings such asCCCCCC=CCCC(CCCCCCCC(=O)O)C(CCCCCCCC)CCCCCCCCC(=O)O
This PR is a bugfix for this overflow error by computing
log_dx
first and then exponentiating to getdx
:I think this change resolves the overflow issue.